[R] bug in step()?

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Feb 16 21:06:01 CET 2001


On Fri, 16 Feb 2001, Chong Gu wrote:

> There appears to be a bug(?) in step() when used to screen logistic
> models.  The problem appears to be specific to 1.2.1 (or maybe also
> 1.2.0?), as the proper behavior was observed in earlier versions.  When
> I did the same on the surrogate log linear model, everything seemed
> okey.

The bug is in add1.glm.  It was intriduced in 1.2.0. It applies only to
binomial models specified in cbind(success, failure) form.

The problem is that what glm returns for the weights and y is in the
0 <= y <= 1 form, and that is not what model.extract gives.

I will commit a fix shortly.

stepAIC is wrong because of the same bug, but the factors come out
different.

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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



More information about the R-help mailing list