[R-lang] residualization of a three-way contrast

Kyle Gorman kylebgorman at gmail.com
Fri Apr 10 16:28:15 PDT 2009


i have three positively-correlated predictors that i'd like to include  
in a model. any traditional measure suggests that to include them as  
is would introduce a good deal of collinearity. really, these are a  
great candidate for either taking the sum of the three, or for PCA,  
but hypothetically, let's say i wanted to use a residualization trick  
for this three-way interaction.

(they are all on a 15 point scale and I predict they will all have  
similar positive betas)

X1 will remain as is.

r.X2 = residuals(lm(X2 ~ X1))
r.X3 = residuals(lm(X3 ~ X1 + r.X2)

then:

outcome ~ X1 + r.X2 + r.X3

this is the solution i vaguely recall seeing in a textbook somewhere  
under the name "partialization"
- is this kosher?
- should the form of r.X3 be the naive residuals(lm(X3 ~ X1 + X2)?
- should the form of r.X2 be the less-naive residuals(lm(X2 ~ X1 + X3))?

- kyle

ps: yes, i didn't say anything about language here. but it's a  
language study



More information about the R-lang mailing list