zic.svs: SVS for Zero-Inflated Count Models

Description Usage Arguments Details Value References Examples

Description

zic.svs applies SVS to zero-inflated count models

Usage

1
2
3
4
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)

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.

g0.beta

The shape parameter for the inverse gamma prior on kappa_k^beta.

h0.beta

The inverse scale parameter for the inverse gamma prior on kappa_k^beta.

nu0.beta

Prior parameter for the spike of the hypervariances for the beta_k.

r0.beta

Prior parameter of omega^beta.

s0.beta

Prior parameter of omega^beta.

e0

The shape parameter for the inverse gamma prior on sigma^2.

f0

The inverse scale parameter the inverse gamma prior on sigma^2.

c0

The prior variance of gamma.

g0.delta

The shape parameter for the inverse gamma prior on kappa_k^delta.

h0.delta

The inverse scale parameter for the inverse gamma prior on kappa_k^delta.

nu0.delta

Prior parameter for the spike of the hypervariances for the delta_k.

r0.delta

Prior parameter of omega^delta.

s0.delta

Prior parameter of omega^delta.

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, tau_k^beta * kappa_k^beta), k=1,...,K

kappa_k^β ~ Inv-Gamma(g0^beta,h0^beta),

tau_k^β ~ (1-ω^beta) delta_(nu0^β)+ omega^beta delta_1,

omega^beta ~ Beta(r0^beta,s0^beta),

gamma ~ N(0,c0)

delta_k ~ N(0, tau_k^delta * kappa_k^delta), k=1,...,K,

kappa_k^δ ~ Inv-Gamma(g0^delta,h0^delta),

tau_k^δ ~ (1-ω^delta) delta_(nu_0^δ)+ omega^delta delta_1,

omega^delta ~ Beta(r0^delta,s0^delta),

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

I.beta

Posterior draws of indicator whether tau_j^beta is one (coda mcmc object).

I.delta

Posterior draws of indicator whether tau_j^delta is one (coda mcmc object).

omega.beta

Posterior draws of omega^beta (coda mcmc object).

omega.delta

Posterior draws of omega^delta (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
7
8
9
## 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 )
## End(Not run)

zic documentation built on May 2, 2019, 11:11 a.m.

Related to zic.svs in zic...