

In the zero-inflated Poisson (ZIP) regression model, the data generation process that is referred to earlier as Process 2 is
where
. Thus the ZIP model is defined as

The conditional expectation and conditional variance of
are given by
Note that the ZIP model (as well as the ZINB model) exhibits overdispersion because
.
In general, the log-likelihood function of the ZIP model is
After a specific link function (either logistic or standard normal) for the probability
is chosen, it is possible to write the exact expressions for the log-likelihood function and the gradient.
First, consider the ZIP model in which the probability
is expressed using a logistic link function—namely,
The log-likelihood function is
![\begin{eqnarray*} \mathcal{L} & = & \sum _{\{ i: y_{i}=0\} } w_ i\ln \left[\exp (\mathbf{z}_{i}’\bgamma )+\exp (-\exp (\mathbf{x}_{i}’\bbeta )) \right] \\ & & + \sum _{\{ i: y_{i}>0\} }w_ i\left[y_{i} \mathbf{x}_{i}’\bbeta -\exp (\mathbf{x}_{i}’\bbeta ) - \sum _{k=2}^{y_{i}}\ln (k) \right] \\ & & - \sum _{i=1}^{N}w_ i\ln \left[ 1 + \exp (\mathbf{z}_{i}’\bgamma ) \right] \end{eqnarray*}](images/etsug_countreg0196.png)
See the section Poisson Regression for the definition of
.
The gradient for this model is given by
Next, consider the ZIP model in which the probability
is expressed using a standard normal link function:
. The log-likelihood function is
![\begin{eqnarray*} \mathcal{L} & = & \sum _{\{ i: y_{i}=0\} }w_ i\ln \left\{ \Phi (\mathbf{z}_{i}’\bgamma ) + \left[ 1- \Phi (\mathbf{z}_{i}’\bgamma )\right] \exp (-\exp (\mathbf{x}_{i}’\bbeta )) \right\} \\ & + & \sum _{\{ i: y_{i}>0\} }w_ i\left\{ \ln \left[ \left( 1-\Phi (\mathbf{z}_{i}’\bgamma )\right) \right] - \exp (\mathbf{x}_{i}’\bbeta ) + y_{i} \mathbf{x}_{i}’\bbeta - \sum _{k=2}^{y_{i}} \ln (k) \right\} \end{eqnarray*}](images/etsug_countreg0200.png)
See the section Poisson Regression for the definition of
.
The gradient for this model is given by
![\begin{eqnarray*} \frac{\partial \mathcal{L}}{\partial \bgamma } & = & \sum _{\{ i: y_{i}=0\} } w_ i\frac{\varphi (\mathbf{z}_{i}'\bgamma )\left[ 1-\exp (-\exp (\mathbf{x}_{i}'\bbeta )) \right]}{\Phi (\mathbf{z}_{i}'\bgamma ) + \left[ 1 - \Phi (\mathbf{z}_{i}'\bgamma ) \right] \exp (-\exp (\mathbf{x}_{i}'\bbeta ))} \mathbf{z}_{i} \\ & - & \sum _{\{ i: y_{i}>0\} } w_ i\frac{\varphi (\mathbf{z}_{i}'\bgamma )}{\left[ 1 - \Phi (\mathbf{z}_{i}'\bgamma ) \right]} \mathbf{z}_{i} \end{eqnarray*}](images/etsug_countreg0201.png)
![\begin{eqnarray*} \frac{\partial \mathcal{L}}{\partial \bbeta } & = & \sum _{\{ i: y_{i}=0\} } w_ i\frac{-\left[1-\Phi (\mathbf{z}_{i}'\bgamma )\right] \exp (\mathbf{x}_{i}'\bbeta ) \exp (-\exp (\mathbf{x}_{i}'\bbeta ))}{\Phi (\mathbf{z}_{i}'\bgamma ) + \left[ 1 - \Phi (\mathbf{z}_{i}'\bgamma ) \right] \exp (-\exp (\mathbf{x}_{i}'\bbeta ))} \mathbf{x}_{i} \\ & + & \sum _{\{ i: y_{i}>0\} } w_ i\left[y_{i}-\exp (\mathbf{x}_{i}’\bbeta ) \right] \mathbf{x}_{i} \end{eqnarray*}](images/etsug_countreg0202.png)