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 18.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 18.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 18.4 shows the results.
Copyright © SAS Institute, Inc. All Rights Reserved.