Learn R Programming

ncvreg (version 3.8-0)

plot.ncvreg: Plot coefficients from a "ncvreg" object

Description

Produces a plot of the coefficient paths for a fitted "ncvreg" object.

Usage

"plot"(x, alpha=1, log.l=FALSE, shade=TRUE, ...)

Arguments

x
Fitted "ncvreg" model.
alpha
Controls alpha-blending, helpful when the number of covariates is large. Default is alpha=1.
log.l
Should horizontal axis be on the log scale? Default is FALSE.
shade
Should nonconvex region be shaded? Default is TRUE.
...
Other graphical parameters to plot

References

Breheny, P. and Huang, J. (2011) Coordinate descent algorithms for nonconvex penalized regression, with applications to biological feature selection. Ann. Appl. Statist., 5: 232-253.

See Also

ncvreg

Examples

Run this code
data(prostate)
X <- as.matrix(prostate[,1:8])
y <- prostate$lpsa

fit <- ncvreg(X,y)
plot(fit)
plot(fit,col="black")
plot(fit,log=TRUE)

Run the code above in your browser using DataLab