chemometrics (version 1.4.2)

plotSEPprm: Plot trimmed SEP from repeated DCV of PRM

Description

Generate plot showing trimmed SEP values for Repeated Double Cross Validation for Partial RObust M-Regression (PRM)

Usage

plotSEPprm(prmdcvobj, optcomp, y, X, complete = TRUE, ...)

Value

SEPdcv

all trimmed SEP values from repeated double-CV

SEPcv

trimmed SEP values from usual CV

Arguments

prmdcvobj

object from repeated double-CV of PRM, see prm_dcv

optcomp

optimal number of components

y

data from response variable

X

data with explanatory variables

complete

if TRUE the trimmed SEPcv values are drawn and computed from prm_cv for the same range of components as included in the prmdcvobj object; if FALSE only optcomp components are computed and their results are displayed

...

additional arguments ofr prm_cv

Author

Peter Filzmoser <P.Filzmoser@tuwien.ac.at>

Details

After running repeated double-CV for PRM, this plot visualizes the distribution of the SEP values. While the gray lines represent the resulting trimmed SEP values from repreated double CV, the black line is the result for standard CV with PRM, and it is usually too optimistic.

References

K. Varmuza and P. Filzmoser: Introduction to Multivariate Statistical Analysis in Chemometrics. CRC Press, Boca Raton, FL, 2009.

See Also

prm

Examples

Run this code
data(NIR)
X <- NIR$xNIR[1:30,]      # first 30 observations - for illustration
y <- NIR$yGlcEtOH[1:30,1] # only variable Glucose
NIR.Glc <- data.frame(X=X, y=y)
res <- prm_dcv(X,y,a=4,repl=2)
plot1 <- plotSEPprm(res,opt=res$afinal,y,X)

Run the code above in your browser using DataCamp Workspace