Hi, I am performing glm with binomial family and my data show slight overdispersion (HF<1.5). Nevertheless, in order to take into account for this heterogeneity though weak, I use F-test rather than Chi-square (Krackow & Tkadlec, 2001). But surprisingly, outputs of this two tests are exactly similar. What is the reason and how can I scale the output by overdispersion ?? Thank you, Alexandre MILLON -------------- next part -------------- A non-text attachment was scrubbed... Name: hardouin.vcf Type: text/x-vcard Size: 360 bytes Desc: Carte pour Hardouin Loïc Url : https://stat.ethz.ch/pipermail/r-help/attachments/20030218/31e9825f/hardouin.vcf
Use the quasibinomial family -- see the help pages. Warning: how are you estimating the over-dispersion? The estimate given by the residual deviance can be badly biased. I don't know your reference, but this is all in McCullagh & Nelder (1989) and earlier. On Tue, 18 Feb 2003, Hardouin Lo?c wrote:> I am performing glm with binomial family and my data show slight > overdispersion (HF<1.5). Nevertheless, in order to take into account for > this heterogeneity though weak, I use F-test rather than Chi-square > (Krackow & Tkadlec, 2001). But surprisingly, outputs of this two tests > are exactly similar. What is the reason and how can I scale the output > by overdispersion ??-- 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
Dear Alexandre, The Anova function in the car package by default will calculate F-tests (specified by test="F") using a dispersion estimate based on the Pearson residuals. See ?Anova for details. I hope that this helps, John At 12:04 PM 2/18/2003 +0100, Hardouin Lo?c wrote:>Hi, > >I am performing glm with binomial family and my data show slight >overdispersion (HF<1.5). Nevertheless, in order to take into account for >this heterogeneity though weak, I use F-test rather than Chi-square >(Krackow & Tkadlec, 2001). But surprisingly, outputs of this two tests >are exactly similar. What is the reason and how can I scale the output >by overdispersion ?? > >Thank you, > >Alexandre MILLON----------------------------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: jfox at mcmaster.ca phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox -----------------------------------------------------
Use family=quasibinomial in your glm() statement. R "does what you say rather than doing what you mean": it specifically says something like "(Dispersion for binomial family taken to be 1)", which is an indication that R is not using a dispersion factor > 1 in this case. (There is a hint of this in the ?anova.glm man page: "For models with known dispersion (e.g. binomial and Poisson fits) the chi-squared test is most appropriate, and for those with dispersion estimated by moments (e.g. `gaussian', `quasibinomial' and `quasipoisson' fits) the F test is most appropriate.") I brought this up with R-devel -- I think that many people are likely to run into this confusion -- but I wasn't sufficiently convincing to get a note put into the help page ... Ben On Tue, 18 Feb 2003, Hardouin Lo?c wrote:> > Hi, > > I am performing glm with binomial family and my data show slight > overdispersion (HF<1.5). Nevertheless, in order to take into account for > this heterogeneity though weak, I use F-test rather than Chi-square > (Krackow & Tkadlec, 2001). But surprisingly, outputs of this two tests > are exactly similar. What is the reason and how can I scale the output > by overdispersion ?? > > Thank you, > > Alexandre MILLON >-- 318 Carr Hall bolker at zoo.ufl.edu Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker Box 118525 (ph) 352-392-5697 Gainesville, FL 32611-8525 (fax) 352-392-3704
I recently uploaded a package to CRAN called `dispmod' which provides functions for modelling dispersion in GLM. In particular, the function `glm.binomial.disp' fits overdispersed binomial logit models following the approach discussed by Williams, D. A. (1982), Extra-binomial variation in logistic linear models, Applied Statistics, 31, 144-148. I hope this can help you. Luca +-----------------------------------------------------------------------+ | Dr. Luca Scrucca | | Dipartimento di Scienze Statistiche tel. +39 - 075 - 5855278 | | Universita' degli Studi di Perugia fax. +39 - 075 - 43242 | | Via Pascoli - C.P. 1315 Succ. 1 | | 06100 PERUGIA (ITALY) | | | | E-mail: luca at stat.unipg.it | | Web page: http://www.stat.unipg.it/luca | +-----------------------------------------------------------------------+