I am encountering a problem when using inverse probability of treatment weights with linear mixed-effects models for a difference-in-differences analysis.
I have longitudinal data on participants. I weighted each treatment condition to be equal on covariates including the baseline outcome. When I use these weights in a GEE model it accurately finds no difference between conditions at baseline. But when I use a linear mixed-effects model with a random participant intercept the conditions are no longer equal on the outcome at baseline.
(I'm including SAS code to illustrate the problem - I know the code is correct but I don't know why the baseline treatment effect differs between the two methods. In the code below, time is treated as categorical and timec is continuous.)
For example, this GEE model correctly reports no difference in outcome at baseline by treatment:
proc genmod data = d;
class participant treatment(ref=first) time(ref=first);
model outcome = treatment|time / cl;
repeated subject=participant / within=time type = un;
weight iptw;
run;
While this linear mixed-effects model incorrectly finds a baseline difference in outcome by treatment:
proc mixed data = d empirical;
class participant treatment(ref=first) time(ref=first);
model outcome = treatment|time / cl;
random int timec / subject=participant type = un;
weight iptw;
run;
Has anybody else encountered this? I have tested this out and it is specifically the random participant intercept that leads to the baseline difference by treatment level. Why would this be the case?