You are correct that your Model 2
makes the most sense if you wish to standardize your continuous predictor C
. The confusion comes from what the intercept and the coefficient for the binary predictor B
mean in Model 0
versus Model 2
.
I assume that Stata is using treatment coding of the predictors, and that by standardizing C
you mean subtracting its mean and dividing by its standard deviation.
Then in Model 0
the intercept (_cons
) is the estimated outcome when C = 0
and B = 0
. The coefficient for B
in Model 0
is the difference from that outcome when B = 1
and C
is still at 0.
In Model 2
, the intercept is the estimated outcome when B = 0
and C_S = 0
; equivalently, when C
is at its original mean value. If C
is associated with outcome and didn't have an original mean value of 0, that should be a good deal different from the intercept in Model 0
even if there is no interaction with B
, representing the outcome difference between C
at 0 and C
at its mean. So the change in intercept between models is expected.
Furthermore in Model 2
, the coefficient for B
represents the difference from the Model 2
intercept outcome value when B = 1
and C_S
is still at 0 (or C
is at its original mean value). If there is an interaction between B
and C
, then the magnitude of the association of B with outcome would differ depending on whether C
is at 0 as in Model 0
or at its mean value as in Model 2
. That's exactly what you're finding, and expected if there is an interaction.
You can find equations illustrating how simply centering a variablecontinuous predictor affects the intercept and the coefficients of other predictors interacting with it in this answer. If all you did was center the continuous predictor, those equations show that the associated interaction coefficients don't change. For example, the interaction coefficient in Model 0
between the continuous predictor C
and the binary predictor B
is the outcome difference following a unit change in C
, between B = 0
and B = 1
. In a linear model, the effect of a unit change in C
is the same regardless of whether you are starting from C = 0
or from C
at its mean value.
But in forming the C_S
predictor for Model 2
you didn't just center; you also scaled by the original standard deviation of C
. So the coefficients for C_S
and for the C_S:B
interaction represent the effects of unit changes in the C_S
scale, not in the original C
scale. The coefficients associated with C
in Model 0
thus differ from those associated with C_S
in Model 2
, in a ratio determined by the standard deviation of C
used in scaling to get C_S
.