[R] Understanding glm family documentation: dev.resids

Peter Dunn PDunn2 at usc.edu.au
Thu Nov 13 00:30:21 CET 2008


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.

P.




Peter Dunn
Biostatistician
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
www.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.



More information about the R-help mailing list