I’m using the {MuMIn}
package in R to select models (dredge, get top models, average etc). My question is about whether I need to, or should, standardise my variables.
I have five continuous variables (one of them the response variable), all on a scale from 0 to 100. I also have three categorical variables (two binary, one is categorical with three levels).
I would like answers for two options; one option where an interaction between a continuous and a categorical (3 levels) variable is included, and one where there are no interactions.
m1 <- lmer(cont1 ~ cont2 + cont3 + cont4 + cat1 + cat2 + cont5*cat3 + (1|ID), na.action = na.fail, data = dat)
m2 <- lmer(cont1 ~ cont2 + cont3 + cont4 + cat1 + cat2 + cont5 + cat3 + (1|ID), na.action = na.fail, data = dat)
I have read that scaling is useful to improve the stability of models and the accuracy of parameter estimates if variables in a model are on large or vastly different scales. I assume this only refer to continuous variables (which are on the same scale in these data) and does not include having categorical predictors as well.
When interactions are present, most sources agree I should centre continuous variables to avoid multicollinearity issues, and that centering variables permits interpretation of main effects when interactions are present. But I am not sure whether to then only centre/scale continuous variables and leave categorical predictors alone?
I have also read that centering predictors is essential when model averaging is employed (which I will do), and standardization facilitates the interpretation of the relative strength of parameter estimates – although its not fully clear whether they mean in general or only when interactions are present.
Would it be okay to use the standardize()
function from the {arm}
package (Gelman et al., 2009) in R for my interaction option, which standardises predictors by centring and dividing by 2 SDs. Here is a description of what the function does:
“Numeric variables that take on more than two values are each rescaled to have a mean of 0 and a sd of 0.5; Binary variables are rescaled to have a mean of 0 and a difference of 1 between their two categories; Non-numeric variables that take on more than two values are unchanged; Variables that take on only one value are unchanged.”
Is that an alright thing to do? Most sources I’ve come across only talk about centring continuous predictors. Moreover, I am not wholly sure whether to standardise the outcome variable too (currently I’d say not, and then each coefficient represents the expected change of the response in the responses units per 2 SD change in the predictor?).
As multiple sources say not to standardise unless absolutely necessary, I was going to not standardise / centre / scale anything for the one without interactions - is that right?
Any insights would be greatly appreciated!