covariate mean-centering

60 views
Skip to first unread message

Elisa Cargnelutti

unread,
Nov 22, 2022, 3:34:25 AM11/22/22
to SwE-Toolbox Support
Dear SwE experts,

I am wondering how to mean center covariates in my design. I have a group of healthy controls and a group of patients with brain tumor. For instance, I want to include tumor volume as a covariate. How could I mean center it, considering that for healthy controls it is obviously 0?

Further, I would like to know if – and in case how – center categorical variables. In the case of two categories, I can use -0.5 and +0.5, but what if the categories are three or more? Is it better to model different categories as subgroups?

Thank you in advance for any help.

Elisa

Manfred Klöbl

unread,
Dec 22, 2022, 1:29:37 PM12/22/22
to SwE-Toolbox Support
Dear Elisa,

you mean-center the tumor volume only within the group of patients. The covariate stays 0 for the controls.
For categorical variables, the meaning of the covariate changes with mean centering. If you consider gender as a categorical variable and you code "female" as 0 and "male" as 1, "female" would be your reference category. So, your results would assume a female population with any male influence regressed out. If you mean-center gender, your results would assume the gender distribution as it is found in your sample. If you code the genders as -0.5 and +0.5, the results would assume a person with average female and male traits (if there are any in your data). If you mean-center all factors/covariates, you need to include a constant term in your model. You can find more on this topic when searching for "effect coding" and "dummy coding".

Best,
    Manfred

Reply all
Reply to author
Forward
0 new messages