BookmarkSubscribeRSS Feed
ivyc
Calcite | Level 5

Hi All,

I am new to proc power procedure and need your help calculating sample size for two groups of unequal sizes.

I have a population split into two groups 60% test and 40% control.

Wanted to calculate sample size for my two unequal groups with couple scenarios:

I want to test the Difference in means between two groups of 30 bps,50bps and 100 bps where mean1=0.65 .With alpha 0.05 and power 0.80.

Any help would be greatly appreciated.

 

3 REPLIES 3
Rick_SAS
SAS Super FREQ

You also need a hypothetical standard deviation for the population. Here is a link to the doc for the TWOSAMPLEMEANS statement in PROC POWER.

 

I do not understand the phrase "two groups of 30 bps,50bps and 100 bps" or " where mean1=0.65."

However, the following shows how to specify two groups where the mean of the Test group is 30 and the mean of the Control group is 35. The groups have a common standard deviation (4.8) and the total sample size will be a multiple of 5, with 3/5 of subjects assigned to the Test group and 2/5 assigned to the Control group.

 

proc power;
  twosamplemeans
  groupmeans   = (30 35)    /* population means in each group */
  groupweights = (3   2)    /* 60-40 ratio */
  stddev = 4.8             /* or use GROUPSTDDEVS= */
  power = 0.8
  alpha = 0.05
  ntotal = . 
  sides = 2;
run;
ivyc
Calcite | Level 5
Hi,
I am trying to compare mean loss rates for two groups. Test and control have 60% 40% split.
My total population is 23 000.
My mean loss rate for group test is 0.65.
I want to see what sample size I need in order to detect 20,30,40,50,100 bps difference between test and control means.
I dont have vriance available. Wanted to use alpha 0.05 and power 80.
Would code below still work for my objective?
Thank you so much

Rick_SAS
SAS Super FREQ

Yes, provided that the sample sizes are much much smaller than the total population. And you still need an estimate for the standard deviation.

 

The Getting Started example in the documentation analyzes a problem very similar to yours.

 

I don't understand the "mean loss rate" or the values of the "bps difference", but it looks like you might want to use the MEANDIFF option to specify all those rates. Here is an example that has fake values:

 

proc power;
  twosamplemeans
  meandiff = 0.02 0.03 0.04 0.05 0.1
  groupweights = (3   2)    /* 60-40 ratio */
  stddev = 0.04
  power = 0.8
  alpha = 0.05
  ntotal = . 
  sides = 2;
run;

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3189 views
  • 0 likes
  • 2 in conversation