simpls {pls.pcr} | R Documentation |
This function should not be called directly, but through
the generic pls
function with the argument
method="simpls"
. It is much faster than the NIPALS algorithm,
especially when the number of X variables increases, but gives
slightly different results in the case of multivariate Y. SIMPLS truly
maximises the covariance criterion. According to De Jong, the standard
PLS2 algorithms lie closer to ordinary least-squares regression where
a precise fit is sought; SIMPLS lies closer to PCR with stable
predictions.
simpls(X, Y, ncomp, newX)
X |
a matrix of observations. NA s and Inf s are not
allowed. |
Y |
a vector or matrix of responses. NA s and Inf s
are not allowed. |
ncomp |
the number of latent variables to be used in the
modelling. The default number of latent variables is the smallest of
the number of objects or the number of variables in X . |
newX |
optional new measurements: if present, predictions will be made for them. |
A list containing the following components is returned:
B |
an array of regression coefficients for all items in
ncomp . The dimensions of B are
c(nvar, npred, length(ncomp)) with nvar the number
of X variables and npred the number of variables to be
predicted in Y . |
XvarExpl |
Fraction of X-variance explained. |
YvarExpl |
Fraction of Y-variance explained (one column, even for multiple Y). |
Ypred |
predictions for newX (if asked). |
S. de Jong, Chemometrics and Intelligent Laboratory Systems, 18 (1993) 251-263.
data(NIR) attach(NIR) NIR.simpls <- mvr(Xtrain, Ytrain, 1:6, validation="CV", method="SIMPLS")