deviance residuals in binomial GLM (PR#399)

faraway@umich.edu faraway@umich.edu
Tue, 11 Jan 2000 22:00:04 +0100 (MET)


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.


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._