pls_da | R Documentation |
This function performs partial least squares discriminant analysis (PLS-DA). In this function, data matrix for explanatory variable is automatically scaled to zero mean and unit variance (i.e. autoscaling) for each variables.
pls_da(X,Y,k)
X |
Data matrix of explanatory variables that include variables in each columns. |
Y |
Dummy matrix that include group information 0,1 in each columns. |
k |
Number of components. |
This function calculates PLS-DA. For PLS, use the 'pls_svd' function for PLS.
The return value is a list object that contains the following elements:
P: A matrix containing the PLS-DA loadings for each explanatory variable in the columns, before transformation.
T : A matrix with PLS-DA score for explanatory variable in each column
Hiroyuki Yamamoto
Yamamoto, H. et al., Dimensionality reduction for metabolome data using PCA, PLS, OPLS, and RFDA with differential penalties to latent variables", Chemom. Intell. Lab. Syst., 98 (2009)
data(whhl)
X <- whhl$X$liver
Y <- whhl$Y
plsda <- pls_da(X,Y,2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.