Previous Page | Next Page

Introduction to Power and Sample Size Analysis

Formatted Tables (%POWTABLE Macro)

The %POWTABLE macro renders the output of the POWER and GLMPOWER procedures in rectangular form, and it optionally produces simplified results using weighted means across chosen variables. PROC REPORT and the Output Delivery System (ODS) are used to generate the tables. Base SAS and SAS/STAT 9.1 or higher versions are required.

You can run the %POWTABLE macro for the output in Figure 19.1 to display the results in a form more suitable for quickly discerning relationships among parameters. First use the ODS OUTPUT statement to assign the "Output" table produced by the POWER procedure to a data set as follows:

      ods output output=powdata;

Next, specify the same PROC POWER statements that generate Figure 19.1. Finally, use the %POWTABLE macro to assign analysis parameters to table dimensions. To create a table of computed power values with mean difference assigned to rows, sample size and assigned to columns, and standard deviation assigned to "panels" (rendered by default as rows separated by blank lines), specify the following statements:

   %powtable ( Data = powdata,
               Entries = power,
               Rows = meandiff,
               Cols = ntotal alpha,
               Panels = stddev )

Figure 19.4 shows the results.

Figure 19.4 %POWTABLE Macro Output
The POWTABLE Macro
 
    Entries are Power
 
  N Total
  100 200
  Alpha Alpha
  0.05 0.10 0.05 0.10
Std
Dev
--
Mean
Diff
--
-- -- -- --
12 5 0.541 0.664 0.834 0.902
  6 0.697 0.799 0.940 0.970
18 5 0.280 0.397 0.498 0.623
  6 0.379 0.505 0.650 0.759

Previous Page | Next Page | Top of Page