BvsMH: Metropolis–Hastings algorithm for Bayesian variables...

Description Usage Arguments Value

View source: R/bvs_mh.R

Description

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).

Usage

1
BvsMH(covariate, Y, nMc, v1, v0, w, gamma0, a, b, phi)

Arguments

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.

Value

sample.gamma all posterior samples of gamma


jlin-vt/SML documentation built on Dec. 5, 2019, 2:05 a.m.