# zic: Bayesian Inference for Zero-Inflated Count Models In zic: Bayesian Inference for Zero-Inflated Count Models

## Description

`zic` fits zero-inflated count models via Markov chain Monte Carlo methods.

## Usage

 ```1 2``` ```zic(formula, data, a0, b0, c0, d0, e0, f0, n.burnin, n.mcmc, n.thin, tune = 1.0, scale = TRUE) ```

## Arguments

 `formula` A symbolic description of the model to be fit specifying the response variable and covariates. `data` A data frame in which to interpret the variables in `formula`. `a0` The prior variance of alpha. `b0` The prior variance of beta_j. `c0` The prior variance of gamma. `d0` The prior variance of delta_j. `e0` The shape parameter for the inverse gamma prior on sigma^2. `f0` The inverse scale parameter the inverse gamma prior on sigma^2. `n.burnin` Number of burn-in iterations of the sampler. `n.mcmc` Number of iterations of the sampler. `n.thin` Thinning interval. `tune` Tuning parameter of Metropolis-Hastings step. `scale` If true, all covariates (except binary variables) are rescaled by dividing by their respective standard errors.

## Details

The considered zero-inflated count model is given by

y*_i ~ Poisson[exp(eta*_i)],

eta*_i = x_i' * beta + epsilon_i, epsilon_i ~ N( 0, sigma^2 ),

d*_i = x_i' * delta + nu_i, nu_i ~ 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 ~ N(0,a0),

beta_k ~ N(0,b0), k=1,...,K,

gamma ~ N(0,c0)

delta_k ~ N(0,d0), k=1,...,K,

sigma^2 ~ Inv-Gamma(e0,f0).

The sampling algorithm described in Jochmann (2013) is used.

## Value

A list containing the following elements:

 `alpha` Posterior draws of alpha (coda mcmc object). `beta` Posterior draws of beta (coda mcmc object) . `gamma` Posterior draws of gamma (coda mcmc object). `delta` Posterior draws of delta (coda mcmc object). `sigma2` Posterior draws of sigma^2 (coda mcmc object). `acc` Acceptance rate of the Metropolis-Hastings step.

## References

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.

## Examples

 ```1 2 3 4 5 6``` ```## Not run: data( docvisits ) mdl <- docvisits ~ age + agesq + health + handicap + hdegree + married + schooling + hhincome + children + self + civil + bluec + employed + public + addon post <- zic( f, docvisits, 10.0, 10.0, 10.0, 10.0, 1.0, 1.0, 1000, 10000, 10, 1.0, TRUE ) ## End(Not run) ```

zic documentation built on Aug. 22, 2017, 5:06 p.m.