Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot-ncvreg

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, alpha=1, log.l=FALSE, shade=TRUE, col, ...)

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.

col

Vector of colors for coefficient lines. By default, evenly spaced colors are selected automatically.

...

Other graphical parameters to plot

Author(s)

Patrick Breheny

References

Breheny P and Huang J. (2011) Coordinate descentalgorithms for nonconvex penalized regression, with applications to biological feature selection. Annals of Applied Statistics, 5: 232-253. doi: 10.1214/10-AOAS388

See Also

Examples

data(Prostate)

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

ncvreg

Regularization Paths for SCAD and MCP Penalized Regression Models

v3.13.0
GPL-3
Authors
Patrick Breheny [aut, cre] (<https://orcid.org/0000-0002-0650-1119>)
Initial release
2021-03-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.