plot.mbl {resemble}R Documentation

Plot method for an object of class mbl

Description

Plots the content of an object of class mbl

Usage

## S3 method for class 'mbl'
plot(x, g = c("validation", "pca"), param = "rmse", pcs = c(1,2), ...)

Arguments

x

an object of class mbl (as returned by mbl).

g

a character vector indicating what results shall be plotted. Options are: "validation" (for plotting the validation results) and/or "pca" (for plotting the principal components).

param

one of the following options "rmse", "st.rmse" or "r2". The respective validation statistic is then plotted. It is only available if "validation" is specified in the g argument.

pcs

a vector of length one or two indicating the principal components to be plotted. Default is c(1, 2). It is only available if "pca" is specified in the g argument.

...

some arguments to be passed to methods as graphical parameters.

Author(s)

Leonardo Ramirez-Lopez and Antoine Stevens

See Also

mbl

Examples

## Not run: 
require(prospectr)

data(NIRsoil)

Xu <- NIRsoil$spc[!as.logical(NIRsoil$train),]
Yu <- NIRsoil$CEC[!as.logical(NIRsoil$train)]
Yr <- NIRsoil$CEC[as.logical(NIRsoil$train)]
Xr <- NIRsoil$spc[as.logical(NIRsoil$train),]

Xu <- Xu[!is.na(Yu),]
Yu <- Yu[!is.na(Yu)]

Xr <- Xr[!is.na(Yr),]
Yr <- Yr[!is.na(Yr)] 

ctrl <- mblControl(sm = "cor", ws = 51, 
                   pcSelection = list("cumvar", 0.999), 
                   valMethod = c("NNv"), 
                   scaled = TRUE, center = TRUE)

ex1 <- mbl(Yr = Yr, Xr = Xr, Yu = NULL, Xu = Xu,
           mblCtrl = ctrl,
           dissUsage = "none", 
           k = seq(30, 250, 30), 
           method = "wapls1",
           plsC = c(7, 20))

plot(ex1)

## End(Not run)

[Package resemble version 1.2.2 Index]