Sven Garbade
2010-Apr-09 12:04 UTC
[R] computation of dispersion parameter in quasi-poisson glm
Hi list, can anybody point me to the trick how glm is computing the dispersion parameter in quasi-poisson regression, eg. glm(...,family="quasipoisson")? Thanks ®ards, Sven
Achim Zeileis
2010-Apr-09 12:17 UTC
[R] computation of dispersion parameter in quasi-poisson glm
On Fri, 9 Apr 2010, Sven Garbade wrote:> Hi list, > > can anybody point me to the trick how glm is computing the dispersion > parameter in quasi-poisson regression, eg. > glm(...,family="quasipoisson")?It's the sum of squared Pearson residuals divided by the residual degrees of freedom. For example: example("glm") fm <- glm(counts ~ outcome + treatment, family = quasipoisson) summary(fm) sum(residuals(fm, type = "pearson")^2)/df.residual(fm) hth, Z> Thanks ®ards, Sven > > ______________________________________________ > R-help at r-project.org 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. >
Prof Brian Ripley
2010-Apr-09 12:49 UTC
[R] computation of dispersion parameter in quasi-poisson glm
On Fri, 9 Apr 2010, Sven Garbade wrote:> Hi list, > > can anybody point me to the trick how glm is computing the dispersion > parameter in quasi-poisson regression, eg. > glm(...,family="quasipoisson")?It isn't. glm() does not need (and does not compute) the dispersion parameter. summary.glm will ... list it and the code is in the top few lines. There is no 'trick': this is as described in MASS pp 186, 208 (which also explains some of the pitfalls).> Thanks ®ards, Sven-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Reasonably Related Threads
- Quasi-poisson glm and calculating a qAIC and qAICc...trying to modilfy Bolker et al. 2009 function to work for a glm model
- Dispersion in summary.glm() with binomial & poisson link
- different results across versions for glmer/lmer with the quasi-poisson or quasi-binomial families: the lattest version might not be accurate...
- glm.nb - theta, dispersion, and errors
- quasipoisson, glm.nb and AIC values