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:


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

  • $\begingroup$ Hi Sue and welcome to the site. The formula is given in the book "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. $\endgroup$ Jul 5, 2014 at 14:17
  • 1
    $\begingroup$ @COOLSerdash - since you've answered the question, you may as well move it to an answer and get credit for it! $\endgroup$
    – jbowman
    Jul 5, 2014 at 15:56

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.