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

Description Usage Arguments Author(s) References See Also Examples

View source: R/plot.SSLASSO.R

Description

Produces a plot of the coefficient paths for a fitted "SSLASSO" object.

Usage

1
2
## S3 method for class 'SSLASSO'
plot(x, ...)

Arguments

x

Fitted "SSLASSO" model.

...

Other graphical parameters to plot.

Author(s)

Veronika Rockova <[email protected]>

References

Rockova, V. and George, E.I. (2018) The Spike-and-Slab LASSO. Journal of the American Statistical Association.

See Also

SSLASSO

Examples

 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)

SSLASSO documentation built on Aug. 29, 2018, 1:03 a.m.