Zero-inflated Negative Binomial
The Zero-inflated Negative Binomial (ZINB) model adresses both zero inflation and overdispersion in the data. It can be expressed as:
\begin{equation*} X_j \sim (1-\pi_j)\; \mathds{1}_{w_j=0} + \pi_j\; \operatorname{NegativeBinomial}(\mu_j, r) \end{equation*}where the \(w_j\) are indivicator variables such that \(w_j=x_j=0\) with probability \(1-\pi_j\) and \(w_j=1\) with probability \(\pi_j\). We typically model the \(w_j\) using a logistic model.
Sample
We can use the method described in to sample the ZINB model with a logistic mode:
- Use the Gibbs sampler in to sample the parameter of the logistic regression model;
- Use the Gibbs sampler in to sample the parameter of the negative binomial;
- Update \(r\) using a MCMC step;
- Update the \(w_j\) from their discrete full conditional distributions.