[R] Extracting overdispersion estimates from lmer amd glm objects

From: Toby Gardner <t.gardner_at_uea.ac.uk>
Date: Mon 11 Sep 2006 - 22:38:59 GMT


Dear list,

I am needing to extract the estimate of overdispersion (deviance / residual degrees of freedom or c-hat) from multiple model objects - so they can then be used to compare the extent of overdispersion among alternative models as well as calculate qausi-AIC values. I have been unable to do this, despite consulting a number of manuals and searching the R-help. I am imaging that in theory it should be possible with some call to attr(), but i have so far had no success.

An example model output would be:

> modeltest<-lmer(Coleodactylus_amazonicus_N~USD + (1|site),data=SFArray,family=poisson,method="Laplace",control=list(usePQL=FALSE, msVerbose=TRUE))
> summary(modeltest)


Generalized linear mixed model fit using Laplace

Formula: Coleodactylus_amazonicus_N ~ USD + (1 | site) 
   Data: SFArray 
 Family: poisson(log link)
      AIC      BIC    logLik deviance

 75.94996 81.68603 -34.97498 69.94996
Random effects:
 Groups Name Variance Std.Dev.
 site (Intercept) 2.6076 1.6148
number of obs: 50, groups: site, 5

Estimated scale (compare to 1) 1.080798


What I need is to extract this value (1.080798) from multiple lmer objects. Has anyone any recommendations? I also need to do this for glm objects although I suspect if someone was able to kindly point me in the right direction then the solution is likely to be similar.

Very many thanks,

Toby Gardner

> sessionInfo()

Version 2.3.1 (2006-06-01)
i386-pc-mingw32

attached base packages:
[1] "datasets" "graphics" "grDevices" "methods" "stats" "utils" "base"

other attached packages:

       JGR iplots JavaGD lme4 Matrix lattice MASS rJava    "1.4-7" "1.0-3" "0.3-4" "0.995-2" "0.995-15" "0.13-8" "7.2-27.1" "0.4-6"

School of Environmental Sciences
University of East Anglia
Norwich, NR4 7TJ
United Kingdom
Email: t.gardner@uea.ac.uk
Website: www.uea.ac.uk/~e387495

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Sep 12 16:06:19 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 12 Sep 2006 - 09:30:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.