n <- 32
p <- 10
s <- 99
x <- matrix( 1, nrow = n, ncol = p )
beta <- (1:10)/10
y <- x %*% beta
post_beta <- matrix(beta, nrow=p, ncol=s)
post_mu <- x %*% post_beta
fit <- HC(X=x, Y=post_mu, theta = post_beta,
penalty = "lasso",
method = "projection"
)
Run the code above in your browser using DataLab