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.)

  • $\begingroup$ Not seeing any obvious answers from this question. $\endgroup$ – steveo'america Jan 18 '19 at 19:54
  • $\begingroup$ Not seeing how to express this as a conditional moment test either. $\endgroup$ – steveo'america Jan 18 '19 at 22:40
  • $\begingroup$ 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? $\endgroup$ – Glen_b -Reinstate Monica Jan 19 '19 at 0:03
  • $\begingroup$ 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. $\endgroup$ – steveo'america Jan 22 '19 at 17:35
  • $\begingroup$ 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? $\endgroup$ – Glen_b -Reinstate Monica Jan 22 '19 at 21:35

The testDispersion in the DHARMa package (disclaimer: I am the developer) allows you to test the dispersion of nearly any GLMM distribution. There are a number of other functions and tests to check for related problems, e.g. heteroscedasticity or other dispersion issues. H0 is always the fitted model, and DHARMa proceeds by simulating new data from the fitted model and comparing them to the observed data.

As Glen_b noted, because the dispersion parameter itself is already fit by the quasi-model, it can't be overdispersed by definition, but it would be conceivable that you have problems such as heteroscedasticity with a quasi-poisson. The issue with the quasi families is that they are not fully defined distributions. They fit a relationship between mean and dispersion, but it is left open how the data-generating model actually looks like. Quasi-distribution are therefore not supported by DHARMa.

How to proceed depends a bit on whether your question is motivated by a theoretical interest, or a practical need.

  1. From a practical side: just don't fit quasi distributions, fit negative binomial, GLMMs with observation-level REs, or one of the many other options. These models can be checked with DHARMa, and if you find a problem, you can adress it more easily (e.g. with glmmTMB which allows you to express the dispersion again as a function of the predictors).

  2. From a theoretical side: I guess in principle, you could try to create a data-generating function with appropriate properties for your quasi distribution, sample, and then check with DHARMa. Or try to think hard to develop a parametric test for heteroscedasticity in quasi-distributions. However, I really don't know why you would like to do this, because I see no practical need for this, because of 1.

  • $\begingroup$ +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. $\endgroup$ – steveo'america Feb 27 '19 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.