View source: R/plot.cv.cpernet.R
plot.cv.cpernet | R Documentation |
Plots the cross-validated curve, and upper and lower standard deviation
curves, as a function of the lambda
values used. This function is
modified based on the plot.cv.glmnet
function from the glmnet
package.
## S3 method for class 'cv.cpernet' plot(x, sign.lambda = 1, ...)
x |
fitted |
sign.lambda |
either plot against |
... |
other graphical parameters to plot |
A plot is produced.
Yuwen Gu and Hui Zou
Maintainer: Yuwen Gu <yuwen.gu@uconn.edu>
plot.cpernet
set.seed(1) n <- 100 p <- 400 x <- matrix(rnorm(n * p), n, p) y <- rnorm(n) tau <- 0.30 pf <- abs(rnorm(p)) pf2 <- abs(rnorm(p)) w <- 2.0 lambda2 <- 1 m2.cv <- cv.cpernet(y = y, x = x, w = w, tau = tau, eps = 1e-8, pf.mean = pf, pf.scale = pf2, standardize = FALSE, lambda2 = lambda2) plot(m2.cv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.