Skip to content
Prev 246624 / 398506 Next

Splitting a Vector

I think that you are looking for the 'resid' and 'fitted' functions, these will give you the residuals and fitted values from an lm object (that added together gives the original response but are orthogonal to each other).  Those values can then be assigned to a data frame or used by themselves.