UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

Stata Data Analysis Examples
Zero-inflated Poisson Regression

Examples of Zero-inflated Poisson Regression

Example 1. School administrators study the attendance behavior of high school juniors at two schools. Predictors of the number of days of absence include gender of the student and standardized test scores in math and language arts.

Example 2. The state wildlife biologists want to model how many fish are being caught by fishermen at a state park. Visitors are asked how long they stayed, how many people were in the group, were there children in the group and how many fish were caught. Some visitors do not fish, but there is no data on whether a person fished or not. Some visitors who did fish did not catch any fish so there are excess zeros in the data because of the people that did not fish.

Description of the Data

Let's pursue Example 1 from above. This example uses the same data as the poisson, negative binomial and zero-inflated negative binomial regressions.

We have attendance data on 316 high school juniors from two urban high schools in the file poissonreg.dta The response variable of interest is days absent, daysabs. The variables math and langarts give the standardized test scores for math and language arts respectively. The variable male is a binary indicator of student gender.

In addition to predicting the number of days absent there is interest in predicting the existence of excess zeros, i.e., the probability that a student will have zero absences. We will use both male and school to investigate this.

Let's look at the data.

Some Strategies You Might Be Tempted To Try

Before we show how you can analyze this with a zero-inflated Poisson analysis, let's consider some other methods that you might use.

Stata Zero-inflated Poisson Analysis

The output looks very much like the output from an OLS regression. The output begins the iteration log giving the values of the log likelihoods starting with a model that has no predictors. The last value in the log is the final value of the log likelihood for the full model and is repeated below.

Next comes the header information. On the right-hand side the number of observations used (316) is given along with the likelihood ratio chi-squared with three degrees of freedom for the full model, followed by the p-value for the chi-square. The model, as a whole, is statistically significant. The header also includes a pseudo-R2 which is 0.0536 in this example.

Below the header you will find the poisson regression coefficients for each of the variables along with standard errors, z-scores, p-values and 95% confidence intervals for the coefficients. Following these, are probit coefficients for predicting excess zeros along with their standard errors, z-scores, p-values and confidence intervals.

Below the various coefficients you will find the results of the Vuong test. The Vuong test compares the zero-inflated model with an ordinary poisson regression model. A significant z-test indicates that the zero-inflated model is better.

Since math is clearly not significant, let's rerun the model without it.

Now, just to be on the safe side, let's rerun the zip command with the robust option in order to obtain robust standard errors for the poisson regression coefficients. We cannot include the vuong option when using robust standard errors.

Using the robust option has resulted in a fairly large change in the model chi-square, which is now a Wald chi-square, based on log pseudolikelihoods, instead of a likelihood ratio chi-square.

In the main body of the output contains the poisson and probit coefficients, robust standard errors, z-scores, p-values and 95% confidence intervals for the coefficients. The robust standard errors attempt to adjust for heterogeneity in the model.

Finally, we will use the prchange command (findit prchange) by J. Scott Long and Jeremy Freese to get the predicted change in days absent.

Sample Write-Up of the Analysis

Before we begin the sample write-up we need to get the output into a form more acceptable for publication. The estout command (findit estout by Ben Jann of ETH Zurich), will get us close to what we want. With a little bit of manual editing we can produce an acceptable table of the output. The zero-inflated poisson regression model predicting days absent from language arts and gender was statistically significant (chi-squared = 12.58, df = 2, p<.01). The predictors of excess zeros, school (1.15) and male (0.87) were both statistically significant. The count predictors langarts and male were also each statically significant. For these data, the expected log count for a one-unit increase in language arts was -0.01. This translates to a decrease of almost one day (0.999) absence for a one standard deviation increase in language arts when gender is held constant. Male students had an expected log count -0.25 less than female students which amounts to about 2.27 fewer days absent than females while holding language arts constant.

Cautions, Flies in the Ointment

  • It is not recommended that zero-inflated poisson models be applied to small samples. What constitutes a small sample does not seem to be clearly defined in the literature.
  • See Also

     

    How to cite this page

    Report an error on this page

    UCLA Researchers are invited to our Statistical Consulting Services
    We recommend others to our list of Other Resources for Statistical Computing Help
    These pages are Copyrighted (c) by UCLA Academic Technology Services


    The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California