Learn R Programming

rqPen (version 2.3)

cv_plots: Plots of Cross-validation results

Description

Slightly misnamed as user could choose BIC as a criteria for "cv.rq.pen" object. Function is able to discern between the two types of evaluation criteria and provides appropriate labels for the plot.

Usage

cv_plots(model,logLambda=TRUE,loi=NULL,...)

Value

Plot of how cross validation statistic changes with lambda.

Arguments

model

"cv.rq.pen" object.

logLambda

Plot of lambdas is on the log scale.

loi

Index of lambdas to be plotted. Default is all of the lambdas from "cv.rq.pen" object.

...

Additional items to be sent to plot function.

Author

Ben Sherwood

Examples

Run this code
x <- matrix(rnorm(100),nrow=20)
y <- 1 + x[,1] - 3*x[,5] + rnorm(20)
lassoModels <- cv.rq.pen(x,y)
cv_plot <- cv_plots(lassoModels)

Run the code above in your browser using DataLab