[Rd] standardized residuals (rstandard & plot.lm) (PR#8468)

maechler@stat.math.ethz.ch maechler at stat.math.ethz.ch
Tue Jan 10 15:58:55 CET 2006


>>>>> "Heather" == Heather Turner <Heather.Turner at warwick.ac.uk>
>>>>>     on Tue, 10 Jan 2006 14:30:23 +0100 (CET) writes:

    Heather> This bug is not quite fixed - the example from my
    Heather> original report now = works using R-2.2.1, but

    Heather> plot(Uniform, 6)

    Heather> does not. The bug is due

    .........
     g <- hatval/(1 - hatval) # Potential division by zero here 

     plot(g, cook, xlim = c(0, max(g)), ylim = c(0, ymx),
     ..........

    Heather> All other values of 'which' seem to work
    Heather> fine. Sorry not to have checked this in the beta
    Heather> version,

(indeed; that would have been useful)


Hmm, it's not clear what *should* be drawn in such a
case. Leaving away all the observations with  h_ii = 1
seems a particularly bad idea, since these are the ones that
you'd definitely should remark.
OTOH, for h_ii = 1, the cook distance is 'NaN' 
(or should that be changed; to  "very large" instead ???)
and plot number 6 doesn't seem to make any sense to me

When 'which = 6' was proposed 
[ on R-devel as well, last April,
  http://tolstoy.newcastle.edu.au/R/devel/05/04/0595.html
  ah, I see, by David Firth, from your place, so, Heather, can you
  make sure he sees this e-mail ?
]
I actually had wondered a bit about it's general usefulness,..

---

But the example is useful anyway; I think that also plot
number 5, (R_i vs h_ii) does the wrong thing currently by just
leaving away all points for which h_ii = 1.
These really should be shown one or the other way!

Martin



More information about the R-devel mailing list