From robert.king@newcastle.edu.au  Fri Nov 15 04:41:59 2002
From: robert.king@newcastle.edu.au (robert.king@newcastle.edu.au)
Date: Fri, 15 Nov 2002 05:41:59 +0100 (MET)
Subject: anova.glm gets test="Chisq" wrong (PR#2294)
Message-ID: <200211150441.FAA06624@pubhealth.ku.dk>

Full_Name: Robert King
Version: 1.5.0
OS: windows
Submission from: (NULL) (134.148.4.19)


Also occurs in 1.6.0 on linux

anova.glm(fitted.object,test="Chisq") is giving strange answers in this
situation

> resptime
   sex task time
1    m    s  210
2    m    s  300
3    m    s  420
4    f    s  250
5    f    s  310
6    f    s  390
7    m    c  310
8    m    c  400
9    m    c  600
10   m    c  720
11   f    c  300
12   f    c  350
13   f    c  405
14   f    c  520

> resp.fit1 <- glm(time~sex+task,data=resptime,family=Gamma)

> anova(resp.fit1,test="Chisq")
Analysis of Deviance Table

Model: Gamma, link: inverse

Response: time

Terms added sequentially (first to last)


     Df Deviance Resid. Df Resid. Dev P(>|Chi|)
NULL                    13    1.50207          
sex   1  0.08833        12    1.41374   0.31191
task  1  0.44008        11    0.97366   0.02400

#BUT!
> 1-pchisq(0.44008,1)
[1] 0.5070838


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


anova.glm gets test="Chisq" wrong (PR#2294)
robert.king@newcastle.edu.au