plot.cv.gamsel {gamsel} | R Documentation |
Plotting Routine for Gamsel Cross-Validation Object
Description
Produces a cross-validation curve with standard errors for a fitted gamsel objecty.
Usage
## S3 method for class 'cv.gamsel'
plot(x, sign.lambda = 1, ...)
Arguments
x |
|
sign.lambda |
Either plot against |
... |
Optional graphical parameters to plot. |
Details
A plot showing cross-validation error is produced. Nothing is returned.
Author(s)
Alexandra Chouldechova and Trevor Hastie
Maintainer: Trevor
Hastie hastie@stanford.edu
References
Chouldechova, A. and Hastie, T. (2015) Generalized Additive Model Selection
Examples
##data=gamsel:::gendata(n=500,p=12,k.lin=3,k.nonlin=3,deg=8,sigma=0.5)
data = readRDS(system.file("extdata/gamsel_example.RDS", package = "gamsel"))
attach(data)
bases=pseudo.bases(X,degree=10,df=6)
# Gaussian gam
gamsel.out=gamsel(X,y,bases=bases)
gamsel.cv=cv.gamsel(X,y,bases=bases)
par(mfrow=c(1,1))
plot(gamsel.cv)
[Package gamsel version 1.8-4 Index]