Ben Bolker
2003-Jan-27 18:50 UTC
[Rd] help page for anova.glm/variation between S-PLUS and R behavior
When using test="F" in stat.anova() / anova.glm(), R uses the assumed dispersion parameter for the specified family (e.g. scale=1 for binomial), while S-PLUS automatically uses the estimated dispersion parameter (residual deviance/residual df). I think there are good reasons for the behavior in R -- it fits with the "you get what you actually asked for" philosophy -- and there are hints in the documentation (anova.glm(): "for [models] with dispersion estimated by moments ... the F test is most appropriate"; family/binomial(): "The behaviour of S-PLUS is closer to the quasi- variants"). Would R-core consider it reasonable to add yet another sentence to the anova.glm() documentation, e.g. after the "... F test is most appropriate" sentence above, adding: "(Note: unlike R, S-PLUS automatically uses the moment-estimated dispersion for F-tests even for the binomial and Poisson families: see ?quasibinomial.)" ? Ben Bolker -- 318 Carr Hall bolker@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
ripley@stats.ox.ac.uk
2003-Jan-27 19:16 UTC
[Rd] help page for anova.glm/variation between S-PLUS and R behavior
Not really! I don't think it is our job to describe the inconsistencies of S-PLUS, especially since that might change from version to version. It would be really messy, as S-PLUS ignores the scale for the Chisq test (which seems perverse), and lacks the dispersion argument. On Mon, 27 Jan 2003, Ben Bolker wrote:> > When using test="F" in stat.anova() / anova.glm(), R uses the assumed > dispersion parameter for the specified family (e.g. scale=1 for binomial), > while S-PLUS automatically uses the estimated dispersion parameter > (residual deviance/residual df). I think there are good reasons for the > behavior in R -- it fits with the "you get what you actually asked for" > philosophy -- and there are hints in the documentation (anova.glm(): "for > [models] with dispersion estimated by moments ... the F test is most > appropriate"; family/binomial(): "The behaviour of S-PLUS is closer to the > quasi- variants"). > Would R-core consider it reasonable to add yet another sentence to the > anova.glm() documentation, e.g. after the "... F test is most appropriate" > sentence above, adding: "(Note: unlike R, S-PLUS automatically uses the > moment-estimated dispersion for F-tests even for the binomial and Poisson > families: see ?quasibinomial.)" ? > > Ben Bolker > >-- Brian D. Ripley, ripley@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