BookmarkSubscribeRSS Feed
BFleming
Calcite | Level 5
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.
3 REPLIES 3
StatDave
SAS Super FREQ
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
BFleming
Calcite | Level 5
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?
StatDave
SAS Super FREQ
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1272 views
  • 0 likes
  • 2 in conversation