Re: [R] Error in F test on version 2.1.0

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue 10 May 2005 - 02:18:16 EST

On Mon, 9 May 2005, Achim Zeileis wrote:

> On Mon, 09 May 2005 15:53:11 +0200 Uwe Ligges wrote:
>
>> Ronaldo Reis-Jr. wrote:
>>
>>> Hi,
>>>
>>> I make a upgrade to R 2.1.0 and in some analysis I give an error:
>>>
>>> anova(model,test="F")
>>> Analysis of Deviance Table
>>>
>>> Model: binomial, link: logit
>>>
>>> Response: landing/total
>>>
>>> Terms added sequentially (first to last)
>>>
>>>
>>> Df Deviance Resid. Df Resid. Dev F Pr(>F)
>>> NULL 16 105.079
>>> trat 1 93.149 15 11.930 93.15
>>> Warning message:
>>> NaNs produced in: pf(q, df1, df2, lower.tail, log.p)
>>>
>>> In old version it work.
>>>
>>> Inte
>>> Ronaldo
>>
>> Have you read the posting guide?
>> It asks you to specify a reproducible example ........
>> Please so so (both, read the psoting guide and specify the example).
>
> Valid point, try:
>
> set.seed(1071)
> y <- factor(rnorm(10) > 0)
> x <- rnorm(10)
> fm1 <- glm(y ~ 1, family = binomial)
> fmx <- glm(y ~ x, family = binomial)
> anova(fm1, fmx, test = "F")
>
> and as I said in another reply already. This boils down to the problems
> in pf() reported by Gordon Smyth:
> https://stat.ethz.ch/pipermail/r-devel/2005-April/032923.html

Hmm,

  1. It is not documented that df=Inf is valid for pf(), so the problem is rather using an "F" test when it is inappropriate. If you specify an F test, you almost certainly meant a quasibinomial model.
  2. This does work in the current R-patched.
-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue May 10 02:26:22 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:40 EST