I am new to this MMRM stats procedure; I need help figuring out certain things.
In my data, I have the 3 subjects who took 3 treatments and records over 3 visits (+ Baseline). I need the following statistics
a. 95% CI for the Means for all the treatments
b. Difference in Means ( between the Drugs and Control)
C. The same stats are presented in (a, b) for overall combined 'Drug treatments' that is 95% CI for 'OVERALL' and difference in Means for 'Overall Vs. Control'. When I include the 'overall' treatment in the procedure, it generates no stats. So, I excluded it from my code to run.
I am not sure, I am using the right method do I need to run the 'Overall" treatment (999) separately or is there any way I can do 'Overall Vs Control" with in the same code.
I output the lsmeans and diffs data sets from the 'PROC MIXED" procedure, but I am unsure how to pull the required information out since there are so many records I couldn't see what value represents which interactions. I appreciate your help.
data have;
input sid$ visit$ visitnum test$ aval base chg pchg treatn treat$;
datalines;
101 Baseline 0.5 blood 20 20 . . 1 Control
101 Visit1 1 blood 30 20 10 50 1 Control
101 Visit2 2 blood 20 20 0 0 1 Control
101 Visit3 3 blood 43 25 18 41.8 2 Control
201 Baseline 0.5 blood 20 20 . . 2 Drug_A
201 Visit1 1 blood 45 25 20 62.5 2 Drug_A
201 Visit2 2 blood 27 20 7 25.9 2 Drug_A
201 Visit3 3 blood 27 20 7 25.9 2 Drug_A
301 Baseline 0.5 blood 20 20 . . 3 Drug_B
301 Visit1 1 blood 50 20 30 60 3 Drug_B
301 Visit2 2 blood 44 20 24 54.5 3 Drug_B
301 Visit3 3 blood 67 25 42 62.7 3 Drug_B
data have1;
set have (in=a) have(in=b where =(treatn ne 1));
if b then do;
treatn =999;
treat = 'Overall';
end;
run;
/*ODS to create the data set containing all the means. */
proc sort data = have1; by test sid visitnum; run;
ods output LSMeans=LSmean1 diffs= mean_df;
proc mixed data=have1;
by test;
where chg ne . and treatn ne 999;
class treatn visitnum sid;
model chg = treatn visitnum treatn*visitnum;
repeated visitnum / subject=sid type=UN;
lsmeans treatn*visitnum/pdiff cl;
run;
... View more