plot.spikeslab {spikeslab} | R Documentation |
Plots for Spike and Slab Analysis
Description
Plots either the gnet solution path or the cross-validated mean-squared-error (the latter only applies when cross-validation is used).
Usage
## S3 method for class 'spikeslab'
plot(x, plot.type = c("path", "cv"), breaks = FALSE, ...)
Arguments
x |
An object of class |
plot.type |
Choosing "path" produces a plot of the gnet solution
path. The choice "cv" produces the mean-squared error plot. The
latter applies only to objects from a |
breaks |
If TRUE, then vertical lines are drawn at each break point in the gnet solution path. |
... |
Further arguments passed to or from other methods. |
Author(s)
Hemant Ishwaran (hemant.ishwaran@gmail.com)
J. Sunil Rao (rao.jsunil@gmail.com)
Udaya B. Kogalur (ubk@kogalur.com)
References
Efron B., Hastie T., Johnstone I., and Tibshirani R. (2004). Least angle regression (with discussion). Ann. Statist., 32:407-499.
Ishwaran H. and Rao J.S. (2010). Generalized ridge regression: geometry and computational solutions when p is larger than n.
See Also
spikeslab, cv.spikeslab
.
Examples
## Not run:
#------------------------------------------------------------
# Example 1: diabetes data
#------------------------------------------------------------
data(diabetesI, package = "spikeslab")
obj <- spikeslab(Y ~ . , diabetesI, verbose = TRUE)
plot(obj, plot.type = "path")
## End(Not run)