Sparse Partial Least Squares Discriminant Analysis (sPLS-DA)
PLSda.Rd
Function to perform Partial Least Squares to classify samples (supervised analysis).
Details
PLSda
function fit PLS models with \(1, \ldots ,\)ncomp
components
to the factor or class vector Y
. The appropriate indicator (dummy)
matrix is created.
Value
PLSda
returns an object of class "PLSda"
, a list
that contains the following components:
- X
the centered and standardized original predictor matrix.
- Y
the centered and standardized indicator response vector or matrix.
- ind.mat
the indicator matrix.
- ncomp
the number of components included in the model.
- mat.c
matrix of coefficients to be used internally by
predict
.- variates
list containing the variates.
- loadings
list containing the estimated loadings for the
X
andY
variates.- names
list containing the names to be used for individuals and variables.
Examples
library(sgPLSdevelop)
ncompmax <- 5
d <- data.cl.create(classes = 4, n = 30, list = TRUE)
X <- d$X
Y <- d$Y
modele <- PLSda(X = X, Y = Y, ncomp = ncompmax)