Description Usage Arguments Details Value Note Author(s) See Also Examples
Plot results of resamplingbased prediction error measures.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35  perryPlot(object, ...)
## S3 method for class 'perry'
perryPlot(
object,
which = c("box", "density", "dot"),
select = NULL,
seFactor = NA,
...
)
## S3 method for class 'perrySelect'
perryPlot(
object,
which = c("box", "density", "dot", "line"),
subset = NULL,
select = NULL,
seFactor = object$seFactor,
...
)
## S3 method for class 'setupPerryPlot'
perryPlot(object, mapping = object$mapping, facets = object$facets, ...)
## S3 method for class 'perry'
autoplot(object, ...)
## S3 method for class 'perrySelect'
autoplot(object, ...)
## S3 method for class 'perry'
plot(x, ...)
## S3 method for class 'perrySelect'
plot(x, ...)

object, x 
an object inheriting from class 
... 
additional arguments to be passed down, eventually to

which 
a character string specifying the type of plot. Possible
values are 
select 
a character, integer or logical vector indicating the columns of prediction error results to be plotted. 
seFactor 
a numeric value giving the multiplication factor of the
standard error for displaying error bars in dot plots or line plots. Error
bars in those plots can be suppressed by setting this to 
subset 
a character, integer or logical vector indicating the subset of models for which to plot the prediction error results. 
mapping 
an aesthetic mapping to override the default behavior (see

facets 
a faceting formula to override the default behavior. If
supplied, 
For objects with multiple columns of prediction error results, conditional plots are produced.
An object of class "ggplot"
(see ggplot
).
Duplicate indices in subset
or select
are removed such
that all models and prediction error results are unique.
Andreas Alfons
perryFit
, perrySelect
,
perryTuning
,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38  library("perryExamples")
data("coleman")
set.seed(1234) # set seed for reproducibility
## set up folds for crossvalidation
folds < cvFolds(nrow(coleman), K = 5, R = 10)
## compare LS, MM and LTS regression
# perform crossvalidation for an LS regression model
fitLm < lm(Y ~ ., data = coleman)
cvLm < perry(fitLm, splits = folds,
cost = rtmspe, trim = 0.1)
# perform crossvalidation for an MM regression model
fitLmrob < lmrob(Y ~ ., data = coleman, maxit.scale = 500)
cvLmrob < perry(fitLmrob, splits = folds,
cost = rtmspe, trim = 0.1)
# perform crossvalidation for an LTS regression model
fitLts < ltsReg(Y ~ ., data = coleman)
cvLts < perry(fitLts, splits = folds,
cost = rtmspe, trim = 0.1)
# combine results into one object
cv < perrySelect(LS = cvLm, MM = cvLmrob, LTS = cvLts,
.selectBest = "min")
cv
# plot results for the MM regression model
plot(cvLmrob, which = "box")
plot(cvLmrob, which = "density")
plot(cvLmrob, which = "dot", seFactor = 2)
# plot combined results
plot(cv, which = "box")
plot(cv, which = "density")
plot(cv, which = "dot", seFactor = 2)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.