Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
Yes, you're right. Here I have counting data but with large values. I should use a continuous distribution. –  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.

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

share|improve this answer
    
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. –  Antonin Jan 9 '12 at 17:31
1  
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. –  Dason Jan 9 '12 at 17:39
    
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 ;) –  Momo Jan 9 '12 at 17:52
    
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. –  Antonin Jan 9 '12 at 21:46
    
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. –  guest Jan 10 '12 at 7:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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