plot.grpnet | R Documentation |
Creates a profile plot of the reguarlization paths for a fit group elastic net regularized GLM (grpnet) object.
## S3 method for class 'grpnet'
plot(x, type = c("coef", "imp", "norm", "znorm"),
newx, newdata, intercept = FALSE,
color.by.group = TRUE, col = NULL, ...)
x |
Object of class "grpnet" |
type |
What to plot on the Y-axis: "coef" for coefficient values, "imp" for importance of each group's contribution, "norm" for L2 norm of coefficients for each group, or "znorm" for L2 norm of standardized coefficients for each group. |
newx |
Matrix of new |
newdata |
Data frame of new |
intercept |
Should the intercept be included in the plot? |
color.by.group |
If |
col |
If |
... |
Additional arguments passed to the |
Syntax and functionality were modeled after the plot.glmnet
function in the glmnet package (Friedman, Hastie, & Tibshirani, 2010).
Produces a profile plot showing the requested type (y-axis) as a function of log(lambda)
(x-axis).
If x
is a multinomial model, the coefficients for each response class are plotted in a separate plot.
Nathaniel E. Helwig <helwig@umn.edu>
Friedman, J., Hastie, T., & Tibshirani, R. (2010). Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software, 33(1), 1-22. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v033.i01")}
Helwig, N. E. (2024). Versatile descent algorithms for group regularization and variable selection in generalized linear models. Journal of Computational and Graphical Statistics. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/10618600.2024.2362232")}
grpnet
for fitting grpnet regularization paths
plot.cv.grpnet
for plotting cv.grpnet
objects
# see 'grpnet' for plotting examples
?grpnet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.