Learn R Programming

cxreg (version 1.0.0)

plot.cv.classo: plot the cross-validation curve produced by cv.classo

Description

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

Usage

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

Value

No return value, called for side effects (produces a plot).

Arguments

x

fitted "cv.classo" object

sign.lambda

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

...

Other graphical parameters to plot.

Author

Navonil Deb, Younghoon Kim, Sumanta Basu
Maintainer: Younghoon Kim yk748@cornell.edu

Details

A plot is produced, and nothing is returned.

See Also

classo and plot methods for "cv.classo".

Examples

Run this code
# \donttest{ 
set.seed(1010)
n = 1000
p = 200
x = array(rnorm(n*p), c(n,p)) + (1+1i) * array(rnorm(n*p), c(n,p))
for (j in 1:p) x[,j] = x[,j] / sqrt(mean(Mod(x[,j])^2))
e = rnorm(n) + (1+1i) * rnorm(n)
b = c(1, -1, rep(0, p-2)) + (1+1i) * c(-0.5, 2, rep(0, p-2))
y = x %*% b + e
cv.test = cv.classo(x,y)
plot(cv.test)
# }

Run the code above in your browser using DataLab