Suppose I am fitting a linear model, and I have two continuous predictors
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,
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
x2:x2 to just plain
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.]