zic.svs applies SVS to zero-inflated count models
zic.svs(formula, data,
a0, g0.beta, h0.beta, nu0.beta, r0.beta, s0.beta, e0, f0,
c0, g0.delta, h0.delta, nu0.delta, r0.delta, s0.delta,
n.burnin, n.mcmc, n.thin, tune = 1.0, scale = TRUE)A symbolic description of the model to be fit specifying the response variable and covariates.
A data frame in which to interpret the variables in formula.
The prior variance of \(\alpha\).
The shape parameter for the inverse gamma prior on \(\kappa_k^\beta\).
The inverse scale parameter for the inverse gamma prior on \(\kappa_k^\beta\).
Prior parameter for the spike of the hypervariances for the \(\beta_k\).
Prior parameter of \(\omega^\beta\).
Prior parameter of \(\omega^\beta\).
The shape parameter for the inverse gamma prior on \(\sigma^2\).
The inverse scale parameter the inverse gamma prior on \(\sigma^2\).
The prior variance of \(\gamma\).
The shape parameter for the inverse gamma prior on \(\kappa_k^\delta\).
The inverse scale parameter for the inverse gamma prior on \(\kappa_k^\delta\).
Prior parameter for the spike of the hypervariances for the \(\delta_k\).
Prior parameter of \(\omega^\delta\).
Prior parameter of \(\omega^\delta\).
Number of burn-in iterations of the sampler.
Number of iterations of the sampler.
Thinning interval.
Tuning parameter of Metropolis-Hastings step.
If true, all covariates (except binary variables) are rescaled by dividing by their respective standard errors.
A list containing the following elements:
Posterior draws of \(\alpha\) (coda mcmc object).
Posterior draws of \(\beta\) (coda mcmc object).
Posterior draws of \(\gamma\) (coda mcmc object).
Posterior draws of \(\delta\) (coda mcmc object).
Posterior draws of \(\sigma^2\) (coda mcmc object).
Posterior draws of indicator whether \(\tau_j^\beta\) is one (coda mcmc object).
Posterior draws of indicator whether \(\tau_j^\delta\) is one (coda mcmc object).
Posterior draws of \(\omega^\beta\) (coda mcmc object).
Posterior draws of \(\omega^\delta\) (coda mcmc object).
Acceptance rate of the Metropolis-Hastings step.
The considered zero-inflated count model is given by $$y_i^* \sim \mathrm{Poisson}[\exp(\eta^*_i)],$$ $$\eta^*_i = \alpha + x_i'\beta + \varepsilon_i,\; \varepsilon_i \sim \mathrm{N}(0,\sigma^2),$$ $$d_i^* = \gamma + x_i'\delta + \nu_i,\; \nu_i \sim \mathrm{N}(0,1),$$ $$y_i = 1(d_i^*>0)y_i^*,$$ where \(y_i\) and \(x_i\) are observed. The assumed prior distributions are $$\alpha \sim \mathrm{N}(0,a_0),$$ $$\beta_k\sim \mathrm{N}(0,\tau^\beta_k\kappa^\beta_k),, \quad k=1,\ldots,K,$$ $$\kappa^\beta_j\sim\textrm{Inv-Gamma}(g_0^\beta,h_0^\beta),$$ $$\tau_k^\beta \sim (1-\omega^\beta)\delta_{\nu^\beta_0}+\omega^\beta\delta_1,$$ $$\omega^\beta\sim\mathrm{Beta}(r_0^\beta,s_0^\beta),$$ $$\gamma \sim \mathrm{N}(0,c_0),$$ $$\delta_k\sim \mathrm{N}(0,\tau^\delta_k\kappa^\delta_k), \quad k=1,\ldots,K,$$ $$\kappa^\delta_k\sim\textrm{Inv-Gamma}(g_0^\delta,h_0^\delta),$$ $$\tau_k^\delta \sim (1-\omega^\delta)\delta_{\nu^\delta_0}+\omega^\delta\delta_1,$$ $$\omega^\delta\sim\mathrm{Beta}(r_0^\delta,s_0^\delta),$$ $$\sigma^2 \sim \textrm{Inv-Gamma}\left(e_0,f_0\right).$$
The sampling algorithm described in Jochmann (2013) is used.
Jochmann, M. (2013). ``What Belongs Where? Variable Selection for Zero-Inflated Count Models with an Application to the Demand for Health Care'', Computational Statistics, 28, 1947--1964.
# NOT RUN {
data( docvisits )
mdl <- docvisits ~ age + agesq + health + handicap + hdegree + married + schooling +
hhincome + children + self + civil + bluec + employed + public + addon
post <- zic.ssvs( mdl, docvisits,
10.0, 5.0, 5.0, 1.0e-04, 2.0, 2.0, 1.0, 1.0,
10.0, 5.0, 5.0, 1.0e-04, 2.0, 2.0,
1000, 10000, 10, 1.0, TRUE )
# }
Run the code above in your browser using DataLab