0

The documentation for the MASS package does not detail the calculation method for the standardized residuals using stdres(). I want to be sure that it matches the method I intend to use:

residuals/(stdevres*sqrt(1-hat))

Does someone know if this is the calculation applied in this function?

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
Sue
  • 1
  • 1
  • Hi Sue and welcome to the site. The formula is given in the [book](http://goo.gl/ChYbP5) "Modern applied statistics with S" on page 151: $e_{i}'=e_{i}/s\sqrt{1-h_{ii}}$ which matches your formula. Alternatively, have a look at the source code of the function in the MASS package by typing: `lmwork` without parentheses in `R` after loading the MASS package. – COOLSerdash Jul 05 '14 at 14:17
  • 1
    @COOLSerdash - since you've answered the question, you may as well move it to an answer and get credit for it! – jbowman Jul 05 '14 at 15:56

1 Answers1

3

Yes, according to Venables and Ripley, pages 151-152, stdres() returns $$e'_i=\frac{e_i}{s\sqrt{1-h_{ii}}}$$

However they recommend using studentized residuals (in particular for normal probability plots), which are computed by studres(). I've expounded here their difference.

Sergio
  • 5,628
  • 2
  • 11
  • 27