Dear Steve, Many thanks for trying to help me. But I still have not what I need because my interest is in the estimate and se for the difference in difference. The extent that the “trt diff for sex = 1” is different from the “trt diff for sex=2” at specific ages. I was already able to get an estimate for the effect of either trt or sex at a specific value for age with for instance: estimate 'Diff trt at sex 1 x= 20' trtn [1,1] [-1,2] trtn*sex [1,1 1] [-1,2 1] trt*spl [1,1 20] [-1,2 20] trt*sex*spl[1,1 1 20] [-1,2 1 20] /e; and indeed, your code lsmestimate trt*sex 'Trt diff for sex=1 at age = 20' 1 0 -1 0; works as well (even though this one fails: lsmestimate trt*sex 'Trt diff for sex=1 at age = 20' 1 0 -1 0, 'Trt diff for sex=2 at age = 20' 0 1 0 -1/at age=20;) but what I need is the contrast of 'Trt diff for sex=1 at age = 20' versus 'Trt diff for sex=2 at age = 20’. Kind regards, Sophie
... View more