Example
Using PROC POWER to calculate sample size when comparing two normal means Section
An investigator wants to determine the sample size for comparing two asthma therapies with respect to the forced expiratory volume in one second \(\left(FEV_1\right)\). A two-sided, 0.05-significance level test with 90% statistical power is desired. The effect size is \(\Delta = 0.25 \text{ L}\) and the standard deviation reported in the literature for a similar population is \(\sigma = 0.75 \text{ L}\). The investigator plans to have equal allocation to the two treatment groups (AR = 1).
The first step is to identify the primary response variable. In this example, \(FEV_1\) is a continuous response variable. Assuming that \(FEV_1\) has an approximate normal distribution, the number of patients required for the second treatment group based on the z formula is
\(n_2 = \dfrac{(2)(1.96 + 1.28)^2(0.75)^2}{(0.25)^2 } = 189\)
Thus, the total sample size required is \(n_1 + n_2 = 189 + 189 = 378\). SAS Example: This is a program that illustrates the use of PROC POWER to calculate sample size when comparing two normal means.
***********************************************************************
* This is a program that illustrates the use of PROC POWER to *
* calculate sample size when comparing two normal means. *
***********************************************************************;
proc power;
twosamplemeans dist=normal groupweights=(1 1) alpha=0.05 power=0.9 stddev=0.75
meandiff=0.25 test=diff sides=2 ntotal=.;
plot min=0.1 max=0.9;
title "Sample Size Calculation for Comparing Two Normal Means (1:1 Allocation)";
run;
proc power;
twosamplemeans dist=normal groupweights=(2 1) alpha=0.05 power=0.9 stddev=0.75
meandiff=0.25 test=diff sides=2 ntotal=.;
plot min=0.1 max=0.9;
title "Sample Size Calculation for Comparing Two Normal Means (2:1 Allocation)";
run;
SAS PROC POWER, based on the t formula, yields \(n_1 + n_2 = 191 + 191 = 382\).
If the investigator had wanted an allocation ratio of \(AR = 2\) (twice as many subjects in the first group), then \(n_2 = \dfrac{(1.5)(1.96 + 1.28)^2(0.75)^2}{(0.25)^2} = 142\) and \(n_1 = 2 \times 142 = 284\).
The total sample size required is \(n_1 + n_2 = 142 + 284 = 426\).
SAS PROC POWER, based on the t formula, yields \(n_1 + n_2 = 143 + 286 = 429\).
Notice that the 2:1 allocation, when compared to the 1:1 allocation, requires an overall larger sample size (429 versus 382).
Now it is your turn to give it a try!
Try it! Section
144 subjects
Here is the output that you should have obtained ...
The POWER Procedure |
|
---|---|
Fixed Scenario Elements | |
Distribution | Normal |
Method | Exact |
Number of Sides | 2 |
Alpha | 0.05 |
Mean Difference | 5 |
Standard Deviation | 10 |
Group 1 Weight | 2 |
Group 2 Weight | 1 |
Nominal Power | 0.8 |
Null Difference | 0 |
Computed N Total | |
---|---|
Actual Power | N Total |
0.802 | 144 |