The command countfit will be used to compare the fit of the Poisson regression, negative binomial regression, and zero-inflated Poisson regression. This produces a number of different estimates and tests, as well as a graph.
More informationhelp countfit |
Practical example
We will adapt the multiple regression model that we have worked with earlier:
countfit children siblings sex ib1.educ if pop_poisson==1, prm nbreg zip |
| Note prm=Poisson, nbreg=negative binomial, and zip=zero-inflated. |
This will produce a serious amount of output. We will include one portion at a time here.

The most interesting here is Statistics part, where we get the values for the Bayesian Information Criterion (BIC) and the Akaike Information Criterion (AIC). These can be seen as relative measure of model fit: the lower the values, the better. We note that the BIC and AIC values are lowest for the zero-inflated Poisson model, indicating that this model has the best fit.

This part of the output ties back to the BIC and AIC statistics. The results here support what we already concluded: the zero-inflated Poisson model is preferable over the Poisson model and negative binomial model.

The first part shows a comparison between the mean observed and predicted counts, followed by the predicted and actual probabilities for each value of children, separate for the three models. The maximum difference is smallest for the zero-inflated Poisson model, which supports this as the preferable model. It is also interesting to note the difference between the actual and predicted probabilities specifically for the value 0, for the three models. Again, the difference is smallest for the ZIP model.

This graph plots the observed (actual) minus predicted probabilities seen in the table. Positive deviations reflect underprediction and negative deviations reflect overprediction. The negative binomial (NBRM) and Poisson (PRM) models tend to underpredict the value 0 and overpredict the value 1, while the zero-inflated Poisson model does a better job across the whole scale.