Programming the statistical procedures from SAS

Generating a list of all combinations of 12 subjects into 2 treatment group

Reply
New Contributor
Posts: 2

Generating a list of all combinations of 12 subjects into 2 treatment group

The original data is:

Placebo
8.62
1.48
8.93
9.57
2.65

Vitamin A
0.06
1.72
2.19
7.32
7.53

I would like to test Fisher’s (sharp) null hypothesis of no treatment effect on these 12 subjects. I want the potential outcomes under the null. I need a way to generate all combination of these 12 subjects placed in 2 groups of equal size (6 each). The data has to be output in a form that I can perform a test on each assignment.

I tried PROC PLAN combination function but I only got the 12:C:6 (924 outcomes) for the treatment group. I did not know how to put the remaining outcomes into the control group. I am not familiar with macros in SAS.
SAS Employee
Posts: 187

Re: Generating a list of all combinations of 12 subjects into 2 treatment group

If you are looking get a permutation-adjusted t-test, you can use PROC MULTTEST which will do the permutations internally for you and give you a permutation-adjusted p-value computed from the p-values of all the permutations. For example:

data a;
input Placebo VitA;
Grp="Placebo"; Y=Placebo; output;
Grp="VitA"; Y=VitA; output;
keep Grp Y;
datalines;
8.62 0.06
1.48 1.72
8.93 2.19
9.57 7.32
2.65 7.53
;
proc multtest data=a perm;
class Grp; test mean(Y);
run;

See the MULTTEST documentation for details on the computations and examples:

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/multtest_toc.htm
New Contributor
Posts: 2

Re: Generating a list of all combinations of 12 subjects into 2 treatment group

Thanks. I may ultimately have to do that as well. But I still need the output for various combinations.

Can this procedure do that as well?
SAS Employee
Posts: 187

Re: Generating a list of all combinations of 12 subjects into 2 treatment group

Use the N= option to control the number of resamples generated (default is 20,000) and the OUTSAMP= option to create a data set containing all of the generated samples. See the MULTTEST documentation:

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/multtest_toc.htm
Ask a Question
Discussion stats
  • 3 replies
  • 71 views
  • 0 likes
  • 2 in conversation