BLasso: Bayesian Lasso by Gibbs Sampler

Description Usage Arguments Value References Examples

View source: R/BLasso_Gibbs_Joo.R

Description

Provide two options for the estimation of penalty parameter "lambda"

Usage

1
BLasso(x, y, n.max = 10000, EB = TRUE, a = 1, b = 1, print.it = FALSE)

Arguments

a,

b: specify these for a hyper-Gamma prior for lambda^2 if EB = FALSE

print.it

= TRUE/FALSE (default: FALSE, suppressing to print the number of iterations)

x:

predictor variables (numertic only)

y:

outcome (numertic only)

n.max:

n of interations (default: 10000)

EB:

TRUE/FALSE (default: TRUE, estimating lambda by empircal bayes)

Value

beta

beta.95q: 95 % (posterior) CI of beta

beta.sig: standard deviation of beta

tau2.95q: 95 % CI of tau2

sigma.95q: 95 % CI of sigma2

lambda: penalty, or global scale

lambda.95q: 95

References

Park, Trevor, and George Casella. "The bayesian lasso." Journal of the American Statistical Association 103.482 (2008): 681-686.

Examples

1
ex1<-BLasso(x=data1[,-1], y=data1[,1]); ex1$beta; ex1$lambda; sum(ex1$beta.95q[1,]*ex1$beta.95q[2,]>0); #n of selected variables#

lijinsgithub/BLasso documentation built on May 21, 2019, 6:15 a.m.