[R-sig-ME] R: RE: Overdispersion and model selection: glmmadmb vs. glmer

Luca Corlatti luca.corlatti at boku.ac.at
Wed Aug 28 11:46:07 CEST 2013


Thanks, Paul, it's somewhat consoling to read somebody else had the same thoughts! 
Thanks a lot for your advice. What I miss here, though, is why the results of the model selection differ so much between glmmadmb and glmer, hence what is preferable between the two approaches...
Cheers, 
Luca




>>> Paul Johnson <paul.johnson at glasgow.ac.uk> 26/08/13 0.29 >>>
Hi Luca,

I've also seen this difference in residuals from a glmmadmb nbinom2 fit and a lognormal-Poisson fit with glmer. Generally the residuals X fitted plot from glmmadmb looks good (homoscedastic, no trend) while that from the lognormal-Poisson looks wrong (strong curve climbing sharply from negative to positive before plateauing). After some head-scratching I've decided that this isn't a problem.

The reason for the discrepancy is that the fitted values from the lognormal-Poisson fit include the overdispersion random effects, i.e. everything expect the Poisson variation, while the NB fitted values don't, because overdispersion is intrinsic to the NB, not an added random effect. Because the obs-level random effect is there to increase the spread of the Poisson distribution, it's almost inevitable with strong overdispersion that the residuals with low fitted values will be negative while those with high fitted values will be positive.

The way to get a fair comparison between the two is to remove the obs-level random effect from the fitted values of the lognormal-Poisson, leaving just the fixed effects and any other random effects. I find this generally gives a residual pattern much more similar to NB in glmmadmb:
 
  Fitted <- exp(log(fitted(mod)) - ranef(mod)$obs[[1]])
  Resid <- (dat$response - Fitted) / sqrt(Fitted + (Fitted^2) * c(exp(VarCorr(mod)$obs) - 1)) 
  plot(Fitted, Resid) 

# obs is the name of the factor used for the obs-level random effect, 
# mod is the glmer fit of the lognormal-Poisson model, dat$response are the responses, and
# the bit inside the sqrt() is the variance function for the lognormal-Poisson

Generally I don't find that the model estimates and SEs differ much though.

Best wishes,
Paul


Paul Johnson

Institute of BAH&CM
Graham Kerr Building
University of Glasgow
Glasgow G12 8QQ

http://www.gla.ac.uk/researchinstitutes/bahcm/staff/pauljohnson/
http://www.stats.gla.ac.uk/~paulj/index.html


________________________________________
From: r-sig-mixed-models-bounces at r-project.org [r-sig-mixed-models-bounces at r-project.org] On Behalf Of Luca Corlatti [luca.corlatti at boku.ac.at]
Sent: 25 August 2013 20:18
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] Overdispersion and model selection: glmmadmb vs. glmer

Dear all,
I recently ran a model selection (AIC-based) to investigate the role of several etho-ecological factors in shaping the emission of parasites in my study species. My data are counts showing overdispersion. I therefore fitted my models using the function glmmadmb with family=nbinom. Visual inspection of residuals (normality, heteroschedasticity, independence) suggested the global model fitted the data adequately, and I'm pretty happy with the results of my analysis. For the sake of curiosity, however, I tried to re-run the model selection using the function glmer, with family=poisson, adding the observation-level as a random factor (1|obs) to account for overdispersion, as recently suggested. In this case, however, visual inspection of residuals for the global model were not very satisfactory. After running the model selection, the results were quite different from those obtained with glmmadmb (not dramatically different, but still...). Given I have no deep knowledge into the philosophy behind the use of glmer with (1|obs), I was wondering:
1) when one should rely on the use of glmer with (1|obs) to account for overdispersion? (i.e. is the check of residuals for the global model the key issue here?)
2) why did I find such a difference in the outcome of the 2 model selections?
Kind regards,
Luca





More information about the R-sig-mixed-models mailing list