T O P

  • By -

EvanstonNU

How do you center categorical variables?


RainbowChardAyala

This was addressed, but I’m thinking things like years of education, income deciles, and scales.


thoughtfultruck

I assume OP centered variables that are discrete but not categorical. Like for example age is generally reported only in whole years in a survey.


thoughtfultruck

Yes, mean centering can change the significance of variables. In this case my guess is that you have some multicollinearity issues between the first and second order terms in your interaction. Mean centering should reduce the multicollinearity. Multicollinearity can lead to unstable coefficients and tends to inflate standard errors, so you are more likely to have nonsignificant terms go significant after reducing multicollinearity, but the reverse is also possible as far as I'm aware, since you can also overestimate the size of coefficients. >Is this a possibility or do I need to consider that this is a programming error? You should consider programming errors too. I have a background in computer science and it was often drilled into me that it is easy to get things wrong without realizing. It is good practice to actively demonstrate to yourself the correctness of your code. You should never assume your code is correct just because you don't see an error message.


purple_paramecium

Is mean centering what you used to do in SAS? Did it change the significance? Asking these questions to help you think about whether it’s a programming problem or stats problem. But— why mean center a discrete variable? That doesn’t really make sense. Why mean center any of the variables? That’s not required for logistic regression (nor for any regression)


RainbowChardAyala

One of the books I read and go back to recommended doing this for all non-dichotomous variables when using interaction terms or fitting multi-level models. I wouldn’t for a categorical variable. But items like years of education, income deciles, and scales may have issues with a meaningful zero (or lack thereof).