plot.autopls: Plotting function for autopls objects

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

Description

Produces plots illustrating the outcomes of autopls: predicted vs. observed values, errors vs. numbers of latent vectors, regression coefficients, influences of observations regarding X and Y, latent vectors and R2 in backward selection

Usage

1
2
3
  ## S3 method for class 'autopls'
plot(x,type="all",wl=NULL,rcxlab = "Predictors",
  plab=FALSE, bw = FALSE, ...)

Arguments

x

object of class autopls

type

specifying the type of plot. ("all": all plot; "ovp": observed vs. predicted values; "ovp.test": test set: observed vs. predicted values; "rmse": internal validation errors vs. numbers of latent vectors; "rmse.test": test set errors vs. numbers of latent vectors; "rc": regression coefficients; "x.inf": influence plot (X-variance); "y.inf": influence plot (Y-variance); "meta": latent vectors and R2 in backward selection)

wl

denotes an optional vector of numerical values describing the position of predictors along the x axis in the rc plot. The values should refer to all bands (before backward selection) or to the bands that are actually used.

rcxlab

Label for x axis in rc plot.

plab

logical. Whether observations are labeled.

bw

logical. Whether plots are given in grey-scales (partly realized).

...

Arguments to be passed to methods

Details

Red dots in the influence plots indicate potentially dangerous outliers

Value

Apart from the plots the function returns the underlying values

Author(s)

Sebastian Schmidtlein, Carsten Oldenburg

The placement of observation labels if plab = TRUE is done using code borrowed from the pointLabel in maptools. The author of this function is Tom Short (EPRI).

See Also

autopls

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)
  data (murnau.W)
  
  ## call autopls with the standard options
  model<-autopls (murnau.Y ~ murnau.X)
  
  ## plot results
  ## Not run: plot (model)

  ## use wavelengths in rc plot
  ## Not run: plot (model, type = "rc", wl = murnau.W, rcxlab = "Wavelength (nm)")
  
  ## predicted vs. observed
  ## Not run: x <- plot (model, type = "ovp")
  ## Not run: x
  

Example output

Loading required package: pls

Attaching package: 'pls'

The following object is masked from 'package:stats':

    loadings

autopls 1.3
1   Pred: 26  LV: 3   R2v: 0.74   RMSEv: 4.727  
2   Pred: 23  LV: 3   R2v: 0.742  RMSEv: 4.705  Criterion: A1
3   Pred: 20  LV: 3   R2v: 0.749  RMSEv: 4.645  Criterion: A4
4   Pred: 18  LV: 3   R2v: 0.752  RMSEv: 4.611  Criterion: A4
5   Pred: 16  LV: 3   R2v: 0.752  RMSEv: 4.61   Criterion: A4
6   Pred: 13  LV: 3   R2v: 0.76   RMSEv: 4.537  Criterion: A1
7   Pred: 11  LV: 3   R2v: 0.768  RMSEv: 4.466  Criterion: A4
8   Pred: 9   LV: 3   R2v: 0.775  RMSEv: 4.397  Criterion: A4

Predictors: 9   Observations: 40   Latent vectors: 3   Run: 8 
RMSE(CAL): 4.09   RMSE(LOO): 4.4   
R2(CAL): 0.805    R2(LOO): 0.775   

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