Learn R Programming

mixOmics (version 2.6)

pls: Partial Least Squares (PLS) Regression

Description

Functions to perform Partial Least Squares (PLS) regression.

Usage

pls(X, Y, ncomp = 3, 
    mode = c("regression", "canonical", "invariant", "classic"), 
    max.iter = 500, tol = 1e-06, scaleY=TRUE)

Arguments

X
numeric matrix of predictors. NAs are allowed.
Y
numeric vector or matrix of responses (for multi-response models). NAs are allowed.
ncomp
the number of components to include in the model. Default is from one to the rank of X.
mode
character string. What type of algorithm to use, (partially) matching one of "regression", "canonical", "invariant" or "classic". See Details.
max.iter
integer, the maximum number of iterations.
tol
a not negative real, the tolerance used in the iterative algorithm.
scaleY
should the Y data be scaled ? In the case of a 'discriminant' version of the PLS where the Y data are of discrete type, this should be set to FALSE.
...
not used currently.

Value

  • pls returns an object of class "pls", a list that contains the following components:
  • Xthe centered and standardized original predictor matrix.
  • Ythe centered and standardized original response vector or matrix.
  • ncompthe number of components included in the model.
  • modethe algoritthm used to fit the model.
  • mat.cmatrix of coefficients to be used internally by predict.
  • variateslist containing the X and Y variates.
  • loadingslist containing the estimated loadings for the variates.
  • nameslist containing the names to be used for individuals and variables.

encoding

latin1

Details

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.

References

Tenenhaus, M. (1998). La r�gression PLS: th�orie et pratique. Paris: Editions Technic. 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.

See Also

spls, summary, mat.rank, plotIndiv, plotVar.

Examples

Run this code
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