3
$\begingroup$

I've run the following multilevel poisson regression:

> ambiglme4 <- glmer(AmbigCount ~ Posn.c*Valence.c + (Valence.c|mood.c/Chain), data = FinalData_forpoisson, family = poisson(link = "log"), control = glmerControl(optimizer = "bobyqa", check.conv.grad = .makeCC("warning", 0.05)))
> summary(ambiglme4)
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
 Family: poisson  ( log )
Formula: AmbigCount ~ Posn.c * Valence.c + (Valence.c | mood.c/Chain)
   Data: FinalData_forpoisson
Control: glmerControl(optimizer = "bobyqa", check.conv.grad = .makeCC("warning",      0.05))

     AIC      BIC   logLik deviance df.resid 
   943.1    989.2   -461.6    923.1      726 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.0106 -0.4791 -0.2481 -0.0211  7.6527 

Random effects:
 Groups       Name        Variance  Std.Dev.  Corr
 Chain:mood.c (Intercept) 0.000e+00 0.000e+00     
              Valence.c   1.967e-12 1.402e-06  NaN
 mood.c       (Intercept) 0.000e+00 0.000e+00     
              Valence.c   6.576e-13 8.109e-07  NaN
Number of obs: 736, groups:  Chain:mood.c, 92; mood.c, 2

Fixed effects:
                 Estimate Std. Error z value Pr(>|z|)    
(Intercept)      -1.68128    0.11397 -14.752  < 2e-16 ***
Posn.c           -1.07585    0.08775 -12.260  < 2e-16 ***
Valence.c         0.89698    0.22795   3.935 8.32e-05 ***
Posn.c:Valence.c  0.47985    0.17550   2.734  0.00625 ** 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) Posn.c Vlnc.c
Posn.c       0.831              
Valence.c   -0.508 -0.461       
Psn.c:Vlnc. -0.461 -0.454  0.831

I want to check for overdispersion in the model and came across the aods3 package and the gof function, which I used:

> gof(ambiglme4)
D  = 481.9449, df = 726, P(>D) = 1
X2 = 825.0443, df = 726, P(>X2) = 0.006089041

I'm just not sure exactly what the output represents and am having a hard time finding an answer. Is anyone able to help me understand how to interpret this? Also, how might I then report the dispersion in the model in a paper.

$\endgroup$

2 Answers 2

4
$\begingroup$

I am not familiar with those packages, nor the outputs. However, if you can identify the residual deviance and the residual degrees of freedom in the output, the two should be roughly equal or else over- or under-dispersion may exist.

The only function I am familiar with that tests dispersion is dispersiontest in the AER package. The output is minimal and very clear e.g. gives you what the dispersion value is at what p-value.

$\endgroup$
3
$\begingroup$

D is the residual degrees of freedom, X2 is the sum of squared Pearson residuals. The ratio of X2 to D (so, X2/D) should be near 1. In your caase, the ratio is near 2. So your model is clearly overdispersed.

You can also use:

library(glmmADMB)  ## 0.7.7 
m2 <- glmmadmb(y~x+(1|f),data=d,family="poisson") 
overdisp_fun(m2)

Which will give output like this:

    chisq        ratio    rdf             p 
1026.7585    1.0298480    997     0.2499024

In this case, chisq = X2, rdf = D. But this output conveniently gives you the ratio.

Source: https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html

$\endgroup$
2
  • $\begingroup$ Why should it be near one? $\endgroup$ Commented Aug 13, 2020 at 0:07
  • $\begingroup$ Recommenting on this because my previous (now deleted) answer was garbage. So yes, >1 = overdispersed, <1 = underdispersed. Poisson distribution is defined by having one parameter that describes both the mean and variance. Thus, mean and variance must be equivalent, which of course is rarely true for any real data. If the ratio is >1, then it means the data are overdispersed and the variance is greater than the mean. If the ratio is <1, then it means the data are underdispersed, and the variance is less than the mean. Is the ratio = 1, then it means the mean = variance. $\endgroup$ Commented Apr 27, 2023 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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