# What is expected count formula for zero-inflated negative binomial regression?

My IT department wants me to translate my zero-inflated negative binomial regression model into a formula for calculating expected count which they can hard code into SQL. I'm running the model in SAS, which outputs coefficients for both the logistic regression and negative binomial components of the model.

Is this the correct formula for calculating the expected count?

$E(y)=p_{i}\times 0+(1-p_{i})\times {\mu_{i}}=0+\left (1- \frac{1}{{{1+e^{-X\beta} }}} \right )\times e^{X\gamma }=\left ( \frac{1}{1+e^{X\beta }} \right )\times e^{X\gamma }$

where the $\beta$ vector contains the logistic regression coefficients and $\gamma$ contains the negative binomial regression coefficients.

I think what threw me off is that the expected count for the negative binomial portion is just a simple log link function.

Thanks!

• Yes, that looks good. The regressors between the two parts may vary though but I'm not sure whether you use that feature in your application. This and other formulas are also provided in: jstatsoft.org/v27/i08. – Achim Zeileis Jul 11 '15 at 8:15
• @AchimZeileis - Thank you! By the way, I recently discovered a new R package, mpath, that performs penalized regression on zero-inflated models. – RobertF Jul 12 '15 at 20:01