Plot method for cross validated error of a fusedanova model

Share:

Description

Produce a plot of the cross validated error of a fusedanova model.

Usage

1
2
\S4method{plot}{cv.fa}(x, y, varvect = NULL, plotting=TRUE,
lambdamins=TRUE, log.scale=TRUE, reverse=FALSE,main = "Cross-validation error",...)

Arguments

x

output of a crossval run (must be of class cv.fa).

y

used for S4 compatibility.

varvect

integer vector; give the index of all variables to plot separately. By default, varvect is NULL and the plot returns the plot of the global attribute of a cv.fa instance.

plotting

logical; indicates if the graph should be plotted. Default is TRUE.

lambdamins

logical; should the distribution of lambdamin be plotted ?

log.scale

logical; indicates if a log-scale should be used

reverse

logical; should the X-axis by reversed when xvar=lambda? Default is FALSE. Ignored for 2D cross-validation plot.

main

the main title, with a hopefully appropriate default definition.

...

used for S4 compatibility.

Value

a ggplot2 object or a list of ggplot2 objects (if a list of variable was provided) which can be plotted via the print method

See Also

cv.fa.

Examples

1
2
3
4
5
6
7
8
## Not run: 
data(aves)
cv.out <- cv.fa(aves$weight, aves$family)
V100.cv.out <- cv.fa(aves$weight, aves$family, V=50)
plot(cv.out)
plot(V100.cv.out)

## End(Not run)