3 weeks ago
I want to estimate the treatment effect( before and after analysis) .
I have a long format dataset with repeated measures for the outcome ( pre and post treatment) and also pre and post measures for the explanatory variables( for example age changes between pre and post treatment).
Indeed, I want to see if the changes in the outcome is because of the treatment while I control for the effect of changes in other covariates.( here I have a challenge, shold I only put the covariates of the after treatment)
If my way is correct then I was wondering if proc mixed is useful like below:
should I put Id in class statement? or should I use repeated statement instead of random?
PROC MIXED DATA = long;
CLASS after(ref=) treatment(ref=) ;
MODEL outcome=after treatment after*transition covariate1 covariate2... / SOLUTION;
ESTIMATE 'D-I-D' transition*POST 1 -1 -1 1;
Random int/ SUBJECT=Id TYPE=UN ; run;