Programming the statistical procedures from SAS

Sample size calculation for three groups

Regular Contributor
Posts: 182

Sample size calculation for three groups

Guys, I really need help with this:


I am trying to do a sample size calculation, for comparison of means of three groups as follows:


%let ngroup=34; 	        /*n per group*/
%let sd=15;			/*standard deviation*/
%let power=0.80;	        /*Required power*/
%let m1=20;			/*Mean group 1*/
%let m2=30;			/*Mean group 2*/
%let m3=30;			/*Mean group 3*/
%let alpha=0.05;		/*Mean group 3*/

proc power; 
  onewayanova test = overall
  groupmeans = &m1 | &m2 | &m3 
  stddev = &sd 
  npergroup =  &ngroup 
  power = .
   plot x=n min=1 max=100 npoints=20;


OK so this is telling me that with 34 per group I will get a power of 0.80

Correct me if I am wrong, but this will only tell you how strong your power is to detect overall difference, and not between group differences.

I am also interested in taking into account pairwise comparisons when doing the sample size calculation, I can think of two strategies and I dont know if they are adequate:

1. use  Bonferroni correction dropping the alpha to 0.05/ngroup(3)=0.017

or use contrast but i am not sure if contrasts are right and what /how to use them

Could anyone please please try o help me out with these questions?

Regular Contributor
Posts: 182

Re: Sample size calculation for three groups

Anyone has any suggestions pease?

All help is appreciated

Kind regards


Ask a Question
Discussion stats
  • 1 reply
  • 1 in conversation