[R] Understanding glm family documentation: dev.resids

From: Peter Dunn <PDunn2_at_usc.edu.au>
Date: Thu, 13 Nov 2008 09:30:21 +1000

Hi all

Consider the family function, as used by glm. The help page says the value of the family object is a list, one element of which is the following:

dev.resids function giving the deviance residuals as a function of (y, mu, wt).

But reading any of the family functions (eg poisson) shows that dev.resids is a function that computes the *square* of the deviance residuals (at least, by every definition I know of). Further, the deviance residuals returned by residuals.glm are essentially computed as the square root of dev.resids.

Something seems amiss. The element dev.resids actually seems to compute the deviance residuals squared. I guess the help file could be changed to read:

dev.resids function giving the square of the deviance residuals as a function of (y, mu, wt).

...but then, dev.resids still seems a misleading label, but that may so entrenched it will never changed.

(By my definition, the square of the deviance residuals is not quite the unit deviance as the weights need to be incorporated differently, but others may disagree.)

Of course, I could be way off track. I would appreciate enlightenment.


Peter Dunn
School of Health and Sport Science
Faculty of Science, Health and Education University of the Sunshine Coast  

Tel: +61 7 5456 5085
Fax: +61 7 5430 2896
Email: pdunn2_at_usc.edu.au

CRICOS Provider Number: 01595D

This communication is intended for the recipient only and should not be forwarded, distributed or otherwise read by others without express permission. The views expressed in this email are not necessarily those of the University of the Sunshine Coast.

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 12 Nov 2008 - 23:40:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 14 Nov 2008 - 15:30:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive