Subsections:

- Basic Graphs (POWER, GLMPOWER, Power and Sample Size Application)
- Highly Customized Graphs (POWER, GLMPOWER)
- Formatted Tables (%POWTABLE Macro)
- Narratives and Graphical User Interface (Power and Sample Size Application)
- Customized Power Formulas (DATA Step)
- Empirical Power Simulation (DATA Step, SAS/STAT Software)

This section demonstrates how you can use the different SAS power analysis tools mentioned in the section Overview to generate graphs, tables, and narratives; implement your own power formulas; and simulate empirical power.

Suppose you want to compute the power of a two-sample t test. You conjecture that the mean difference is between 5 and 6 and that the common group standard deviation is between 12 and 18. You plan to use a significance level between 0.05 and 0.1 and a sample size between 100 and 200. The following SAS statements use the POWER procedure to compute the power for these scenarios:

proc power; twosamplemeans test=diff meandiff = 5 6 stddev = 12 18 alpha = 0.05 0.1 ntotal = 100 200 power = .; run;

FigureĀ 18.1 shows the results. Depending on the plausibility of the various combinations of input parameter values, the power ranges between 0.379 and 0.970.

Figure 18.1: PROC POWER Tabular Output

The POWER Procedure

Two-Sample t Test for Mean Difference

Computed Power | |||||
---|---|---|---|---|---|

Index | Alpha | Mean Diff | Std Dev | N Total | Power |

1 | 0.05 | 5 | 12 | 100 | 0.541 |

2 | 0.05 | 5 | 12 | 200 | 0.834 |

3 | 0.05 | 5 | 18 | 100 | 0.280 |

4 | 0.05 | 5 | 18 | 200 | 0.498 |

5 | 0.05 | 6 | 12 | 100 | 0.697 |

6 | 0.05 | 6 | 12 | 200 | 0.940 |

7 | 0.05 | 6 | 18 | 100 | 0.379 |

8 | 0.05 | 6 | 18 | 200 | 0.650 |

9 | 0.10 | 5 | 12 | 100 | 0.664 |

10 | 0.10 | 5 | 12 | 200 | 0.902 |

11 | 0.10 | 5 | 18 | 100 | 0.397 |

12 | 0.10 | 5 | 18 | 200 | 0.623 |

13 | 0.10 | 6 | 12 | 100 | 0.799 |

14 | 0.10 | 6 | 12 | 200 | 0.970 |

15 | 0.10 | 6 | 18 | 100 | 0.505 |

16 | 0.10 | 6 | 18 | 200 | 0.759 |

The following seven sections illustrate additional ways of displaying these results using the different SAS tools.