# GLM model interpretation of quasi poisson incorporating dispersion in R

I am fairly new to GLMs, and am currently working with a quasipoisson distribution due to overdispersion. I have read through the relevant sections of Mixed Effects Models and Extensions in Ecology with R - however I am struggling to pin point just how I should be reporting these results?

I would like to state the amount of variance (variance or deviance?) that this model explains - do I need to calculate this just by (null deviance - residual deviance) / null deviance, OR should I be incorporating the dispersion parameter? ie: (null deviance - residual deviance) / (null deviance * SQRT(dispersion)). It is unclear to me which is correct, or if I should be doing something different all together.

Any help in interpreting this would be much appreciated!

I've included the output for this model for an example:

Call:
glm(formula = PiecesTD ~ offset(LVolumeTD) + flocation + fMonth,
family = quasipoisson, data = SA)

Deviance Residuals:
Min       1Q    Median      3Q     Max
-4.1015  -1.1388   -0.2585  0.7566  4.6368

Coefficients:

Estimate Std. Error t value Pr(>|t|)
(Intercept)  -2.0462     0.2196  -9.318 2.98e-12 ***
flocationEG  -0.8730     0.2202  -3.964 0.000249 ***
fMonth6       0.7108     0.2512   2.830 0.006833 **
fMonth8      -0.1706     0.2783  -0.613 0.542760
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for quasipoisson family taken to be 3.281157)

Null deviance: 262.45 on 50 degrees of freedom
Residual deviance: 156.52 on 47 degrees of freedom
AIC: NA

Number of Fisher Scoring iterations: 5


Abigail, have you tried using the rsq package available in R to compute the R-squared for your model?

Here is the R code you would need:

# fit quasipoisson model
quasips <- glm(formula = PiecesTD ~ offset(LVolumeTD) + flocation + fMonth,
family = quasipoisson, data = SA)

# compute variance-function-based R-squared


By default, the rsq function in the rsq package implements the variance-function-based method discussed in the article A Coefficient of Determination for Generalized Linear Models by Dabao Zhang (The American Statistician · December 2016).

If you have a ResearchGate account, the article is available for download there. According to the article's abstract, in the variance-function-based method, the variance function is used to define the total variation of the dependent variable, as well as the remaining variation of the dependent variable after modeling the predictive effects of the independent variables.

• Thanks for the rsq reference, which is certainly relevant to the question, but I don't agree with the premise of Zhang (2016). Zhang argues that the glm deviance is a function of the likelihood, hence analysis of deviance (anodev) isn't applicable to quasi-glms, which don't have likelihoods. He has apparently overlooked the fact that the deviance can be derived from the variance function alone (Wedderburn 1974) so that anodev is also a "variance-function-based method", very similar in fact to the rsq measure that he proposes. – Gordon Smyth Sep 22 '19 at 7:33
• The proportion of deviance explained is a natural and simple generalization of coefficient of determination or $R^2$ and is available for quasi-glms as well as ordinary glms. – Gordon Smyth Sep 22 '19 at 7:35

Your first suggestion is correct. For your fitted model, the analysis of deviance (anodev) table is:

  Source  DF  Deviance  Mean Dev     F
======================================
Model   3    105.93     35.31  10.6
Residual  47    156.52      3.33
======================================
Total  50    262.45


Here the total deviance is the null deviance of 262.45, i.e., the deviance that arises from fitting the null model with just the offset and intercept. The model deviance is the null deviance minus the residual deviance, which represents the reduction in the residual deviance that arises from adding the two factors flocation and fMonth to the model.

Your model explains 105.93 / 262.45 = 40.4% of the total deviance.

The quasi-F statistic, $$F = 10.6$$, is usually compared to an F-distribution on 3 and 47 degrees of freedom. The F-distribution is approximate, but the approximation is often acceptable unless your response variable contains lots of 0s and 1s.

You can see that analysis of deviance is closely analogous to analysis of variance for linear models. The proportion deviance explained is computed in exactly the same way that you compute the proportion sum of squares explained (aka coefficient of determination) in analysis of variance. In both cases, the dispersion may be unknown but does not explicitly enter the calculation.

Peter Dunn and I cover analysis of deviance in Chapter 7 of our book on GLMs (Dunn and Smyth, 2018). Sorry for the self-reference, but analysis of deviance is surprisingly seldom covered in textbooks. We cover quasi-Poisson models in Section 10.5.3.

Beware that the proportion of deviance explained has a meaningful interpretation only for glms for which the residual deviance can be treated as roughly scaled chisquare distributed. The interpretation fails completely for binary regression, for example. For a Poisson or quasi-Poisson glm, you need the counts to be not too small, as I've indicated above. If all the counts are $$\ge 3$$ it should be fine. See my book with Peter Dunn for more discussion.

References

Dunn P.K., Smyth G.K. (2018) Generalized Linear Models With Examples in R. Springer Texts in Statistics. Springer, New York, NY. https://link.springer.com/book/10.1007/978-1-4419-0118-7