Ulrich Halekoh
2004-Jun-09 09:43 UTC
[R] inconsistency on p-value calculation of anova for quasi binomial
Hej, providing the dispersion parameter estimate to the anova function for a quasibinomial fit results in two different ways to calculate the p-value for the same statistic. In the following example I test for the interaction effect. In the versions (a1 and a2) the p-value is based on the F_1_17 distribution, in the version (a3) it is calculated via the normal. I think anova should behave (by default) in all versions either in the one or the other way. #example based on the orobanche data set provoded with the dispmod-package library(dispmod) data(orobanche) orobanche$y<-with(orobanche,cbind(germinated,seeds-germinated)) g1<-glm(y~host+variety,family=quasibinomial,data=orobanche) g2<-glm(y~host+variety+host:variety,family=quasibinomial,data=orobanche) a1<-anova(g2,g1,test='F',dispersion=summary(g2)$dispersion) a2<-anova(g2,test='F') a3<-anova(g2,test='F',dispersion=summary(g2)$dispersion) ulrich R 1.9.0 Windows 2000 =============================================================Ulrich Halekoh, PhD Phone: +45 8999 1825 Biometry Research Unit Fax: +45 8999 1300 Danish Institute of Agricultural Sciences E-mail: ulrich.halekoh at agrsci.dk Research Centre Foulum, DK-8830 Tjele, Denmark