Description Usage Arguments Value
Metropolis–Hastings algorithm for Bayesian variables selection with stochastic search. For sampling scheme, we use switch and swap proposal (Brown, Vannucci, Fearn (1998), JRSS B).
1 | BvsMH(covariate, Y, nMc, v1, v0, w, gamma0, a, b, phi)
|
covariate |
n by p covariate matrix (does not include the column of ones). |
Y |
continuous response, n by 1. |
nMc |
number of MCMC iterations. |
v1 |
p by 1 vector, the large s.d. of beta when gamma_j=1. |
v0 |
p by 1 vector, the small s.d. of beta when gamma_j=0. |
w |
the probablity that gamma_j=1 for each variable. |
a |
prior parameters for sigma^2. (Inverse Gamma parameters). |
b |
prior parameters for sigma^2. (Inverse Gamma parameters). |
gamma0:initial |
value of tao, contains zeros and ones. |
sample.gamma all posterior samples of gamma
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.