pls(X, Y, ncomp = 3,
mode = c("regression", "canonical", "invariant", "classic"),
max.iter = 500, tol = 1e-06, scaleY=TRUE)NAs are allowed.NAs are allowed.X."regression", "canonical", "invariant" or "classic".
See Details.FALSE.pls returns an object of class "pls", a list
that contains the following components:predict.X and Y variates.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 number of components to fit is specified with the argument ncomp.
It this is not supplied, the rank of X is used. The rank is compute by
using the mat.rank function.spls, summary, mat.rank,
plotIndiv, plotVar.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