Programming the statistical procedures from SAS

Multiple EDF testing

Accepted Solution Solved
Reply
Contributor das
Contributor
Posts: 44
Accepted Solution

Multiple EDF testing

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.

EDFPlot14.png

 

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
SAS Super FREQ
Posts: 3,556

Re: Multiple EDF testing

The DSCF option on the PROC NPAR1WAY statement requests multiple comparisons. See the documentation for the PROC NPAR1WAY statement.

View solution in original post


All Replies
Trusted Advisor
Posts: 1,443

Re: Multiple EDF testing

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.

 

 

Contributor das
Contributor
Posts: 44

Re: Multiple EDF testing

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

Trusted Advisor
Posts: 1,443

Re: Multiple EDF testing

@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;

              

 

 

Trusted Advisor
Posts: 1,443

Re: Multiple EDF testing

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
SAS Super FREQ
Posts: 3,556

Re: Multiple EDF testing

The DSCF option on the PROC NPAR1WAY statement requests multiple comparisons. See the documentation for the PROC NPAR1WAY statement.

Contributor das
Contributor
Posts: 44

Re: Multiple EDF testing

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

Respected Advisor
Posts: 2,655

Re: Multiple EDF testing

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

 

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

 

http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_multtest_exa...

 

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

 

Steve Denham

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 330 views
  • 6 likes
  • 4 in conversation