Description Usage Arguments Value Examples
Generate a plsda model according to formula and data provided. This model can be cross-validated.
1 2 |
formula |
A valid statistical R formula. |
data |
The data to be used to rain the PLS-DA model. I must fit to the formula. The response must be a qualitative variable. The predictors must be a set of quantitative variables. |
ncomp |
The number of component to compute. If cross-validation is activated it will be used as the maximum number of component to return. |
cv |
If TRUE a cross-validation will be done. Default is FALSE. |
nfold |
If cv parameter is TRUE, nfold will specify the kind of cross-validation. Default is 0. A value of 0 will be equivalent to a "Leave One Out" cross-validation. If > 0 it will do a k-fold cross-validation with k = nfold. |
vs |
If TRUE an automatic variable selection will be done. Default is FALSE. |
vs_crit |
Treshold value for the variables selection (vs=TRUE). Default value : 1 (fit fonction) |
A plsda object that contains the component matrix, the trained model as coefficients, the explained variance on X and Y, VIP values, quality of the model and cross-validation results if asked
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.