Re: [Rd] Standardized Pearson residuals

From: peter dalgaard <pdalgd_at_gmail.com>
Date: Thu, 17 Mar 2011 18:08:18 +0100

On Mar 17, 2011, at 16:14 , Martin Maechler wrote:

>>>>>> peter dalgaard <pdalgd_at_gmail.com>
>>>>>>    on Thu, 17 Mar 2011 15:45:01 +0100 writes:
>> 

>
>> Back to the original question:

>
>> The current rstandard() code reads

>
> ## FIXME ! -- make sure we are following "the literature":
> rstandard.glm <- function(model, infl = lm.influence(model, do.coef=FALSE), ...)
> {
> res <- infl$wt.res # = "dev.res" really
> res <- res / sqrt(summary(model)$dispersion * (1 - infl$hat))
> res[is.infinite(res)] <- NaN
> res
> }
>
>> which is "svn blame" to ripley but that is due to the 2003
>> code reorganization (except for the infinity check from
>> 2005). So apparently, we have had that FIXME since
>> forever... and finding its author appears to be awkward
>> (Maechler, perhaps?).

>
> yes, almost surely
>
>> I did try Bretts code in lieu of the above (with a mod to
>> handle $dispersion) and even switched the default to use
>> the Pearson residuals. Make check-devel sailed straight
>> through apart from the obvious code/doc mismatch, so we
>> don't have any checks in place nor any examples using
>> rstandard(). I rather strongly suspect that there aren't
>> many user codes using it either.

>
>> It is quite tempting simply to commit the change (after
>> updating the docs). One thing holding me back though: I
>> don't know what "the literature" refers to.

>
> well, "the relevant publications on the topic" ...
> and now define that (e.g. using the three 'References' on the
> help page).

I count 5 actually... IIRC, the first two do not deal with glm diagnostics. The last two are by Fox, and, presumably, he is around to chime in if he wants. The middle one, by Williams, does define both standardized Pearson and standardized deviance residuals.

Or did you mean the three on ?glm.summaries? I would assume Davison and Snell to be the operative one, but I don't have it to hand.

Anyways, given that de default for residuals.glm is deviance residuals, I suppose that rstandard.glm should have the same default for consistency, and that is also the least disruptive variant. I see no reason not to make standardized Pearson residuals an option.

> Really, that's what I think I meant when I (think I) wrote that FIXME.
> The point then I think was that we had code "donations", and they
> partly were clearly providing functionality that was (tested)
> "correct" (according to e.g. McCoullagh & Nelder and probably
> another one or two text books I would have consulted ... no
> large Wikipedia back then),
> but also provided things for which there was nothing in "the
> literature", but as the author provided them with other good
> code, we would have put it in, as well....
> == my vague recollection from the past
>
> Martin
>

>> -- 
>> Peter Dalgaard Center for Statistics, Copenhagen Business
>> School Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>> Phone: (+45)38153501 Email: pd.mes_at_cbs.dk Priv:
>> PDalgd_at_gmail.com

>
>> ______________________________________________
>> R-devel_at_r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes_at_cbs.dk  Priv: PDalgd_at_gmail.com

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 17 Mar 2011 - 17:09:47 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 Thu 17 Mar 2011 - 19:50:33 GMT.

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

list of date sections of archive