pls: Fonction pls

Description Usage Arguments Value

View source: R/pls.R

Description

Generate a plsda model according to formula and data provided. This model can be cross-validated.

Usage

1
pls(X, Y, nc, cv, nfold)

Arguments

X

The predictors must be a set of quantitative variables.

Y

The response must be a qualitative variable.

nc

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.

Value

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


Dampeel/plsda documentation built on May 23, 2019, 8:19 p.m.