plotSEPprm {chemometrics} | R Documentation |
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, ...)
Arguments
prmdcvobj |
object from repeated double-CV of PRM, see |
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
|
... |
additional arguments ofr |
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.
Value
SEPdcv |
all trimmed SEP values from repeated double-CV |
SEPcv |
trimmed SEP values from usual CV |
Author(s)
Peter Filzmoser <P.Filzmoser@tuwien.ac.at>
References
K. Varmuza and P. Filzmoser: Introduction to Multivariate Statistical Analysis in Chemometrics. CRC Press, Boca Raton, FL, 2009.
See Also
Examples
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)