Allows user to select optimal number of components for PLS model
# S3 method for pls
selectCompNum(model, ncomp = NULL,
selcrit = model$ncomp.selcrit, ...)
PLS model (object of class pls
)
number of components to select
criterion for selecting optimal number of components ('min'
for
first local minimum of RMSECV and 'wold'
for Wold's rule.)
other parameters if any
the same model with selected number of components
If number of components is not specified, the cross-validation statistics will be used. It can be either first local minimum of RMSECV (`selcrit='min'`) or Wold's rule (`selcrit='wold'`) based on ratio of PRESS values and threshold of 0.95.
See examples in help for pls
function.