plot.grpnet {grpnet} | R Documentation |
Plot Regularization Path for grpnet Fits
Description
Creates a profile plot of the reguarlization paths for a fit group elastic net regularized GLM (grpnet) object.
Usage
## S3 method for class 'grpnet'
plot(x, type = c("coef", "imp", "norm", "znorm"),
newx, newdata, intercept = FALSE,
color.by.group = TRUE, col = NULL, ...)
Arguments
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 |
Details
Syntax and functionality were modeled after the plot.glmnet
function in the glmnet package (Friedman, Hastie, & Tibshirani, 2010).
Value
Produces a profile plot showing the requested type (y-axis) as a function of log(lambda)
(x-axis).
Note
If x
is a multinomial model, the coefficients for each response class are plotted in a separate plot.
Author(s)
Nathaniel E. Helwig <helwig@umn.edu>
References
Friedman, J., Hastie, T., & Tibshirani, R. (2010). Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software, 33(1), 1-22. 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. doi:10.1080/10618600.2024.2362232
See Also
grpnet
for fitting grpnet regularization paths
plot.cv.grpnet
for plotting cv.grpnet
objects
Examples
# see 'grpnet' for plotting examples
?grpnet