turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Proc Freq: How to preform a multiple comparison in...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-01-2014 10:31 AM

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

Accepted Solutions

Solution

07-02-2014
02:55 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-02-2014 02:55 PM

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

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-02-2014 09:30 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-02-2014 09:36 AM

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?

Solution

07-02-2014
02:55 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-02-2014 02:55 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-02-2014 03:26 PM

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;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-02-2014 03:46 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-02-2014 03:56 PM

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