Description Usage Arguments Value References Examples
View source: R/StatComp21038R.R
A function that can complete the Bayesian Lasso Regression and can use empirical bayes and hyperpriors method.
1 2 3 4 5 6 7 8 9 10 11 12 | BayesianLasso(
x,
y,
center = T,
scale = T,
a=1,
b=1,
n.max = 10000,
E = TRUE,
r = 1,
d = 1
)
|
x |
predictor variables |
y |
response variable |
center |
TRUE/FALSE (default: TRUE, if the design matrix x has been centered) |
scale |
TRUE/FALSE (default: TRUE, if the design matrix x has been scaled) |
a, b |
parameter of sigma2's prior, default 1,1, if a=0,b=0, means the prior of sigma2 is 1/sigma2 |
n.max |
n of interations (default: 10000) |
E |
TRUE/FALSE (default: TRUE, estimating lambda by empircal bayes; FALSE, estimating lambda by Hyperprior method.) |
r, d |
hyper-Gamma prior for lambda^2 if E = FALSE |
beta: the median of matrix Beta.
tau2: the median of matrix Tau2
sigma2: the median of vector Sigma2
lambda: the median of vector Lambda
Park, Trevor, and George Casella. "The bayesian lasso." Journal of the American Statistical Association 103.482 (2008): 681-686.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.