BookmarkSubscribeRSS Feed
AnalytX
Fluorite | Level 6

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,

2 REPLIES 2
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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;

AnalytX
Fluorite | Level 6

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,

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 5223 views
  • 2 likes
  • 2 in conversation