Description Usage Arguments Value References Examples
View source: R/StatComp21038R.R
A function that can complete the Bayesian Lasso Regression and get the prediction or MSE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Bayespredmse(
x,
y,
x1 = as.matrix(0, 1, 1),
center = T,
scale = T,
a = 1,
b = 1,
n.max = 10000,
E = TRUE,
r = 1,
d = 1,
pred = T
)
|
x |
predictor variables |
y |
response variable |
x1 |
a matrix which should be given if pred = T |
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 |
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 |
pred |
TRUE/FALSE (default: TRUE, we need the prediction; FALSE, we need the MSE) |
pred: the prediction
MSE: the MSE
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.