[6569] in s-news-athena
Re: Deviance tests for glm objects
daemon@ATHENA.MIT.EDU (John Wallace)
Mon Mar 6 14:53:36 1995
Date: Mon, 6 Mar 1995 11:25:08 -0800 (PST)
From: John Wallace <jrw@fish.washington.edu>
Reply-To: John Wallace <jrw@fish.washington.edu>
To: Trevor Hastie <trevor@mallet.Stanford.EDU>
Cc: S-news@utstat.toronto.edu
In-Reply-To: <199503041916.LAA25573@mallet.Stanford.EDU>
Note that this affects the anova of GAMs also, since anova.gamlist is:
S>anova.gamlist
function(object, ..., test = c("none", "Chisq", "F", "Cp"))
anova.glmlist(object, test = test)
--
^ ^ ^
/ \ / \ / \ ^
John Wallace jw@u.washington.edu / \ / \ | / \
| | o__~ / \
/\/\ |
-
>
> This does seem to be a bug in deviance.glmlist. When an "F" test is
> requested, the underlying model is either an over or under dispersed
> binomial or else a quasi likelihood model all of which require a
> dispersion parameter. The McCullagh and Nelder recommended estimate is
> the scaled residual Chi-square, as delivered by deviance.lm(). So its
> seems anova.glm() is correct and anova.glmlist() is in error. The fix
> is to change the line (near the end):
>
> stat.anova(aod, test, dev[o[1]]/dfres[o[1]], dfres[o[1]], n)
>
> to
>
> stat.anova(aod, test,deviance.lm(object[[o[1]]])/dfres[o[1]], dfres[o[1]], n)
>
> --
> Trevor Hastie trevor@playfair.stanford.edu
> Phone: 415-725-2231 Fax: 415-725-8977
> Statistics Department, Sequoia Hall, Stanford University, Ca94305
>