Message-Id: <199806031414.KAA17990@desire.stat.cmu.edu> To: r-help@stat.math.ethz.ch Subject: R-beta: anova.glm is broken with offsets Date: Wed, 03 Jun 1998 10:14:04 -0400 From: Mike Meyer <mikem@stat.cmu.edu> I have *not* tracked this bug very far because I hope someone who is more familiar with the glm/anova code will jump in. If one fits a glm model with an offset, the NULL deviance is incorrectly calculated (it is calculated without the offset). The means one can get examples where the model deviance is greater than the NULL deviance. Here is some example output, (without the data). > mymod <-glm(cens ~ group, family=poisson,offset=log(time)) > anova(mymod) Analysis of Deviance Table Model: poisson, link: log Response: cens Terms added sequentially (first to last) Df Deviance Resid. Df Resid. Dev NULL 41 20.19 group 1 -17.83 40 38.02 > Mike Meyer, Department of Statistics, Carnegie Mellon University -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._