plot.ncvreg {ncvreg}R Documentation

Plot coefficients from a "ncvreg" object

Description

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

Usage

## S3 method for class 'ncvreg':
plot(x, col, alpha=1, xlab, ylab=expression(hat(beta)), log.l=FALSE, shade=TRUE, ylim, ...)

Arguments

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

Author(s)

Patrick Breheny <patrick.breheny@uky.edu>

References

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.

See Also

ncvreg

Examples

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)

[Package ncvreg version 1.0 Index]