pls(X, Y, ncomp = 2,
mode = c("regression", "canonical", "invariant", "classic"),
max.iter = 500, tol = 1e-06, near.zero.var = TRUE)
NA
s are allowed.NA
s are allowed."regression"
, "canonical"
, "invariant"
or "classic"
.
See Details.nearZeroVar
function (should be set to TRUE in particular for data with many zero values). Setting this argument to FALSE (when appropriate) will speed up the computations.pls
returns an object of class "pls"
, a list
that contains the following components:predict
.pls
function fit PLS models with $1, \ldots ,$ncomp
components.
Multi-response models are fully supported. The X
and Y
datasets
can contain missing values.The type of algorithm to use is specified with the mode
argument. Four PLS
algorithms are available: PLS regression ("regression")
, PLS canonical analysis
("canonical")
, redundancy analysis ("invariant")
and the classical PLS
algorithm ("classic")
(see References).
The estimation of the missing values can be performed
by the reconstitution of the data matrix using the nipals
function. Otherwise, missing
values are handled by casewise deletion in the pls
function without having to
delete the rows with missing data.
Wold H. (1966). Estimation of principal components and related models by iterative least squares. In: Krishnaiah, P. R. (editors), Multivariate Analysis. Academic Press, N.Y., 391-420.
spls
, summary
,
plotIndiv
, plotVar
, predict
, perf
and http://www.mixOmics.org for more details.data(linnerud)
X <- linnerud$exercise
Y <- linnerud$physiological
linn.pls <- pls(X, Y, mode = "classic")
data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
toxicity.pls <- pls(X, Y, ncomp = 3)
Run the code above in your browser using DataLab