BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
FredXu
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

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

View solution in original post

6 REPLIES 6
Ksharp
Super User

Not sure, Maybe you should check proc glm + lsmeans  /durb 

FredXu
Calcite | Level 5

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?

SteveDenham
Jade | Level 19

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

FredXu
Calcite | Level 5

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;

SteveDenham
Jade | Level 19

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

FredXu
Calcite | Level 5

Thank you so much again, I will try on this one and let you know the results Smiley Happy!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 3378 views
  • 0 likes
  • 3 in conversation