# How to perform over-dispersion test where null is quasi-Poisson

If I understand correctly, a quasi Poisson regression assumes roughly that $$\mbox{E}\left[y\left|x\right.\right] = \exp{\left(x^{\top}\beta\right)}, \quad \mbox{VAR}\left(y\left|x\right.\right) = \sigma^2 \exp{\left(x^{\top}\beta\right)},$$ and estimates both $$\beta$$ and $$\sigma^2$$. (Poisson regression further assumes $$\sigma=1$$, rather than estimating it.)

I would like to test the variance assumption. That is, assuming $$\mbox{E}\left[y\left|x\right.\right] = \exp{\left(x^{\top}\beta\right)}, \quad \mbox{VAR}\left(y\left|x\right.\right) = f\left(x\right) \exp{\left(x^{\top}\beta\right)},$$ I would like to test the null hypothesis $$H_0: f\left(x\right) = c,\,\,\mbox{for some}\,c.$$

The most widely used test, as given by Cameron & Trivedi (and implemented in AER::dispersiontest), seems to assume $$\mbox{E}\left[y\left|x\right.\right] = \mu = \exp{\left(x^{\top}\beta\right)}, \quad \mbox{VAR}\left(y\left|x\right.\right) = \mu + \alpha g\left(\mu\right),$$ for some specified function $$g\left(\cdot\right)$$ (typically a linear or quadratic function), and tests the null hypothesis $$H_0: \alpha = 0.$$ Is it possible to adapt this test for my purposes? Concretely can I, through some perverted usage of dispersiontest, somehow assume $$\mbox{VAR}\left(y\left|x\right.\right) = \alpha_1 \mu + \alpha_2 \mu^2,$$ and test $$H_0: \alpha_2 = 0$$ regardless of $$\alpha_1$$?

(I have tried to use dispersiontest on a glm object fit with quasipoisson family, and get an error claiming that "only Poisson GLMs can be tested". So some extra fiddling will be required.)

• Not seeing any obvious answers from this question. – steveo'america Jan 18 '19 at 19:54
• Not seeing how to express this as a conditional moment test either. – steveo'america Jan 18 '19 at 22:40
• Your question is somewhat confusing to me. "Overdispersion" is a term for the situation where the variance exceeds the mean (since for the ordinary Poisson, the two are equal). .If you start with a quasi-Poisson model with the dispersion parameter free, your distribution under the null will be overdispersed any time the data are. What are you really trying to find out? – Glen_b -Reinstate Monica Jan 19 '19 at 0:03
• I take 'overdispersion' to mean "more variance than suggested by the model" (or, in fancy talk, "unobserved heterogeneity"). In a Quasi-Poisson regression, one assumes that variance is proportional to the mean, rather than merely equal to it. You could arrive at such a situation by taking conditional Poisson dependent variables (e.g. raw counts) and changing their units (e.g. five dollars per count.). My question is whether my data have even more variance than a simple redenomination captures. – steveo'america Jan 22 '19 at 17:35
• If it's the same scaling of variance to each point then clearly not, any amount of it would be captured by the parameter. Are you instead asking about some heterogeneity of variance not captured by the model? – Glen_b -Reinstate Monica Jan 22 '19 at 21:35

• +1 for DHARMa, which we had been using anyway. I think I am finally accepting the consequences of 'quasi' in 'quasi Poisson'. For our problem we were not observing counts directly, rather something like round(0.01 * counts), but the 0.01 was slightly variable and unknown, and the expected counts were very large. As a consequence, a rescaled Poisson would have been a good model, but our data were essentially continuous. In the end we gave up and pursued another model. – steveo'america Feb 27 '19 at 22:22