plot.glmpathcr {glmpathcr} | R Documentation |
Plots the Regularization Path Computed from glmpathcr
Description
This function takes a glmpathcr
object and visualizes the regularization path. The horizontal axis can be norm
, lambda
or step
. The vertical axis can be coefficients
, aic
or bid
.
Usage
## S3 method for class 'glmpathcr'
plot(x, xvar = c("norm", "lambda", "step"),
type = c("coefficients", "aic", "bic"), xlimit = NULL, predictor = FALSE,
omit.zero = TRUE, breaks = FALSE, mar = NULL, eps = .Machine$double.eps,
main = NULL, ...)
Arguments
x |
a |
xvar |
horizontal axis. |
type |
type of the plot, or the vertical axis. Default is |
xlimit |
When the user wants to visualize a (beginning) sub-part of the plot, |
predictor |
If |
omit.zero |
If |
breaks |
If |
mar |
margin relative to the current font size |
eps |
an effective zero |
main |
title of the plot |
... |
other options for the plot |
Note
This function is essentially the same as plot.glmpath
from the glmpath package by Park and Hastie but was designed to operate on a returned glmpathcr
object.
Author(s)
Mee Young Park and Trevor Hastie; Kellie J. Archer archer.43@osu.edu used here for new glmpathcr
class
References
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
See Also
See also glmpathcr
, predict.glmpathcr
Examples
data(diabetes)
x <- diabetes[, 2:dim(diabetes)[2]]
y <- diabetes$y
fit <- glmpathcr(x, y)
plot(fit, xvar="norm")