For our cluster randomized controlled trial we face the issue in STATA of reporting the means and contrasts between treatment groups.
We are analyzing 3 treatment groups at 2 timepoints (0/1).

Because of the random effects of Cluster we opted to change from SPSS to STATA.

This is the original SPSS syntax (without cluster-> not important);
MIXED
SPPB BY Random_Group time
/CRITERIA = CIN(95) MXITER(100) MXSTEP(5) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
PCONVERGE(0.000001, ABSOLUTE)
/FIXED = time Random_Group*time | SSTYPE(3)
/METHOD = ML
/PRINT = SOLUTION LMATRIX
/RANDOM INTERCEPT | SUBJECT(patid) COVTYPE(VC)
/EMMEANS= TABLES( Random_Group*time) compare(time)
/TEST 'change EX2 vs change control' Random_Group*time 1 -1 0 0 -1 1
/TEST 'change EX1 vs change control' Random_Group*time 1 -1 -1 1 0 0
/TEST 'change EX2 vs change EX1' Random_Group*time 0 0 1 -1 -1 1
/SAVE RESID.


As we do have a repeated measures design and have time and 3 treatment groups the syntax for STATA (time and treatment dummy*time interaction, we erased treatment as fixed effect as the effect size is not overestimated this way):
mixed SPPB time int_trt2_time int_trt3_time || Cluster: || patid:

We get lost in the margins function as we want to report treatment marinal means / contrasts (for trt1 trt2 trt3) and these are no fixed effects in the equation.
As the estimated marginal means and contrast are possible in SPSS without treatment in the equation, we would like some help. The manuals do not deliver the solution.
Ofcourse, the treatment effects can easily be obtained from the interaction beta and CI.

-> Next step; Can anyone help us with the means / contrasts and leave us with suggestions for our syntax?