Suppose I am fitting a linear model, and I have two continuous predictors x1 and x2. I think that they might interact, so I add the (linear) interaction term to my model (i.e., the pointwise product x1 * x2).

Now, as a rule of thumb, it seems to me that as soon as I do this, I should probably also include quadratic terms, x1^2 and x2^2. Otherwise, in case my predictors are correlated and have non-linear effects (and aren't everyone's predictors always correlated and having non-linear effects, at least to some extent?), then I might get a spuriously significant interaction. The correlation between predictors means that their linear interaction is confounded with the quadratic effect of either predictor alone, and so if I leave those quadratic predictors out of my model, then my model's best strategy to capture any single-variable quadratic trend is by using the two-variable interaction, making it look significant when it really isn't.

My question is:

  • Is this reasoning valid?
  • Is this a well known rule of thumb, e.g., is it stated as a recommendation in any standard books?

Another way of putting it: in R terms, suppose I find myself writing something like:

lm(y ~ (x1 + x2)^2, data)

Now the way R will interpret this is, it expands it to

lm(y ~ x1 + x2 + x1:x1 + x1:x2 + x2:x2, data)

but then it reduces the self-interactions x1:x1 and x2:x2 to just plain x1 and x2, so we end up with

lm(y ~ x1 + x2 + x1:x2, data)

So, if I find myself writing something like (x1 + x2)^2, should I instead make a habit of writing

lm(y ~ (x1 + x2)^2 + I(x1^2) + I(x2^2), data)

so as to include the quadratic "self-interactions"?

[Background: I'm wondering if I ought to alter patsy to interpret self-interactions for continuous variables like x:x as equivalent to I(x^2), instead of following R and interpreting them as equivalent to x. So I really am interested in the general case/"rule of thumb" rather than a specific instance.]

  • 1
    $\begingroup$ I'm curious to know the answer as well, and would encourage anyone answering to weigh in on whether it's important to address nonessential multicollinearity by centering before multiplying variables (including squaring them) in this case. I've been taught that it is, but I've read recently that centering sometimes makes no difference and never eliminates essential multicollinearity (that much I had been taught previously as well). $\endgroup$ – Nick Stauner Apr 5 '14 at 23:49

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.