Skip to content

anova.glm gets test="Chisq" wrong (PR#2294)

2 messages · Robert King, Brian Ripley

#
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
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
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] 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
No, it gets it right.  You need to use a *scaled* deviance in that test,
or specify dispersion = 1.

I don't think that the test is really appropriate, in any case: an F test
would be better (as the help page says).

The usage of `deviance' is rather confused in the GLM literature,
especially in McCullagh & Nelder.
On Fri, 15 Nov 2002 robert.king@newcastle.edu.au wrote: