spls(X, Y, ncomp = 2, mode = c("regression", "canonical"),
max.iter = 500, tol = 1e-06, keepX = rep(ncol(X), ncomp),
keepY = rep(ncol(Y), ncomp), near.zero.var = TRUE)
NA
s are allowed.NA
s are allowed.X
."regression"
or "canonical"
. See Details.ncomp
, the number of variables
to keep in $X$-loadings. By default all variables are kept in the model.ncomp
, the number of variables
to keep in $Y$-loadings. By default all variables are kept in the model.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.spls
returns an object of class "spls"
, a list
that contains the following components:predict
.spls
function fit sPLS 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. Two sPLS
algorithms are available: sPLS regression ("regression")
and sPLS canonical analysis
("canonical")
(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 spls
function without having to
delete the rows with missing data.
Le Cao, K.-A., Rossouw, D., Robert-Granie, C. and Besse, P. (2008). A sparse PLS for variable selection when integrating Omics data. Statistical Applications in Genetics and Molecular Biology 7, article 35.
Shen, H. and Huang, J. Z. (2008). Sparse principal component analysis via regularized low rank matrix approximation. Journal of Multivariate Analysis 99, 1015-1034.
Tenenhaus, M. (1998). La regression PLS: theorie 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.
pls
, summary
,
plotIndiv
, plotVar
,
cim
, network
, predict
, perf
and http://www.mixOmics.org for more details.data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
toxicity.spls <- spls(X, Y, ncomp = 2, keepX = c(50, 50),
keepY = c(10, 10))
Run the code above in your browser using DataLab