I have a linear mixed model that analyses the effect of multiple continuous and a categorical (two level, deviation coding of contrasts) predictor on a normally distributed outcome variable (dv). Following Barr (2021, https://psyteachr.github.io/stat-models-v1/multiple-regression.html?q=scal#standardizing-coefficients) I wanted to z-transform the continuous predictors (using
scale()) to standardise the coefficients of the continuous predictors. In one of the models, R also gave back the following warning:
## Warning: Some predictor variables are on very different scales: consider rescaling.
However, I noticed that scaling changes the main effect of the categorical predictor. For the purpose of clarity, I will present a smaller but representative version of the actual model here to illustrate my point. This is the
lmer command I used for this smaller model:
m = lmer(formula = dv ~ cat * cont + (1 |sub) + (1 | stm), data = df_sel)
I did this once with the raw and once with the scaled continuous predictor:
As you can see, it changes the main effect of the categorical predictor while the continuous and the interaction stay the same. I would have expected that none of the statistical values change, just the estimates. When investigating a bit, the only difference I found was that scaling gets rid of some moderate colinearity:
Can this really have such a large effect on the main effect of the categorical predictor? Am I justified in scaling the predictor?
Edit: Here are the outputs
plot_model(m2, type = "int"):