Poisson Regression Over-dispersion Tests

Introduction

As explained in Poisson Regression using Solver, a value of phi > 1 indicates overdispersion. We now describe two tests for overdispersion.

Score Test

Basic Concepts

The score test can be used to determine whether the dispersion assumption (mean = variance) for Poisson regression is being violated. To perform this test, we first calculate the values:

Score test z values

We then create a linear regression model regressing these zi values with no regressors (except the intercept). This is equivalent to setting the regression coefficient = the mean of the zi values and the standard error equal to the standard error of the zi values. We then test t = coeff/s.e. with df = n–1 where n = the number of elements in the sample.

Example

We now show how to apply the score test for Example 1 of Poisson Regression using Solver. First we replicate the data and the coefficient table, as displayed in Figure 1.

Poisson Regression example

Figure 1 – Poisson Regression example

We now perform the score test as shown in Figure 2 (ignoring the lower right-hand side of the figure for now). 

Poisson regression overdispersion tests

Figure 2 – Poisson Regression over-dispersion tests

The mu values in column O are copied from column Q of Figure 3 in Poisson Regression using Solver. The z values are calculated by placing the formula

=((D4-O4)^2-D4)/(O4*SQRT(2))

in cell P4, highlighting range P4:P18, and pressing Ctrl-D. Here, D4 is the corresponding y value shown in Figure 1.

The actual test result is shown in range R4:S8. Since the p-value = .299 > .05 we cannot reject the null hypothesis that there isn’t overdispersion.

Worksheet Function

The Real Statistics Resource Pack provides the following worksheet function. This function is based on a Poisson regression model constructed with X data in Rx (with k columns), Y data in column array Ry, coefficients in the k+1 × 1 array Rc, and frequency data in column array Rt. If Rt is omitted it defaults to a column of ones. 

Poisson_STest(Rx, Ry, Rc, lab, Rt): returns an array with the values z-mean, z-se, t-stat, p-value for the Poisson regression score test. If lab = TRUE (default FALSE), then a column of labels is appended to the output.

We can obtain the results shown in Figure 2 by placing the array formula

=Poisson_STest(A4:C18,D4:D18,H5:H8,TRUE,E4:E18)

in range R5:S8.

Lagrange Multiplier Test

Basic Concepts

The Lagrange Multiplier test is also used to test whether the dispersion assumption of Poisson regression is met. This test uses the following test statistic:

Lagrange Multiplier test

Example

The lower right-hand side of Figure 2 shows how to perform the Lagrange Multiplier test.

Since the p-value = 0 < .05 we reject the null hypothesis that there isn’t overdispersion.

Here we are obtaining contradictory results between the score and Lagrange Multiplier tests. Given the small sample size and large dispersion parameter, I would be inclined to rely on the Lagrange Multiplier test. 

Worksheet Function

The Real Statistics Resource Pack provides the following worksheet function with arguments as for the score test function.

Poisson_LMTest(Rx, Ry, Rc, lab, Rt): returns an array with the values LM-stat and p-value for the Poisson Lagrange Multiplier test.

We can obtain the results shown in Figure 2 by placing the array formula

=Poisson_LMTest(A4:C18,D4:D18,H5:H8,TRUE,E4:E18)

in range R14:S15.

Examples Workbook

Click here to download the Excel workbook with the examples described on this webpage.

References

Hilbe, J. M. (2014) Modeling count data. Cambridge University Press
https://assets.cambridge.org/97811070/28333/frontmatter/9781107028333_frontmatter.pdf

Arres, D. (2024) Testing overdispersion
https://rpubs.com/DonArres/TestingOverdispersion

Arres, D. (2024) Poisson regression analysis
https://rpubs.com/DonArres/1086450

Leave a Comment