Plots the cross-validation curve, and upper and lower standard deviation curves, as a function of the lambda values used.

# S3 method for cv.sail
plot(x, sign.lambda = 1, ...)

Arguments

x

fitted cv.sail object

sign.lambda

Either plot against log(lambda) (default) or its negative if sign.lambda=-1.

...

Other graphical parameters to plot

Value

A plot is produced and nothing is returned

Details

This is a port of plot.cv.glmnet

References

Jerome Friedman, Trevor Hastie, Robert Tibshirani (2010). Regularization Paths for Generalized Linear Models via Coordinate Descent. Journal of Statistical Software, 33(1), 1-22. http://www.jstatsoft.org/v33/i01/.

See also

Examples

if (FALSE) { if(interactive()){ data("sailsim") f.basis <- function(i) splines::bs(i, degree = 3) cvfit <- cv.sail(x = sailsim$x[,1:10,drop=F], y = sailsim$y, e = sailsim$e, basis = f.basis, nfolds = 10) plot(cvfit) } }