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@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.

Reply via email to