[Rd] problems with glm (PR#771)
Prof Brian Ripley
Wed, 3 Jan 2001 15:35:51 +0000 (GMT)
[Moved back to R-devel. That's where we discuss bug reports.]
On Wed, 3 Jan 2001, Jim Lindsey wrote:
> > > Additional comment: I recommend that the aic functions for poisson and
> > > binomial have the explicit calculation of the log density replaced by
> > > the corresponding d function with the log option. This will avoid the
> > > production of NAs in certain cases of zeroes in tables.
> > Good idea, but could you supply examples so we can put them in the
> > regression tests?
> Here is a simple and unrealistic (as no one would ever fit the model
> to these data) example that illustrates what can happen in more
> complex tables:
> y <- matrix(c(2,0,7,3,0,9), ncol=2)
> x <- gl(3,1)
> glm(y~x, family=binomial)
That's not one. That fails because wt/n = NaN, and produces NaN not NA.
Now, could you please supply an example of what you reported, so we can
put it in the regression tests? The BUGS section in the FAQ does ask for
one, with good reasons. I've done as you suggested, and *not* fixed the
actual bug in this example.
Brian D. Ripley, firstname.lastname@example.org
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-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: email@example.com