Dear stata users,
I am using mixed effext model to estimate treatment effects in a RCT. I am building the model without the treatment variable following Twisk 2018, equation 2d. The data is in long format. I have 3 measureponits;t0 (baseline) ,t1 and t2. Gid=class and pid=person id, INT= interventiongroup(value 1)controlgroup (value 0).

I have tried out different ways to estimate Twisk model, but I am confused because it seems like I have to prefix the variable with c. to get the model that I want. I will appreciate if someone could tell my why is this? And which command do I use to get the correct model?


Equation 2d from Twisk:
Yt=B0+B1 dummytime1+ B2 dummytime2+ B3 dummytime1*X+ B4 dummytime2*X



I have used the following command in Stata:

Model 1:
mixed dependent ib0.time i.INT#ib0.time ||gid:||pid:
(dependent variable) Coef.
time
1 .2402717
2 .3587286
INT#time
interventiongroup#0 -.547065
interventiongroup#1 .1305625
interventiongroup#2 -.0608405
_cons 28.98464

However, I don’t get the output that Twisk recommend when using this command (see model 1). According to Twisk it should only be 4 parameters: time1,time2, time1#int and time2#int.

When I use the command above I get the model (model 2) that are similar to that one Twisk recommend, note that I prefix the variables with c. and I use dummytime variables. If I prefix with i. see model 3, I get another results.

Model 2:
mixed dependent c.t1 c.t2 c.t1#i.INT c.t2#i.INT ||gid:||pid:
dependent Coef.
t1 .2669381
t2 .3859549
INT#c.t1
interventiongroup .623224
INT#c.t2
interventiongroup .4309041
_cons 28.71222

Model 3
. mixed dependent i.t1 i.t2 i.t1#i.INT i.t2#i.INT ||gid:||pid:
dependent Coef.
1.t1 .2402717
1.t2 .3587286
t1#INT
0# interventiongroup -.0608405
1# interventiongroup .616787
t2#INT
0# interventiongroup -.4862245
1# interventiongroup 0 (omitted)
_cons 28.98464
I apologize for asking such a long question.
Many thanks