I want to mean center my interaction terms in a regression model (i.e., make the mean zero for each variable). I understand that I am supposed to mean center my variables first and then multiply them together to create my interaction term. But is it a problem that when I multiply two negative scores, I will have a positive score? I haven't been able to find a good answer to this. Thank you!

  • $\begingroup$ It's not a problem. You'll get the same coefficient a p-value of the interaction term regardless of whether you center or not. The intercept and coefficients on the covariates will change (which is what you want). $\endgroup$
    – Noah
    Jul 11, 2019 at 18:49
  • $\begingroup$ Thank you for your response! I found that some (but not most) of the coefficients for the interaction terms in my regression changed when I did vs. did not mean center them. I specifically found that the coefficients for interactions terms that previously had a lot of multicollinearity with other terms in my model decreased when I mean centered my variables. Is that not something that should be expected? Thanks again for your help!! $\endgroup$
    – Sarah
    Jul 11, 2019 at 19:14

1 Answer 1


You don't have to mean-center variables that are included in interaction terms. Back in the dark ages when people did statistical calculations by hand on mechanical (not electronic) calculators having limited precision, there might have been some practical advantages to centering first. But modern computing hardware and software make that unnecessary. Frank Harrell has commented here: "I almost never use centering, finding it completely unncessary and confusing."

But if you do center, you will still get the correct results because of your observation that "when I multiply two negative scores, I will have a positive score."

Say that all regression coefficients (including for interactions) and the variables in their original scales are positive. Then a two-way interaction term adds a more positive contribution to the final prediction than either of the variables would contribute individually.

Now say that you center the data, and you have a situation where both predictor variables have values below their means. You still want that two-way interaction to add a more positive contribution to the final prediction than either of the variables would contribute individually. So their "positive score" in the interaction is just what you want. The difference is that, after centering, the individual contributions of both predictors will have been negative relative to the (new) intercept of the mean-centered model.

Between centering and not, the intercept and coefficients for variables involved in interactions with centered variables will change. The coefficient for a centered predictor will not change, however, unless it is involved in an interaction with another centered variable.

To see this, consider the following linear model for $y$ using predictor $x$ centered around its mean value $\bar x$ and uncentered $z$:

$$y = \beta_0 +\beta_1(x-\bar x)+\beta_2z+\beta_3(x-\bar x)z$$

Collecting together terms that are constant, those that change only with $x$, those that change only with $z$, and those involving the interaction, we get:

$$y = (\beta_0 - \beta_1\bar x)+\beta_1 x+ (\beta_2 - \beta_3\bar x)z+\beta_3xz$$

Compare that against the corresponding model with neither $x$ nor $z$ centered:

$$y=\beta_0' + \beta_1'x+\beta_2'z +\beta_3' xz$$

So centering $x$ changes the intercept and the coefficient for $z$ from the uncentered model, but leaves the coefficients for $x$ and for the $xz$ interaction unchanged.

The reported p-values for the coefficient for $z$ will differ between the uncentered and $x$-centered models. That might seem troubling at first, but that's OK. The correct test for significance of a predictor involved in an interaction must involve both its individual coefficient and its interaction coefficient, and the result of that test is unchanged by centering.

  • $\begingroup$ Does this apply to squared variables as well? Say I want to test Y = constant + X1 + X2 + X2^2. If I center predictors, should I (a) compute X2^2 based on the centered or (b) the un-centered X2? I thought the uncentered, because squaring negative scores removes their difference from originally positive scores. That is, -3 and +3 both become +9. Regression with approach (b) gives the same regression coefficients as un-centered predictors, (a) does not (and gives me a very skewed distribution of X2^2). $\endgroup$
    – cibr
    Sep 16, 2022 at 16:11
  • 1
    $\begingroup$ @cibr if X2 is involved in both linear and polynomial terms, you have a good example of why Frank Harrell thinks that centering can be confusing. I suppose that in principle you could separate out the X2 and X2^2 predictor values and center them and analyze them separately, but then you'd have to do the same thing whenever you wanted to make a prediction from the model. Lots of ways to make mistakes and get confused. In a situation like that, if you really have to center for some reason, center X2 itself and just accept whatever values of X2^2 you get from the values centered in the X2 scale. $\endgroup$
    – EdM
    Sep 27, 2022 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.