deviance residuals in binomial GLM (PR#399)

Prof Brian D Ripley ripley@stats.ox.ac.uk
Tue, 11 Jan 2000 21:18:09 +0000 (GMT)


On Tue, 11 Jan 2000 faraway@umich.edu wrote:

> Full_Name: Julian Faraway
> Version: .90.1
> OS: Linux+NT
> Submission from: (NULL) (141.211.66.172)
> 
> 
> In the following example, the deviance residuals are not correctly calculated:
> 
> > dead <- c(2,8,15,23,27)
> > y <- cbind(dead,30-dead)
> > conc <- 0:4
> > g <- glm(y ~ conc,family=binomial)
> > residuals(g)
> [1] -0.451015  0.359696       NaN  0.064302 -0.204493
> Warning message: 
> NaNs produced in: sqrt((object$family$dev.resids)(y, mu, wts)) 
> 
> The third residual should be zero.

Yes, and it is computed as sqrt(-5.169943e-21) on my machine. I have
committed a fix for 0.99.0


-- 
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 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: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._