plot.grpnet: plot coefficients from a "grpnet" object

View source: R/wrappers.R

plot.grpnetR Documentation

plot coefficients from a "grpnet" object

Description

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

Usage

## S3 method for class 'grpnet'
plot(x, sign.lambda = -1, glm.name = TRUE, ...)

Arguments

x

fitted "grpnet" model

sign.lambda

This determines whether we plot against log(lambda) or its negative. values are -1(default) or 1

glm.name

This is a logical (default TRUE), and causes the glm name of the model to be included in the plot.

...

Other graphical parameters to plot

Details

A coefficient profile plot is produced. If x is a multinomial or multigaussian model, the 2norm of the vector of coefficients is plotted.

Author(s)

James Yang, Trevor Hastie, and Balasubramanian Narasimhan
Maintainer: Trevor Hastie hastie@stanford.edu

References

Yang, James and Hastie, Trevor. (2024) A Fast and Scalable Pathwise-Solver for Group Lasso and Elastic Net Penalized Regression via Block-Coordinate Descent. arXiv \Sexpr[results=rd]{tools:::Rd_expr_doi("10.48550/arXiv.2405.08631")}.

See Also

grpnet, and print, and coef methods, and cv.grpnet.

Examples

x=matrix(rnorm(100*20),100,20)
y=rnorm(100)
fit1=grpnet(x,glm.gaussian(y))
plot(fit1)
g4=diag(4)[sample(1:4,100,replace=TRUE),]
fit2=grpnet(x,glm.multinomial(g4))
plot(fit2,lwd=3)
fit3=grpnet(x,glm.gaussian(y),groups=c(1,5,9,13,17))
plot(fit3)

adelie documentation built on Sept. 11, 2024, 6:36 p.m.