autoplsVAL: Validate a fitted autopls model

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Functions to extract R2 and RMSEP from autopls objects, for significance testing based on jackknife variance estimates for regression

Usage

1
2
3
4
5
6
7
8
  ## S3 method for class 'autopls'
R2(object, estimate, nc = 'inherit', ic = FALSE, ...)
  ## S3 method for class 'autopls'
RMSEP(object, estimate, nc = 'inherit', ic = FALSE, ...)
  jack.test.autopls (object, nc = 'inherit')
  metaval (object, method, estimate, ic)
  repeatedCV (object, k = 100, segments = 4)
  clusterCV (object, valist)

Arguments

object

object of class autopls

method

character. Should be or 'R2' or 'RMSEP'

estimate

character vector. Which estimators to use. In metaval this can be “train” or “CV”. Additional options in R2 and RMSEP are “all” and “test”).

nc

'inherit' returns values corresponding to the number of latent vectors in the current model, 'all' returns values for all numbers of latent vectors. A specific number returns values corresponding to the respective number of latent vectors.

ic

logical. Specifies whether estimates for a model with zero components should be returned

k

number of cross-validations used in repeatedCV

segments

number of cross-validation segments used in repeatedCV

valist

list of segments. The elements are vectors of plots assigned to a cluster of samples

...

Arguments to be passed to methods

Details

Some of these functions are just convenience wrappers for mvrVal functions and for the jack.test function in package pls. More details are given here: mvrVal, jack.test. Other functions are specific autopls functions. metaval is used for a summary of validation results during backselection. repeatedCV is a meta cross-validation (repeated ten-fold cross-validation). clusterCV is a leave-one-site-out cross-validation to avoid effects of spatial or other autocorrelation. The elements of the list should be integer vectors specifying the indices of the segments.

Value

see mvrVal and jack.test. The main difference is a reduced selection of functions (see above) and the possibility to inherit a number of latent vectors from the autopls object.

The metaval function provides a matrix overview of model results for all iterations and numbers of latent vectors in an autopls object. repeatedCV provides results and basic statistics for repeated cross-validation runs.

Note

If you want to make full use of the mvrVal functions in the pls package assign class mvr to the model object.

Author(s)

Sebastian Schmidtlein, linking to code from package pls by Ron Wehrens and Bjørn-Helge Mevik.

See Also

mvrVal, jack.test, autopls, repCV, mvr_dcv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
  ## 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)
  
  ## Validation
  R2 (model)
  R2 (model, nc = 'all')  
  RMSEP (model)  
  metaval (model, 'R2', 'CV', ic = FALSE)
  
  ## Jackknife test
  jack.test.autopls (model)
  
  ## Meta cross-validation
  repeatedCV (model)

autopls documentation built on May 2, 2019, 9:39 a.m.

Related to autoplsVAL in autopls...