Description Usage Arguments Author(s) References See Also Examples
Produces a plot of the coefficient paths for a fitted
"SSLASSO"
object.
1 2 |
x |
Fitted |
... |
Other graphical parameters to plot. |
Veronika Rockova <Veronika.Rockova@chicagobooth.edu>
Rockova, V. and George, E.I. (2018) The Spike-and-Slab LASSO. Journal of the American Statistical Association.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
## Linear regression, where p>n
library(SSLASSO)
n=100
p=1000
X=matrix(rnorm(n*p), n, p)
beta=c(1,2,3,rep(0,p-3))
Y=X[,1]*beta[1]+X[,2]*beta[2]+X[,3]*beta[3]+rnorm(n)
lambda1<-0.1
lambda0<-seq(lambda1,100,length=50)
theta<-0.5
# Separable penalty with fixed theta
result<-SSLASSO(X, Y,penalty="separable", variance = "fixed",
lambda1 = lambda1, lambda0 = lambda0,theta=theta)
plot(result)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.