I am using the nls function in R to perform a nonlinear regression and need to calculate the studentized residuals. Is this something I need to manually do? It seems like I need to manually do a QR decomposition and calculate the hat matrix to do this. I don't have a problem doing this but I wanted to ask if anyone knew an easier way to do this.

  • $\begingroup$ Internally or externally studentized? $\endgroup$ – Glen_b Aug 31 '14 at 3:03
  • $\begingroup$ This is a homework related question and it's not specified but I would assume internally. $\endgroup$ – statsnewb Aug 31 '14 at 3:05
  • 2
    $\begingroup$ the package nlreg (for heteroskedastic nonlinear regression) has a function (nlreg.diag) that can return a variety of such things including studentized residuals; I don't know much about it but it might be able to do ordinary nonlinear regression for you. $\endgroup$ – Glen_b Aug 31 '14 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.