zero_nb: Zero-Inflated Negative Binomial Regression Model

Description Usage Arguments Details Value Author(s)

Description

zero_nb is used to fit zero-inflated negative binomial regression models to count data via Bayesian inference.

Usage

1
2
3
zero_nb(y, x, size, a = 1, b = 1, mu.start = 1, beta.prior.mean = 0,
  beta.prior.sd = 1, iters = 1000, burn = 500, nthin = 1, plots = T,
  progress.bar = T)

Arguments

y

numeric response vector.

x

numeric predictor matrix.

size

size parameter for negative binomial likelihood distributions.

a

shape parameter for gamma prior distributions.

b

rate parameter for gamma prior distributions.

mu.start

initial value for mu parameter.

beta.prior.mean

mu parameter for normal prior distributions.

beta.prior.sd

standard deviation for normal prior distributions.

iters

number of iterations for the Markov chain to run.

burn

numeric burn-in length.

nthin

numeric thinning rate.

plots

logical operator. TRUE to output plots.

progress.bar

logical operator. TRUE to print progress bar.

Details

Fits a zero-inflated negative binomial (ZINB) model.

Value

zero_nb returns a list which includes the items

mu

numeric vector; posterior distribution of mu parameter

beta

numeric matrix; posterior distributions of regression coefficients

p

numeric vector; posterior distribution of parameter 'p', the probability of a given zero observation belonging to the model's zero component

ll

numeric vector; posterior log-likelihood

Author(s)

Taylor Trippe <ttrippe@luc.edu>
Earvin Balderama <ebalderama@luc.edu>


hurdlr documentation built on May 2, 2019, 3:19 p.m.

Related to zero_nb in hurdlr...