From ripley at stats.ox.ac.uk  Tue Jan  6 16:00:19 2009
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue, 6 Jan 2009 15:00:19 +0000 (GMT)
Subject: [Rd] Apparant bug in binomial model in GLM (PR#13434)
In-Reply-To: <20090106112504.50983282EFF6@mail.pubhealth.ku.dk>
References: <20090106112504.50983282EFF6@mail.pubhealth.ku.dk>
Message-ID: <alpine.LFD.2.00.0901061444380.9877@auk.stats.ox.ac.uk>

This is a (too-little) known phenomenon: the problem is the low power of 
the Wald test in certain circumstances, and not the R implementation.

You can look it up in MASS (the book)  pp.197-9.

Can I ask how you 'knew for certain' what this should do? From the FAQ:

   But be sure you know for certain what it ought to have done. If you
   aren't familiar with the command, or don't know for certain how the
   command is supposed to work, then it might actually be working right.
   For example, people sometimes think there is a bug in R's mathematics
   because they don't understand how finite-precision arithmetic works.
   Rather than jumping to conclusions, show the problem to someone who
   knows for certain.

Who was your authority here?


On Tue, 6 Jan 2009, soren.faurby at biology.au.dk wrote:

> Full_Name: S?ren Faurby
> Version: 2.4.1 and 2.7.2

Neither of which is current.

> OS:
> Submission from: (NULL) (192.38.46.92)
>
>
> There appear to be a bug in the estimation of significance in the 
> binomial model in GLM. This bug apparently appears when the correlation 
> between two variables is to strong.
>
> Such as this dummy example
> c(0,0,0,0,0,1,1,1,1,1)->a
> a->b
> m1<-glm(a~b, binomial)
> summary(m1)
>
> It is sufficient that all 1's correspond to 1's such as this example
>
> c(0,0,0,0,0,1,1,1,1,1)->a
> c(0,0,0,0,1,1,1,1,1,1)->c
> m1<-glm(a~c, binomial)
> summary(m1)
>
> I hope that this message is understandable.
>
> Kind regards, S?ren
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at 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


[Rd] Apparant bug in binomial model in GLM (PR#13434)
Prof Brian Ripley