04-18-2013 05:34 AM
I would like to use PROC MIXED for ANCOVA and repeated measures models for superiority testing. Do you have an idea how to proceed?
Thanking you in advance.
04-18-2013 11:53 AM
I usually don't do superiority (or noninferiority) testing, so it would be good if others jumped in with comments. But here are some things that can help. In superiority testing, you usually perform one-sided tests; moreover, there may be a so-called margin (a constant, c). So, the alternative hypothesis (for treatments A vs B) could be Ha: mu_B - mu_A > c (where c could be 0). Many also advocate using a different alpha for hypothesis testing (say, 0.025). (You also must be careful about directions: is a positive difference a good or bad thing?). One can easily do one-sided testing with MIXED, by just putting the UPPER option in an ESTIMATE statement. However, one cannot incorporate a margin easily. But you can do this with the PLM procedure, which is called after running MIXED. The margin is called the TESTVALUE (as an option in LSMESTIMATE or ESTIMATE). Here is a simple program to generate four treatments in a block design. The results are STOREd, and then processed in PLM. I show a simple difference of B and A, and then a one sided test, and then a one-sided test with a margin of +1, and then change the alpha to 0.025. More statements could be added for other treatments. I assume here that you want to know if B is superior to A. In this generated example, B is superior to A when the margin is 0, but not when it is 1. (As I said above, those who do superiority testing may have more to say, and have better suggestions. But this approach does work for one-sided tests, with or without a nonzero margin. The question remains: is this what you need?).
do block = 1 to 8;
bl = rannor(1);
do trt = 1 to 4;
resid = rannor(1)*1.3;
mean = 10*(trt=1) + 12*(trt=2) + 12*(trt=3) + 16*(trt=4);
y = mean + bl + resid;
proc print data=s;
proc mixed data=s;
class block trt;
model y = trt;
proc plm restore=sasuser.sfile;
lsmestimate trt 'trt A vs B' -1 1/ cl;
lsmestimate trt 'B sup to A?' -1 1 / upper cl;
lsmestimate trt 'B sup to A + marg?' -1 1 / upper testvalue=1 cl;
lsmestimate trt 'B sup to A + marg, alpha=2.5%' -1 1 / upper testvalue=1 alpha=.025 cl;