[R] partial residuals

From: Irene Mantzouni <ima_at_aqua.dtu.dk>
Date: Fri, 02 May 2008 19:31:47 +0200


Dear all,  

I am trying to estimate partial residuals for the multiple regression lm model:  

a.lm=lm(y~x1+x2)  

I use the function

 residuals(a.lm, type="partial")  

However, the results are much different when I use the "manual" method to get partial residuals for x2 (or for x1):  

residuals(a.lm) +b1*x1  

Where b1 is the estimated coefficient for x1 in the lm model and x1 is the vector of the first predictor.  

What is the difference (or my error) in these methods?  

Thank you!

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 02 May 2008 - 18:57:07 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 Fri 02 May 2008 - 19:30:33 GMT.

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

list of date sections of archive