I need to analysis a imbalanced Incomplete blocks design. Because the distribution is not normal. I decided to use Non parametric method to analysis. I am thinking maybe the Durbin's Test.
data test;
input subject trt response;
datalines;
1 A 2
1 B 2.5
2 A .
2 C 5
3 A 2
3 D 8
4 B 4
4 A 8
5 B 3
5 C 2
6 B .
6 D 8
7 C 4
7 A 2
8 C 1
8 B 7
9 C 2
9 D 8
10 D 2
10 A 0
11 D 5
11 B 2
12 D 7
12 C .
;
PROC FREQ;
table subject* trt*response / noprint cmh2 scores=rank;
run;
I would output the overall Trt difference P-value, but how to do the multiple comparison to show the difference between each two trts?
Thanks,
FRED
PROC MULTTEST is your best bet here. I would suggest doing as you already have to test for overall differences. if that is significant, then comes the not-so-fun part with 4 treatments. You will need 6 runs of proc freq, pairwise comparing each treatment to every other treatment, and saving the raw p values to a common dataset. You may then apply PROC MULTTEST as in Example 65.5 inputting Raw p-Values. There are a variety of adjustment methods available. I am a fan of stepdown Sidak or false discovery rate control methods.
Steve Denham
Not sure, Maybe you should check proc glm + lsmeans /durb
Thanks for your advise. I am thinking that maybe lsmean is using a different algorithm if there are some missing values and incomplete blocks. Maybe Glm +Mean?
PROC MULTTEST is your best bet here. I would suggest doing as you already have to test for overall differences. if that is significant, then comes the not-so-fun part with 4 treatments. You will need 6 runs of proc freq, pairwise comparing each treatment to every other treatment, and saving the raw p values to a common dataset. You may then apply PROC MULTTEST as in Example 65.5 inputting Raw p-Values. There are a variety of adjustment methods available. I am a fan of stepdown Sidak or false discovery rate control methods.
Steve Denham
Thank you so much, Steve. and I have a following question,
still the same data set. can we ASSIGN RANKS for each blocks, and if we come across a missing value, we will manually assign a median rank to it (in this case (1+2)/2=1.5). then use PROC MIXED to do the analysis?
proc rank data= test out=base;
by subject;
var response;
ranks R_res;
run;
data base;set base;
if response=. then R_res=1.5;
run;
proc mixed data=base;
class trt subject ;
model R_res=trt subject /residual htype=3;
lsmeans trt/diff cl alpha=0.05;
run;
If you rank by subject, all of the values will be 1, 2 or 1.5, so far as I can tell. What about ranking across all subjects (drop the by subject line in PROC RANK) and insert back in the median rank (12.5) for the missings. Then, using PROC MIXED, I would try:
proc mixed data=base;
class trt subject;
model R_res=trt;
random subject;
lsmeans trt/diff cl adjust=simulate(seed=1);
run;
This works for the test data stream.
Steve Denham
Thank you so much again, I will try on this one and let you know the results !
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.