Programming the statistical procedures from SAS

Superiority testing and PROC MIXED

Reply
Contributor
Posts: 57

Superiority testing and PROC MIXED

Hi everybody,

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.

Best,

Valued Guide
Valued Guide
Posts: 684

Re: Superiority testing and PROC MIXED

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?).

data s;
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;
        output;
        end;
    end;
run;
proc print data=s;
proc mixed data=s;
class block trt;
model y = trt;
random block;
store sasuser.sfile;
run;
proc plm restore=sasuser.sfile;
lsmeans trt;
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;
run;

Contributor
Posts: 57

Re: Superiority testing and PROC MIXED

Hi LVM,

Thanks a lot for your quick and detailed answer. I have a lot of very useful elements to perform some tests. I think I have my answer.

Best regards,

Ask a Question
Discussion stats
  • 2 replies
  • 846 views
  • 1 like
  • 2 in conversation