extract.autopls {autopls} | R Documentation |
Functions to extract information from autopls
objects:
crossvalidation, fitted values, regression coefficients,
residuals, scores, loadings, latent vectors used, underlying run.
predicted (object) get.lv (object) get.iter (object) slim (object) ## S3 method for class 'autopls' scores(object, ...) ## S3 method for class 'autopls' loadings(object, ...) ## S3 method for class 'autopls' fitted(object, ...) ## S3 method for class 'autopls' coef(object, intercept = FALSE, ...) ## S3 method for class 'slim' coef(object, intercept = FALSE, ...) ## S3 method for class 'autopls' residuals(object, ...)
object |
object of class |
intercept |
logical. Should intercept be given? |
... |
logical. Arguments to be passed to methods |
Provides convenience wrappers for extract
functions in package
pls. More details are given here: coef.mvr.
Other functions extract information specific for autopls
objects: get.lv
, get.iter
or condense the model information
to a memory saving object of class slim
that can be used for
predictions with predict.slim
. This makes sense if large
pedictor data sets result in huge autopls
model objects that
are difficult to handle.
see coef.mvr. get.iter
returns the run in the
autopls
backwards selection procedure that has been used for the
current model.
get.lv
returns the number of latent vectors used for the present model.
predicted
returns the predictions in model validation while
fitted
returns the predictions in model calibration.
slim
returns an object of class slim
.
If you want to make full use of the extract
functions in the pls
package assign class mvr
to the model object.
Reducing a model to an object of class slim
means loosing plotting
options.
Sebastian Schmidtlein, links to code from package pls by Ron Wehrens and Bjørn-Helge Mevik.
autopls
, metaval
, set.iter
,
set.lv
, predict.slim
## load predictor and response data to the current environment data (murnau.X) data (murnau.Y) ## call autopls with the standard options model <- autopls (murnau.Y ~ murnau.X) ## get fitted values fitted(model)