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
- /
- Analytics
- /
- Stat Procs
- /
- Multiple EDF testing

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

11-03-2016 10:11 PM

I'm trying to help a researcher that tested for an effect of a drug on viral plaque size. Treatments included four levels of drug including 0 (the vehicle control). Only one set of measurements are available for each level of drug treatment. So I've wondered if it is possible just to test for differences in the resulting distributions of viral plaque size by running the following:

(SAS ver 9.3)

proc npar1way edf;

class treatment;

var log_area ;

run;

that results in the following plus K-S and C-vM stats.

Is there a multiple comparison procedure that can be applied to test all pairwise combinations?

Or do i just add a where clause to multiple repeats of the sas code above to do each comparison 'by hand'?

The researcher actually did the expeimenrt using four culture plates (replicates) per treatment group, but they didn't save the plate information when doing the measurements, so i don't feel i can really consider doing some sort of anova.

Interested in peoples thoughts and considerations.

Thank you,

Dave

Accepted Solutions

Solution

11-07-2016
01:09 PM

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

11-05-2016 06:59 AM

All Replies

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

11-05-2016 06:07 AM

I'm not a statistian but a SAS programmer.

You can run any SAS code with slight changes with more than one method.

Please post an example of two or three permutations of your code and me or anyone else

shall post available code to run it at one submit.

Your code is:

**proc npar1way edf;**

**class treatment;**

**var log_area ;**

**run;**

** **

you asked for multiple ...pairwise combinations:

It is possible to enter the combinamtions __manually__ or create them __programatically__.

Please post few lines of your data with the variable names.

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

11-07-2016 01:09 PM

Shmuel,

I really wanted to discover an option like DSCF pointed out by Rick (below) but as applied to the EDF stats. It looks like I might have to do that type of statistical correction by hand. But I would like to know how to code to produce all-pair-wise comparisons, since the first step in doing the corrections by hand is getting the stats efficiently.

There are four treatment levels (call them A B C D). The all-pairwise comparisons would be AB, AC, AD, BC, BD, CD. I would code them individually using a where statement to cycle through these options. So, for example, the first one would be:

proc npar1way edf ;

class treatment;

where treatment in ('A', 'B');

var log_area ;

run;

the next one would be

proc npar1way edf ;

class treatment;

where treatment in ('A', 'C');

var log_area ;

run;

and so on...

In this particular case, there aren't that many to write out but I am interested in what you would suggest to be more efficient.

Thank you.

Dave

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

11-07-2016 04:48 PM

@das although you have signed already a solution, I hope you will find interest in next code.

Most of the code I have tested and it runs Ok. I couldnt run the **proc npar1way **as I have not the data;

(1) __Get individual arguments and create pairs (assuming AB = BA), using a macro:__

%macro cre_pairs(odds=);

%global PAIRS; /* macro variable to contain the computed pairs */

%LET N = %SYSFUNC(COUNTW(&ODDS));

%LET M = %eval(&n * (&n-1) / 2);

%PUT n= &n M= &m;

%let PAIRS =; /* initiated as empty string */

%do i=1 %to &n;

%do j=%eval(&i+1) %to &n;

%let PAIRS = &pairs %quote(%scan(&odds,&i)),%quote(%scan(&odds,&j));

%end; %end;

%put PAIRS= &pairs; /* display final computed pairs in the log */

%mend;

%cre_pairs(odds=A B C D E);

(2) Use computed pairs to submit **proc npar1way edf ;**__ for each pair__:

data _NULL_;

pairs = symget('PAIRS'); /* same as but cannot use &pairs */

pairs_count = countw(pairs , ' ');

do i = 1 to pairs_count;

call execute('proc npar1way edf ; class treatment; where treatment in (' ||

scan(pairs, i, ' ') || '); var log_area ; run; );

end;

RUN;

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

11-08-2016 12:46 AM

One more important step - instead of entering the **arguments** manually as:

%cre_pairs(odds=**A B C D E**);

it can be done by coding:

proc sql;

select distinct var1 into :**my_odds** seperated by ' ' /* enter your variable name instead var1 */

from have;

quit;

%cre_pairs(**odds=&my_odds**);

Solution

11-07-2016
01:09 PM

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

11-05-2016 06:59 AM

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

11-07-2016 12:56 PM

Rick.

I missed that. I guess I am used to looking for post hoc test requesting down a ways in the lines of code, like in post-model statements LSMEANS/CONTRAST/TEST. Didn't occur to me that they could be listed in the procedure line of code. Thank you very much for pointing this out to me.

I was hoping that there was a way to code for multiple comparions on the EDF stats. The above only applies DSCF to an ANOVA on Wilcoxon scores. I suppse I can 'hand-apply' tukey or BON corrections to the multiple EDF stat tables produced by cycling NPAR1WAY through the comparisons individually. I'm just not a statistician and so don't know if this is appropriate to K-S C-vM stats.

Dave

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

11-08-2016 09:54 AM

Well, this is kind of bending the rules a bit, but...

Consider using PROC MULTTEST, with input as the p values obtained. See

My assumption here is that p values are uniformly distributed on (0, 1), and so various methods are available to adjust.

Steve Denham