Function that performs multivariate multiple linear regression modelling (\(Y = XB + E\)) according to a principal component regression (PCR) approach where the number of components equals the number of nonzero eigenvalues (generalised inverse).
linregEst(X, Y)
regressor matrix
response matrix
tuning parameter for the rank. The default value corresponds to the rank function in Matlab.
this matrix is returned by linregStart
linregEst
returns a list with seven components. The first
three components is returned by linregStart
- the rest by
linregEnd
.
Matrix of score values according to the PCR model.
Matrix that can be used to calculate Umodel
from
X
. That is, Umodel
equals X %*% VmodelDivS
.
Matrix that can be used to check estimability. That is,
predictions for a new X cannot be made if Xnew %*% VextraDivS1
is
(close to) zero.
Matrix of regression parameters according to the PCR model.
Mean square error of each response
Error observations that can be used in multivariate testing
Fitted values. Equals Umodel %*% BetaU
The function linregEst
performs the calculations in two steps by
calling linregStart
and linregEnd
. The former functions
function makes all calculations that can be done without knowing \(Y\).
The singular value decomposition (SVD) is an essential part of the
calculations and some of the output variables are named according to SVD
(U, S and V).