I have count data (demand/offer analysis with counting number of customers, depending on - possibly - many factors). I tried a linear regression with normal errors, but my QQ-plot is not really good. I tried a log transformation of the answer: once again, bad QQ-plot.

So now, I'm trying a regression with Poisson Errors. With a model with all significant variables, I get:

Null deviance: 12593.2  on 53  degrees of freedom
Residual deviance:  1161.3  on 37  degrees of freedom
AIC: 1573.7

Number of Fisher Scoring iterations: 5

Residual deviance is larger than residual degrees of freedom: I have overdispersion.

How can I know if I need to use quasipoisson? What's the goal of quasipoisson in this case? I read this advise in "The R Book" by Crawley, but I don't see the point nor a large improvement in my case.


When trying to determine what sort of glm equation you want to estimate, you should think about plausible relationships between the expected value of your target variable given the right hand side (rhs) variables and the variance of the target variable given the rhs variables. Plots of the residuals vs. the fitted values from from your Normal model can help with this. With Poisson regression, the assumed relationship is that the variance equals the expected value; rather restrictive, I think you'll agree. With a "standard" linear regression, the assumption is that the variance is constant regardless of the expected value. For a quasi-poisson regression, the variance is assumed to be a linear function of the mean; for negative binomial regression, a quadratic function.

However, you aren't restricted to these relationships. The specification of a "family" (other than "quasi") determines the mean-variance relationship. I don't have The R Book, but I imagine it has a table that shows the family functions and corresponding mean-variance relationships. For the "quasi" family you can specify any of several mean-variance relationships, and you can even write your own; see the R documentation. It may be that you can find a much better fit by specifying a non-default value for the mean-variance function in a "quasi" model.

You also should pay attention to the range of the target variable; in your case it's nonnegative count data. If you have a substantial fraction of low values - 0, 1, 2 - the continuous distributions probably won't fit well, but if you don't, there's not much value in using a discrete distribution. It's rare that you'd consider Poisson and Normal distributions as competitors.

  • $\begingroup$ Yes, you're right. Here I have counting data but with large values. I should use a continuous distribution. $\endgroup$
    – Antonin
    Jul 9 '12 at 11:39

You are right, these data might likely be overdispersed. Quasipoisson is a remedy: It estimates a scale parameter as well (which is fixed for poisson models as the variance is also the mean) and will provide better fit. However, it is no longer maximum likelihood what you are then doing, and certain model tests and indices can't be used. A good discussion can be found in Venables and Ripley, Modern Applied Statistics with S (Section 7.5).

An alternative is to use a negative binomial model, e.g. the glm.nb() function in package MASS.

  • 1
    $\begingroup$ But am I "forced" to use quasipoisson in this case? I'm asking since my non-quasipoisson model is better (just basic poisson) in the sense that more variables are significant. $\endgroup$
    – Antonin
    Jan 9 '12 at 17:31
  • 2
    $\begingroup$ Doesn't that make sense though? If I used a regression model where I assumed that sigma is .00001 instead of using the estimate from the data (2.3 let's say) then of course things are going to be more significant. $\endgroup$
    – Dason
    Jan 9 '12 at 17:39
  • 1
    $\begingroup$ Antonin: I'd say that just because more variables are significant, it doesn't make things "better". These might, as Dason pointed out, easily be false positives if you underestimate the error variance. I would definitely use a quasi-method or the negative binomial in this case, but unless I review your paper, you won't be forced to do anything ;) $\endgroup$
    – Momo
    Jan 9 '12 at 17:52
  • $\begingroup$ Thanks a lot for your answers! Do you know any way of comparing quasi-poisson and negative binomial models? In most books, they present the models but don't explain how to choose between them. $\endgroup$
    – Antonin
    Jan 9 '12 at 21:46
  • 1
    $\begingroup$ From the output, it seems you are fitting 53-17=16 parameters to 53+1=54 data points; is this right? If so any method that relies on asymptotic approximations, including use of glm() and glm.nb() is liable to give badly-calibrated inference; it would be reasonable to expect the precision to be overstated. It'd be helpful to know more about why you want to do this regression; it's possible methods that perform better in small sample situations could be used instead. $\endgroup$
    – guest
    Jan 10 '12 at 7:21

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.