Learn R Programming

spikeslab (version 1.1.6)

plot.spikeslab: 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 spikeslab
plot(x, plot.type = c("path", "cv"), breaks = FALSE, ...)

Arguments

x

An object of class spikeslab.

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 cv.spikeslab call.

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.

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

Run this code
# NOT RUN {
#------------------------------------------------------------
# Example 1: diabetes data
#------------------------------------------------------------

data(diabetesI, package = "spikeslab")
obj <- spikeslab(Y ~ . , diabetesI, verbose = TRUE)
plot(obj, plot.type = "path")
# }

Run the code above in your browser using DataLab