I'm currently working on a nested data set consisting of 100 subjects which answered several questions at home on five consecutive days (ecological momentary assessment). Among them, they were asked if they adhered to the study protocoll on each given day (no/ yes), leading to 0 (no) or 1 (yes) in the data for each of the five days. The continous outcome variable was also assessed on each day.
The reserach question is whether beeing adherent on a given day has an effect on the outcome. Now, to explore the effect of the adherence on the outcome variable, I built a nested multilevel model (days within subjects) predicting the outcome by some covariates, a random intercept (high ICC) and the variable coding for adherence (0 or 1).
Normally, I would proceed and disentangle within-subject variations (person mean centered) from between-subject variations (grand mean centering of the person means) for the adherence variable. However, it seems rather odd to me to center a dichotomous variable. On the other hand, I know that it is necessary in order to get a clear picture of the within-subject effect. When not centering, I could enter the 0/1 adherence variable as a factor. However, in this case, it would confound within- and between-subject variations (because subjects do not only differ as compared to themselves but also in their total amount of adherence in comparision to the group, the grand mean).
Do you have any advice on whether I should center the 0/1 variable? If yes, how would you center? If no, how would you proceed?
Dear Erik (and everybody else interested), I know it has been a year or so but I have a follow up question and I think you could maybe help me with that, too:
I now have decided to add the dichotomous predictor as centered on the person means. Just as you predicted, when the person mean is added to the model, I geht within-subject effects for both variants (person-mean centered and person mean vs. 0/1-factor and person mean). Both variants are yielding exactly the same results.
I now have also added an interaction of the person-mean centered variable with a grand-mean centered covariate (person means centered at the grand mean). So far so good. However, I just tried and refitted the model with the dichotomus factor (0/1-factor) instead of the person-mean centered predictor and the interaction term changes drastically.
Do you have any idea why?
In short, it looks something like this:
y = x (as a factor with 0 / 1) * z (grand mean centered person mean of z) + x (person mean of x)
y = x (centered on the person mean) * z (grand mean centered person mean of z) + x (person mean of x)
Both interactions are giving me different results.
Thank you very much in advance!