plot.ncvreg {ncvreg} | R Documentation |
Produces a plot of the coefficient paths for a fitted
"ncvreg"
object.
## S3 method for class 'ncvreg': plot(x, col, alpha=1, xlab, ylab=expression(hat(beta)), log.l=FALSE, shade=TRUE, ylim, ...)
x |
Fitted "ncvreg" model. |
col |
Color of coefficient lines. User can specify either a single color or a vector of colors, one for each coefficient. Defaults to an evenly spaced rainbow of colors. |
alpha |
Controls alpha-blending. Default is alpha=1. |
xlab |
Horizontal axis label. |
ylab |
Vertical axis label. |
log.l |
Should horizontal axis be on the log scale? Default is FALSE. |
shade |
Should nonconvex region be shaded? Default is TRUE. |
ylim |
Vertical axis limits. |
... |
Other graphical parameters to plot |
Patrick Breheny <patrick.breheny@uky.edu>
Breheny, P. and Huang, J. (2009) Coordinate descent algorithms for nonconvex penalized regression methods. Available at http://web.as.uky.edu/statistics/techreports/tr403/tr403.pdf.
ncvreg
data(prostate) X <- as.matrix(prostate[,1:8]) y <- prostate$lpsa fit <- ncvreg(X,y) plot(fit) plot(fit,color="black") plot(fit,log=TRUE)