Interpreting Lower Order Coefficients When the Model Contains an Interaction

by Karen Grace-Martin

A Linear Regression Model with an interaction between two predictors (X1 and X2) has the form:

Y = B0 + B1X1 + B2X2 + B3X1*X2.

It doesn’t really matter if X1 and X2 are categorical or continuous, but let’s assume they are continuous for simplicity.

One important concept is that B1 and B2 are not main effects, the way they would be if there were no interaction term.  Rather, they are conditional effects.

A main effect means that B1 is the effect of X1–the difference in the mean of Y for each one unit change in X1.  But B1 is the effect of X1 conditional on X2 = 0.

For all values of X2 other than zero, the effect of X1 is B1 + B3X2.

The biggest practical implication is that when you add an interaction term to a model, B1 and B2 change drastically by definition (even if B3 is not significant) because B1 and B2 are measuring a different effect than they were in a model without the interaction term.

So don’t panic if B1 suddenly isn’t significant.  It’s measuring something else altogether.

So B1, in the presence of an interaction, is the effect of X1 only when X2 = 0.

If X2 never equals 0 in the data set, then B1 has no meaning.  None.

This is a good reason to center X2.  If X2 is centered at its mean, then B1 is the effect of X1 when X2 is at its mean.  Much more interpretable.

Even better is to center X2 at some meaningful value even if it’s not its mean.  For example, if X2 is Age of children, perhaps the sample mean is 6.2 years.  But 5 is the age when most children begin school, so centering Age at 5 might be more meaningful, depending on the topic being studied.

If X2 is categorical, the same approach applies, but with a different implication.  If X2 is dummy coded 0/1, B1 is the effect of X1 only for the reference group.

The effect of X1 for the comparison group is B1 + B3.  To see why, plug in 0 for X2 for the reference group and write out the regression equation.  Then plug in 1 for X2 for the comparison group.  Do the algebra.

{ 5 comments… read them below or add one }

Elaine

Omer, it’s not a silly question. Depending on your software, you command it to show the basic info of x. For STATA, its sum X2. I forget for sas but something similar.

The sum command will show the mean value for X2 in your data. Say it’s 6.2. You must now generate a new variable for X2. In stata, you would say
gen X2_c (or whatever name you like) = X2-6.2

Your data is now centered. I believe to center at a different value you would just subtract that value from X2, but that seems too simple. I’m a beginner, too.

Reply

Karen Grace-Martin

Hi Elaine,

No, you got it–it really is that simple. For whatever value you want to center on, just subtract that value from X2.

Reply

Charles Lao

Nice post. However, I think the condition only apply if your design matrix is a offset from reference model. For a over-parameterized model or sigma-restricted model B1 will the your main effect.

Reply

Omer

Hi Karen,

This may be a silly question but how do you center X2?

Reply

Soutik

Hi Omer,

You can center X2 by standardizing it, i.e. (X2-mean(X2))/sd(X2)

Reply

Leave a Comment

Please note that, due to the large number of comments submitted, any comments on problems related to a personal study/project will not be answered. We suggest joining Statistically Speaking, where you have access to answers and more resources 24/7.

{ 1 trackback }

Previous post:

Next post: