I'm trying to reproduce the graphics similar of Park and Caella (The Bayesian Lasso - 2008) in R, but the structure of the Bayesian Lasso is different of the Ordinary Lasso.
I found how to plot lasso beta coefficients (it's perfect!) but I would like to create the same graphics using Bayesian Lasso beta coefficients and so on compare two models, Bayesian lasso and ordinary lasso side by side.
I used the same data base and command from the link above
#Lasso
library(MASS)
library(glmnet)
Boston=na.omit(Boston)
x=model.matrix(crim~.,Boston)[,-1]
rownames(x)=c()
y=as.matrix(Boston$crim)
lasso.mod =glmnet(x,y, alpha =1, lambda = 0.1)
plot(lasso.mod, "norm", label = TRUE)
# For Bayesian Lasso I used this one:
# Bayesian Lasso
burnin <- 500
iter <- 1000
init_beta <- rep(-500, dim(x)[2])
ini_lambda2 <- 10
ini_var <- 500
ini_tau <- 2
# Starting Gibbs sampler
blasso.mod <- blasso(X = x, y = y, T = iter,
beta = init_beta,
lambda2 = ini_lambda2,
s2 = ini_var)