Learn R Programming

gcdnet (version 1.0.5)

plot.gcdnet: Plot coefficients from a "gcdnet" object

Description

Produces a coefficient profile plot of the coefficient paths for a fitted gcdnet object. This function is modified based on the plot function from the glmnet package.

Usage

# S3 method for gcdnet
plot(x, xvar = c("norm", "lambda"), color = FALSE, label = FALSE, ...)

Arguments

x

fitted gcdnet model

xvar

what is on the X-axis. "norm" plots against the L1-norm of the coefficients, "lambda" against the log-lambda sequence.

color

if TRUE, plot the curves with rainbow colors. FALSE is gray colors. Default is FALSE

label

if TRUE, label the curves with variable sequence numbers. Default is FALSE

...

other graphical parameters to plot

Author

Yi Yang, Yuwen Gu and Hui Zou
Maintainer: Yi Yang <yi.yang6@mcgill.ca>

Details

A coefficient profile plot is produced.

References

Yang, Y. and Zou, H. (2012), "An Efficient Algorithm for Computing The HHSVM and Its Generalizations," Journal of Computational and Graphical Statistics, 22, 396-415.
BugReport: https://github.com/emeryyi/fastcox.git

Friedman, J., Hastie, T., and Tibshirani, R. (2010), "Regularization paths for generalized linear models via coordinate descent," Journal of Statistical Software, 33, 1.
http://www.jstatsoft.org/v33/i01/

Examples

Run this code
data(FHT)
m1 = gcdnet(x=FHT$x,y=FHT$y)
par(mfrow=c(1,3))
plot(m1) # plots against the L1-norm of the coefficients
plot(m1,xvar="lambda",label=TRUE) # plots against the log-lambda sequence
plot(m1,color=TRUE)

Run the code above in your browser using DataLab