Skip to content
Prev 819 / 7420 Next

R-sig-ecology Digest, Vol 19, Issue 2

Dear All,

I admit that overdispersion can be a problem. But you can't compare
Poisson with quasi-Poisson based on logLik, because the likelihood is
not defined for quasi* models. The quasi-likelihood can be maximized
to get the dispersion parameter, but coefficients are the same, only
SE's and p-values are corrected:

## some random data
y<-rpois(100, 3)
x<-rnorm(100)
## GLMs
m1 <- glm(y~x,family=poisson)
m2 <- glm(y~x,family=quasipoisson)
## coefficients are equal
all.equal(coef(m1), coef(m2))
## SE's are not
rbind(pois=coef(summary(m1))[,2], qpois=coef(summary(m2))[,2])
## p-values are not
rbind(pois=coef(summary(m1))[,4], qpois=coef(summary(m2))[,4])
## logLik for Poisson: OK
logLik(m1)
## logLik for Poisson: NA
logLik(m2)

The pscl package provides negative binomial models with zero inflation
too (see Achim Zeileis, Christian Kleiber, Simon Jackman:
Regression Models for Count Data in R, JSS, http://www.jstatsoft.org/v27/i08).

If you have fancier (say GLMM) models, you can make likelihood ratio
test, but that might be quite advanced to do so (see Jos? Miguel
Ponciano, Mark L. Taper, Brian Dennis, Subhash R. Lele (2009)
Hierarchical models in ecology: confidence intervals, hypothesis
testing, and model selection using data cloning. Ecology: Vol. 90, No.
2, pp. 356-362.).

Yours,

Peter

P?ter S?lymos
Alberta Biodiversity Monitoring Institute
Department of Biological Sciences
CW 405, Biological Sciences Bldg
University of Alberta
Edmonton, Alberta, T6G 2E9, Canada
Phone: 780.492.8534
email <- paste("solymos", "ualberta.ca", sep = "@")
On Fri, Oct 2, 2009 at 9:53 AM, Nicholas Lewin-Koh <nikko at hailmail.net> wrote: