Original PDF Flash format the-power-procedure  


The Power Procedure

Chapter 56
The POWER Procedure
(Experimental)
Chapter Contents
OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3171
GETTING STARTED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3172
Computing Power for a One-Sample t Test . . . . . . . . . . . . . . . . . . 3172
Determining Required Sample Size for a Two-Sample t Test . . . . . . . . . 3175
SYNTAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3179
PROC POWER Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 3180
MULTREG Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3181
ONESAMPLEFREQ Statement . . . . . . . . . . . . . . . . . . . . . . . . 3185
ONESAMPLEMEANS Statement
. . . . . . . . . . . . . . . . . . . . . . 3187
ONEWAYANOVA Statement . . . . . . . . . . . . . . . . . . . . . . . . . 3192
PAIREDMEANS Statement . . . . . . . . . . . . . . . . . . . . . . . . . . 3197
TWOSAMPLEMEANS Statement . . . . . . . . . . . . . . . . . . . . . . 3204
PLOT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3213
DETAILS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3217
Summary of Analyses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3217
Specifying Value Lists in Analysis Statements . . . . . . . . . . . . . . . . 3218
Sample Size Adjustment Options . . . . . . . . . . . . . . . . . . . . . . . 3220
Error and Information Output . . . . . . . . . . . . . . . . . . . . . . . . . 3221
Displayed Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3221
ODS Table Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3222
Mathematical Methods and Formulas . . . . . . . . . . . . . . . . . . . . . 3223
EXAMPLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3243
Example 56.1. One-Way ANOVA . . . . . . . . . . . . . . . . . . . . . . . 3243
Example 56.2. The Sawtooth Power Function in Proportion Analyses . . . . 3248
Example 56.3. Simple AB/BA Cross-Over Designs
. . . . . . . . . . . . . 3255
Example 56.4. Non-Inferiority Test with Lognormal Data . . . . . . . . . . 3259
Example 56.5. Customizing Plots . . . . . . . . . . . . . . . . . . . . . . . 3263
REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3288

3170
Chapter 56. The POWER Procedure (Experimental)

Chapter 56
The POWER Procedure
(Experimental)
Overview
Power and sample size analysis optimizes the resource usage and design of a study,
improving chances of conclusive results with maximum efficiency. The POWER
procedure performs prospective analyses for a variety of goals, such as the following.
• determining the sample size required to get a significant result with adequate
probability (power)
• characterizing the power of a study to detect a meaningful effect
• conducting what-if analyses to assess sensitivity of the power or required sam-
ple size to other factors
Here prospective indicates that the analysis pertains to planning for a future study.
This is in contrast to retrospective analysis for a past study, which is not supported by
the procedure.
A variety of statistical analyses are covered:
t tests for means
• equivalence tests for means
• confidence intervals for means
• tests of a binomial proportion
• multiple regression
• one-way analysis of variance
For more complex linear models, see Chapter 33, “The GLMPOWER Procedure.”
Input for PROC POWER includes the components considered in study planning:
• design
• statistical model and test
• significance level (alpha)
• surmised effects and variability
• power
• sample size

3172
Chapter 56. The POWER Procedure (Experimental)
You designate one of these components by a missing value in the input, in order to
identify it as the result parameter. The procedure calculates this result value over one
or more scenarios of input values for all other components. Power and sample size
are the most common result values, but for some analyses the result can be something
else, for example, alpha, a measure of effect size or variability, the sample size for a
single group, or allocation weights.
In addition to tabular results, PROC POWER produces graphs. You can produce the
most common types of plots easily with default settings and use a variety of options
for more customized graphics. For example, you can control the choice of axis vari-
ables, axis ranges, number of plotted points, mapping of graphical features (such as
color, line style, symbol and panel) to analysis parameters, and legend appearance.
The POWER procedure is one of several tools available in SAS/STAT software for
power and sample size analysis. PROC GLMPOWER supports more complex lin-
ear models. The Power and Sample Size application provides a user interface and
implements many of the analyses supported in the procedures.
The remaining sections of this chapter describe how to use PROC POWER and dis-
cuss the underlying statistical methodology. The “Getting Started” section on page
3172 introduces PROC POWER with simple examples of power computation for a
one-sample t test and sample size determination for a two-sample t test. The “Syntax”
section on page 3179 describes the syntax of the procedure. The “Details” section on
page 3217 summarizes the methods employed by PROC POWER and provides de-
tails on several special topics. The “Examples” section on page 3243 illustrates the
use of the POWER procedure with several applications.
For more discussion and examples on the main concepts in power and sample
size analysis, refer to Castelloe (2000), Castelloe and O’Brien (2001), Muller and
Benignus (1992), O’Brien and Muller (1993), and Lenth (2001).
Getting Started
Computing Power for a One-Sample t Test
Suppose you want to improve the accuracy of a machine used to print logos on sports
jerseys. The machine’s high variability apparently cannot be addressed, but its hori-
zontal alignment can. The operator agrees to pay for a costly adjustment if you can
establish a non-zero mean horizontal displacement in either direction with only a 5%
chance of mistakenly concluding so. You have 150 jerseys at your disposal to mea-
sure, and you want to determine your chances of a significant result (power) using a
one-sample t test with a 2-sided α = 0.5.
You decide that 8 mm is the smallest displacement worth addressing. Hence, you
will assume a true mean of 8 in the power computation. Experience indicates that the
standard deviation is about 40.
Use the ONESAMPLEMEANS statement in the POWER procedure to compute the
power. Indicate power as the result parameter by specifying the POWER= option
with a missing value (.). Specify your conjectures for the mean and standard deviation

Computing Power for a One-Sample t Test
3173
using the MEAN= and STDDEV= options and the sample size using the NTOTAL=
option. The statements required to perform this analysis are as follows.
proc power;
onesamplemeans
mean
= 8
ntotal = 150
stddev = 40
power
= .;
run;
Default values for the TEST=, DIST=, ALPHA=, NULL=, and SIDES= options spec-
ify a 2-sided t test for a mean of 0, assuming a normal distribution with a significance
level of α = 0.05.
Figure 56.1 shows the output.
The POWER Procedure
One-sample t Test for Mean
Fixed Scenario Elements
Distribution
Normal
Method
Exact
Mean
8
Standard Deviation
40
Total Sample Size
150
Number of Sides
2
Null Mean
0
Alpha
0.05
Computed Power
Index
Power
1
0.682153
Figure 56.1.
Sample Size Analysis for One-Sample t Test
The power is about 0.68. In other words, there is a probability of 0.68 that the t
test will produce a significant result demonstrating the machine’s average off-center
displacement. This probability depends on the assumptions for the mean and standard
deviation.
Now, suppose you want to account for some of your uncertainty in conjecturing the
true mean and standard deviation by evaluating the power for four scenarios using
reasonable low and high values, 5 and 10 for the mean and 30 and 50 for the standard
deviation. You also want to plot power for sample sizes between 100 and 200 to
visualize how sensitive the power is to changes in sample size for these four scenarios.
You may be able to measure more than 150 jerseys, and you would like to know under
what circumstances you could get by with fewer.
Specify the new mean and standard deviation values using the MEAN= and
STDDEV= options in the ONESAMPLEMEANS statement. Use the PLOT state-

3174
Chapter 56. The POWER Procedure (Experimental)
ment with X=N to request a plot with sample size on the x-axis. (The result param-
eter, here power, is always plotted on the other axis). Use the MIN= and MAX=
options in the PLOT statement to specify the sample size range.
proc power;
onesamplemeans
mean
= 5 10
ntotal = 150
stddev =
30 50
power
= .;
plot x=n min=100 max=200;
run;
Figure 56.2 shows the output, and Figure 56.3 shows the plot.
The POWER Procedure
One-sample t Test for Mean
Fixed Scenario Elements
Distribution
Normal
Method
Exact
Total Sample Size
150
Number of Sides
2
Null Mean
0
Alpha
0.05
Computed Power
Std
Index
Mean
Dev
Power
1
5
30
0.527185
2
5
50
0.229453
3
10
30
0.981962
4
10
50
0.682153
Figure 56.2.
Sample Size Analysis for One-Sample t Test with Input Ranges

Determining Required Sample Size for a Two-Sample t Test
3175
Figure 56.3.
Plot of Power versus Sample Size for One-Sample t Test with Input
Ranges
The power ranges from about 0.23 to 0.98 for a sample size of 150 depending on the
mean and standard deviation. In Figure 56.3, the line style identifies the mean, and the
plotting symbol identifies the standard deviation. The locations of plotting symbols
indicate computed powers; the curves are linear interpolations of these points. The
plot suggests sufficient power for a mean of 10 and standard deviation of 30 (for any
of the sample sizes) but insufficient power for the other three scenarios.
Determining Required Sample Size for a Two-Sample t Test
In this example you want to compare two physical therapy treatments designed to
increase hamstring flexibility. You need to determine the number of patients required
to achieve a power of at least 0.9 to detect a group mean difference in a two-sample t
test. You will use α = 0.05 (two-tailed).
The mean flexibility (as measured on a scale of 1 to 20) is well known to be about
13 with the standard treatment and thought to be between 14 and 15 with the new
treatment. You conjecture three alternative scenarios for the means,
1. µ1 = 13, µ2 = 14
2. µ1 = 13, µ2 = 14.5
3. µ1 = 13, µ2 = 15
You conjecture two scenarios for the common group standard deviation,
1. σ = 1.2

3176
Chapter 56. The POWER Procedure (Experimental)
2. σ = 1.7
You also want to try three weighting schemes,
1. equal group sizes (balanced, or 1:1)
2. twice as many patients with the new treatment (1:2)
3. three times as many patients with the new treatment (1:3)
This makes 3 × 2 × 3 = 18 scenarios in all.
Use the TWOSAMPLEMEANS statement in the POWER procedure to determine the
sample sizes required to give 90% power for each of these 18 scenarios. Indicate total
sample size as the result parameter by specifying the NTOTAL= option with a missing
value (.). Specify your conjectures for the means using the GROUPMEANS= option.
Using the “matched” notation (discussed in the “Specifying Value Lists in Analysis
Statements” section on page 3218), enclose the two group means for each scenario in
parentheses. Use the STDDEV= option to specify scenarios for the common standard
deviation. Specify the weighting schemes using the GROUPWEIGHTS= option. You
could again use the matched notation. But for illustrative purposes, specify the sce-
narios for each group weight separately using the “crossed” notation, with scenarios
for each group weight separated by a vertical bar (|). The statements that perform the
analysis are as follows.
proc power;
twosamplemeans
groupmeans
= (13 14) (13 14.5) (13 15)
stddev
= 1.2 1.7
groupweights = 1 | 1 2 3
power
= 0.9
ntotal
= .;
run;
Default values for the TEST=, DIST=, NULLDIFF=, ALPHA=, and SIDES= op-
tions specify a 2-sided t test of group mean difference equal to 0 assuming a normal
distribution with a significance level of α = 0.05. The results are shown in Figure
56.4.

Determining Required Sample Size for a Two-Sample t Test
3177
The POWER Procedure
Two-sample t Test for Difference of Means
Fixed Scenario Elements
Distribution
Normal
Method
Exact
Group 1 Weight
1
Nominal Power
0.9
Number of Sides
2
Null Difference
0
Alpha
0.05
Computed N Total
Std
Actual
N
Index
Mean1
Mean2
Dev
Weight2
Power
Total
1
13
14.0
1.2
1
0.906801
64
2
13
14.0
1.2
2
0.907795
72
3
13
14.0
1.2
3
0.904606
84
4
13
14.0
1.7
1
0.901354
124
5
13
14.0
1.7
2
0.904888
141
6
13
14.0
1.7
3
0.900177
164
7
13
14.5
1.2
1
0.910482
30
8
13
14.5
1.2
2
0.906326
33
9
13
14.5
1.2
3
0.915524
40
10
13
14.5
1.7
1
0.900120
56
11
13
14.5
1.7
2
0.901317
63
12
13
14.5
1.7
3
0.907798
76
13
13
15.0
1.2
1
0.912548
18
14
13
15.0
1.2
2
0.926923
21
15
13
15.0
1.2
3
0.921828
24
16
13
15.0
1.7
1
0.913934
34
17
13
15.0
1.7
2
0.921063
39
18
13
15.0
1.7
3
0.910035
44
Figure 56.4.
Sample Size Analysis for Two-Sample t Test Using Group Means
The interpretation is that in the best-case scenario (large mean difference of 2, small
standard deviation of 1.2, and balanced design), a sample size of N = 18 (n1 = n2 =
9) patients is sufficient to achieve a power of at least 0.9. In the worst-case scenario
(small mean difference of 1, large standard deviation of 1.7, and a 1:3 unbalanced
design), a sample size of N = 164 (n1 = 41, n2 = 123) patients is necessary. The
Nominal Power of 0.9 in the Fixed Scenario Elements table represents the input target
power, and the Actual Power column in the Computed N Total table is the power at
the sample size (N Total) adjusted to achieve the specified sample weighting exactly.
Note the following characteristics of the analysis, and ways you can modify them if
you wish.
• The total sample sizes are rounded up to multiples of the weight sums (2 for
the 1:1 design, 3 for the 1:2 design, and 4 for the 1:3 design) to ensure that
each group size is an integer. To request raw fractional sample size solutions,
use the NFRACTIONAL option.
• Only the varying group weight (the one for group 2) is displayed as an output
column, while the group 1 weight appears in the fixed scenario elements ta-

3178
Chapter 56. The POWER Procedure (Experimental)
ble. To display the group weights together in output columns, use the matched
version of the value list rather than the crossed version.
• If you can only specify differences between group means (instead of their indi-
vidual values), or if you want to display the mean differences instead of the in-
dividual means, use the MEANDIFF= option instead of the GROUPMEANS=
option.
The following statements implement all of these modifications.
proc power;
twosamplemeans
nfractional
meandiff
= 1 to 2 by 0.5
stddev
= 1.2 1.7
groupweights = (1 1) (1 2) (1 3)
power
= 0.9
ntotal
= .;
run;
Figure 56.5 shows the new results.

Syntax
3179
The POWER Procedure
Two-sample t Test for Difference of Means
Fixed Scenario Elements
Distribution
Normal
Method
Exact
Nominal Power
0.9
Number of Sides
2
Null Difference
0
Alpha
0.05
Computed Ceiling N Total
Mean
Std
Fractional
Actual
Ceiling
Index
Diff
Dev
Weight1
Weight2
N Total
Power
N Total
1
1.0
1.2
1
1
62.507429
0.902293
63
2
1.0
1.2
1
2
70.065711
0.903837
71
3
1.0
1.2
1
3
82.665772
0.901172
83
4
1.0
1.7
1
1
123.418482
0.901354
124
5
1.0
1.7
1
2
138.598159
0.900833
139
6
1.0
1.7
1
3
163.899094
0.900177
164
7
1.5
1.2
1
1
28.961958
0.900403
29
8
1.5
1.2
1
2
32.308867
0.906326
33
9
1.5
1.2
1
3
37.893351
0.900844
38
10
1.5
1.7
1
1
55.977156
0.900120
56
11
1.5
1.7
1
2
62.717357
0.901317
63
12
1.5
1.7
1
3
73.954291
0.900181
74
13
2.0
1.2
1
1
17.298518
0.912548
18
14
2.0
1.2
1
2
19.163836
0.913223
20
15
2.0
1.2
1
3
22.282926
0.909716
23
16
2.0
1.7
1
1
32.413512
0.905374
33
17
2.0
1.7
1
2
36.195531
0.906513
37
18
2.0
1.7
1
3
42.504535
0.903432
43
Figure 56.5.
Sample Size Analysis for Two-Sample t Test Using Mean
Differences
Note that the Nominal Power of 0.9 applies to the raw computed sample size
(Fractional N Total), and the Actual Power column applies to the rounded sample
size (Ceiling N Total). Some of the adjusted sample sizes in Figure 56.5 are lower
than those in Figure 56.4 because underlying group sample sizes are allowed to be
fractional (for example, the first Ceiling N Total of 63 corresponding to equal group
sizes of 31.5).
Syntax
The following statements are available in PROC POWER.
PROC POWER < options > ;
MULTREG < options > ;
ONESAMPLEFREQ
< options > ;
ONESAMPLEMEANS
< options > ;
ONEWAYANOVA
< options > ;

3180
Chapter 56. The POWER Procedure (Experimental)
PAIREDMEANS < options > ;
TWOSAMPLEMEANS
< options > ;
PLOT < plot-options > < / graph-options > ;
The statements in the POWER procedure consist of the PROC POWER statement,
a set of analysis statements (for requesting specific power and sample size analy-
ses), and the PLOT statement (for producing graphs). The PROC POWER statement
and at least one of the analysis statements are required. The analysis statements
are MULTREG, ONESAMPLEFREQ, ONESAMPLEMEANS, ONEWAYANOVA,
PAIREDMEANS, and TWOSAMPLEMEANS.
You can use multiple analysis statements and multiple PLOT statements. Each anal-
ysis statement produces a separate sample size analysis. Each PLOT statement refers
to the previous analysis statement and generates a separate graph (or set of graphs).
The name of an analysis statement describes the framework of the statistical analysis
for which sample size calculations are desired. You use options in the analysis state-
ments to identify the parameter to compute as the result, to specify the statistical test
and computational options, and to provide one or more scenarios for the values of
relevant analysis parameters.
Table 56.1 summarizes the basic functions of each statement in PROC POWER. The
syntax of each statement in Table 56.1 is described in the following pages.
Table 56.1.
Statements in the POWER Procedure
Statement
Description
PROC POWER
invokes procedure
MULTREG
tests of one or more coefficients in multiple linear
regression
ONESAMPLEFREQ
test of a single binomial proportion
ONESAMPLEMEANS
one-sample t test, confidence interval precision, or
equivalence test
ONEWAYANOVA
one-way ANOVA including single-d.f. contrasts
PAIREDMEANS
paired t test, confidence interval precision, or
equivalence test
TWOSAMPLEMEANS
two-sample t test, confidence interval precision, or
equivalence test
PLOT
constructs plots for previous sample size analysis
See the “Summary of Analyses” section on page 3217 for a summary of the analyses
available and the syntax required for them.
PROC POWER Statement
PROC POWER < options > ;
The PROC POWER statement invokes the POWER procedure. You can specify the
following option.

MULTREG Statement
3181
PLOTONLY
specifies that only graphical results from the PLOT statement should be produced.
MULTREG Statement
MULTREG < options > ;
The MULTREG statement performs power and sample size analyses for type III F
tests of sets of predictors in multiple linear regression. It also supports an F test of a
Pearson correlation as a special case.
Summary of Options
Table 56.2 summarizes categories of options available in the MULTREG statement.
Table 56.2.
Summary of Options in the MULTREG Statement
Task
Options
Define analysis
TEST=
Specify analysis information
ALPHA=
FULLPREDICTORS=
NOINT
REDUCEDPREDICTORS=
TESTEDPREDICTORS=
Specify effects
PARTIALCORR=
RSQUAREDIFF=
RSQUAREFULL=
RSQUAREREDUCED=
Specify sample size
NTOTAL=
Specify power
POWER=
Control sample size rounding
NFRACTIONAL
Control ordering in output
OUTPUTORDER=
Table 56.3 summarizes the valid result parameters in the MULTREG statement.
Table 56.3.
Summary of Result Parameters in the MULTREG Statement
Analyses
Solve for
Syntax
TEST=PREDICTORSET
Power
POWER = .
Sample size
NTOTAL = .
Dictionary of Options
ALPHA=number-list
specifies the level of significance of the statistical test. The default is 0.05, corre-
sponding to the usual 0.05 × 100% = 5% level of significance. See the “Specifying
Value Lists in Analysis Statements” section on page 3218 for information on speci-
fying the number-list.

3182
Chapter 56. The POWER Procedure (Experimental)
FULLPREDICTORS=number-list
TOTALPREDICTORS=number-list
specifies the number of predictors in the full model, not counting the intercept. See
the “Specifying Value Lists in Analysis Statements” section on page 3218 for infor-
mation on specifying the number-list.
NFRACTIONAL
enables fractional input and output for sample sizes.
See the “Sample Size
Adjustment Options” section on page 3220 for information on the ramifications of
the presence (and absence) of the NFRACTIONAL option.
NOINT
specifies a no-intercept model (for both full and reduced models). By default, the
intercept is included in the model. Note that if you wish to test the intercept, you
can specify the NOINT option and simply consider the intercept to be one of the
predictors being tested. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing
value (NTOTAL=.). Values for the sample size must be at least p + 1 when the
NOINT option is used, and at least p + 2 without the NOINT option, where p is the
value of the FULLPREDICTORS option. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
OUTPUTORDER=INTERNAL
OUTPUTORDER=REVERSE
OUTPUTORDER=SYNTAX

controls how the input and default analysis parameters are ordered in the output.
OUTPUTORDER=INTERNAL (the default) produces the following order.
• TOTALPREDICTORS
• TESTEDPREDICTORS
• FULLPREDICTORS
• REDUCEDPREDICTORS
• ALPHA
• PARTIALCORR
• RSQUAREFULL
• RSQUAREREDUCED
• RSQUAREDIFF
• NTOTAL
• POWER
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the
same order as their corresponding options are specified in the MULTREG statement.
The OUTPUTORDER=REVERSE option arranges the parameters in the output in

MULTREG Statement
3183
the reverse order as their corresponding options are specified in the MULTREG state-
ment.
PARTIALCORR=number-list
specifies the partial correlation between the tested predictors and the response, adjust-
ing for any other predictors in the model. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
POWER= number-list
specifies the desired power of the test or requests a solution for the power with a
missing value (POWER=.). The power is expressed as a probability (for example,
0.9) rather than a percentage. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
REDUCEDPREDICTORS=number-list
specifies the number of predictors in the reduced model, not counting the intercept.
This is the same as the difference between values of the FULLPREDICTORS= and
TESTEDPREDICTORS= options. Note that supplying a value of 0 is the same as
specifying an F test of a Pearson correlation. This option cannot be used at the
same time as the TESTEDPREDICTORS= option. See the “Specifying Value Lists in
Analysis Statements” section on page 3218 for information on specifying the number-
list
.
RSQUAREDIFF=number-list
specifies the difference in R2 between the full and reduced models. This is equiva-
lent to the proportion of variation explained by the predictors you are testing. It is
also equivalent to the squared semipartial correlation of the tested predictors with the
response. See the “Specifying Value Lists in Analysis Statements” section on page
3218 for information on specifying the number-list.
RSQUAREFULL=number-list
specifies the R2 of the full model, where R2 is the proportion of variation explained
by the model. See the “Specifying Value Lists in Analysis Statements” section on
page 3218 for information on specifying the number-list.
RSQUAREREDUCED=number-list
specifies the R2 of the reduced model, where R2 is the proportion of variation ex-
plained by the model. If the reduced model is an empty or intercept-only model
(in other words, if REDUCEDPREDICTORS = 0 or TESTEDPREDICTORS =
TOTALPREDICTORS), then RSQUAREDREDUCED = 0 is assumed.
See the
“Specifying Value Lists in Analysis Statements” section on page 3218 for informa-
tion on specifying the number-list.
TEST
TEST= PREDICTORSET

specifies a type III F test of a set of predictors adjusting for any other predictors in
the model. This is the default test option.
TESTEDPREDICTORS=number-list
specifies the number of predictors being tested. This is the same as the difference
between values of the FULLPREDICTORS= and REDUCEDPREDICTORS=

3184
Chapter 56. The POWER Procedure (Experimental)
options.
Note that supplying identical values for the TESTEDPREDICTORS=
and FULLPREDICTORS= options is the same as specifying an F test of
a Pearson correlation.
This option cannot be used at the same time as the
REDUCEDPREDICTORS= option. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
Restrictions on Option Combinations
Multiple parameterizations are supported for some of the analysis parameters.
Choose among possibilities as follows.
• For the number of predictors, specify either the number of predictors you are
testing (using the TESTEDPREDICTORS= option) or the number of predictors
in the reduced model (using the REDUCEDPREDICTORS= option).
• For the effects,
specify
either
the
partial
correlation
(using
the
PARTIALCORR= option) or the R2 for the full and reduced models (using any
two of RSQUAREDIFF=, RSQUAREFULL=, and RSQUAREREDUCED=).
Option Groups for Common Analyses
This section summarizes the syntax for the common analyses supported in the
MULTREG statement.
Type III F Test of a Set of Predictors
You can express effects in terms of partial correlation. Note that a default value of
ALPHA=.05 is assumed.
proc power;
multreg test=predictorset
totalpredictors = 7
testedpredictors = 3
partialcorr = 0.35
ntotal = 100
power = .;
run;
You can also express effects in terms of R2.
proc power;
multreg test=predictorset
totalpredictors = 7
testedpredictors = 3
rsquarefull = 0.9
rsquarediff = 0.1
ntotal = .
power = 0.9;
run;

ONESAMPLEFREQ Statement
3185
ONESAMPLEFREQ Statement
ONESAMPLEFREQ < options > ;
The ONESAMPLEFREQ statement performs power and sample size analyses for the
exact test of a single binomial proportion.
Summary of Options
Table 56.4 summarizes categories of options available in the ONESAMPLEFREQ
statement.
Table 56.4.
Summary of Options in the ONESAMPLEFREQ Statement
Task
Options
Define analysis
TEST=
Specify analysis information
ALPHA=
NULLPROPORTION=
SIDES=
Specify effect
PROPORTION=
Specify sample size
NTOTAL=
Specify power
POWER=
Control ordering in output
OUTPUTORDER=
Table 56.5 summarizes the valid result parameters in the ONESAMPLEFREQ state-
ment.
Table 56.5.
Summary of Result Parameters in the ONESAMPLEFREQ Statement
Analyses
Solve for
Syntax
TEST=BINOMIAL
Power
POWER = .
Sample size
NTOTAL = .
Dictionary of Options
ALPHA=number-list
specifies the level of significance of the statistical test. The default is 0.05, corre-
sponding to the usual 0.05 × 100% = 5% level of significance. See the “Specifying
Value Lists in Analysis Statements” section on page 3218 for information on speci-
fying the number-list.
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing
value (NTOTAL=.). See the “Specifying Value Lists in Analysis Statements” section
on page 3218 for information on specifying the number-list.
NULLPROPORTION=number-list
specifies the null proportion. Note that a value of 0.5 corresponds to the sign test.

3186
Chapter 56. The POWER Procedure (Experimental)
See the “Specifying Value Lists in Analysis Statements” section on page 3218 for
information on specifying the number-list.
OUTPUTORDER=INTERNAL
OUTPUTORDER=REVERSE
OUTPUTORDER=SYNTAX

controls how the input and default analysis parameters are ordered in the output.
OUTPUTORDER=INTERNAL (the default) produces the following order.
• SIDES
• NULLPROPORTION
• ALPHA
• PROPORTION
• NTOTAL
• POWER
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the
same order as their corresponding options are specified in the ONESAMPLEFREQ
statement. The OUTPUTORDER=REVERSE option arranges the parameters in
the output in the reverse order as their corresponding options are specified in the
ONESAMPLEFREQ statement.
POWER= number-list
specifies the desired power of the test or requests a solution for the power with a
missing value (POWER=.). The power is expressed as a probability (for example,
0.9) rather than a percentage. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
PROPORTION=number-list
specifies the binomial proportion, that is, the expected proportion of successes in the
hypothetical binomial trial. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
SIDES=keyword-list
specifies the number of sides (or tails) and direction of the statistical test. See the
“Specifying Value Lists in Analysis Statements” section on page 3218 for information
on specifying the keyword-list. Valid keywords are
1
one-sided with alternative hypothesis in same direction as effect
2
two-sided
U
upper one-sided with alternative greater than null value
L
lower one-sided with alternative less than null value
The default value is 2.
TEST
TEST= BINOMIAL

specifies an exact test of a binomial proportion. This is the default test option.

ONESAMPLEMEANS Statement
3187
Option Groups for Common Analyses
This section summarizes the syntax for the common analyses supported in the
ONESAMPLEFREQ statement.
Exact Test of a Binomial Proportion
Note that defaults for the SIDES= and ALPHA= options specify a 2-sided test with a
0.05 significance level.
proc power;
onesamplefreq test=binomial
nullproportion = 0.2
proportion = 0.3
ntotal = 100
power = .;
run;
ONESAMPLEMEANS Statement
ONESAMPLEMEANS < options > ;
The ONESAMPLEMEANS statement performs power and sample size analyses for
one-sample versions of t tests, equivalence tests, and confidence interval precision.
Summary of Options
Table 56.6 summarizes categories of options available in the ONESAMPLEMEANS
statement.
Table 56.6.
Summary of Options in the ONESAMPLEMEANS Statement
Task
Options
Define analysis
CI=
DIST=
TEST=
Specify analysis information
ALPHA=
LOWER=
NULL=
SIDES=
UPPER=
Specify effects
HALFWIDTH=
MEAN=
Specify variability
CV=
STDDEV=
Specify sample size
NTOTAL=
Specify power and related
GIVENVALIDITY=
probabilities
POWER=
PROBWIDTH=
Control sample size rounding
NFRACTIONAL
Control ordering in output
OUTPUTORDER=

3188
Chapter 56. The POWER Procedure (Experimental)
Table 56.7 summarizes the valid result parameters for different analyses in the
ONESAMPLEMEANS statement.
Table 56.7.
Summary of Result Parameters in the ONESAMPLEMEANS
Statement
Analyses
Solve for
Syntax
TEST=T DIST=NORMAL
Power
POWER = .
Sample size
NTOTAL = .
Alpha
ALPHA = .
Mean
MEAN = .
Standard Deviation
STDDEV = .
TEST=T DIST=LOGNORMAL
Power
POWER = .
Sample size
NTOTAL = .
TEST=EQUIV
Power
POWER = .
Sample size
NTOTAL = .
CI=T
Prob(width)
PROBWIDTH = .
Sample size
NTOTAL = .
Dictionary of Options
ALPHA=number-list
specifies the level of significance of the statistical test. The default is 0.05, corre-
sponding to the usual 0.05 × 100% = 5% level of significance. See the “Specifying
Value Lists in Analysis Statements” section on page 3218 for information on speci-
fying the number-list.
CI
CI= T

specifies an analysis of precision of the confidence interval for the mean. Instead of
power, the relevant probability for this analysis is the probability of achieving a de-
sired precision. Specifically, it is the probability that the half-width of the confidence
interval will be at most the value specified by the HALFWIDTH= option. If neither
the CI= option nor the TEST= option is used, the default is TEST=T.
CV=number-list
specifies the coefficient of variation, defined as the ratio of the standard deviation
to the mean. You can use this option only with DIST=LOGNORMAL. See the
“Specifying Value Lists in Analysis Statements” section on page 3218 for informa-
tion on specifying the number-list.
DIST=LOGNORMAL
DIST=NORMAL

specifies the underlying distribution assumed for the test statistic. NORMAL cor-
responds the normal distribution, and LOGNORMAL corresponds to the lognormal
distribution. The default value is NORMAL.
GIVENVALIDITY=keyword-list
specifies the type of probability for the PROBWIDTH= option. A value of NO

ONESAMPLEMEANS Statement
3189
indicates the unconditional probability that the confidence interval half-width
is at most the value specified by the HALFWIDTH= option.
A value of YES
(the default) indicates the conditional probability that the confidence interval
half-width is at most the value specified by the HALFWIDTH= option, given
that the true mean is captured by the confidence interval. This option can only
be used with the CI=T analysis.
See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the keyword-list.
NO
unconditional width probability
YES
width probability conditional on interval containing the mean
HALFWIDTH=number-list
specifies the desired confidence interval half-width. The half-width is defined as the
distance between the point estimate and a finite endpoint. This option can only be
used with the CI=T analysis. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
LOWER=number-list
specifies the lower equivalence bound for the mean. This option can only be used with
the TEST=EQUIV analysis. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
MEAN=number-list
specifies the mean, in the original scale. The mean is arithmetic if DIST=NORMAL
and geometric if DIST=LOGNORMAL. This option can only be used with the
TEST=T and TEST=EQUIV analyses. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
NFRACTIONAL
enables fractional input and output for sample sizes.
See the “Sample Size
Adjustment Options” section on page 3220 for information on the ramifications of
the presence (and absence) of the NFRACTIONAL option.
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing
value (NTOTAL=.). See the “Specifying Value Lists in Analysis Statements” section
on page 3218 for information on specifying the number-list.
NULL=number-list
specifies the null mean, in the original scale (whether DIST=NORMAL or
DIST=LOGNORMAL). The default value is 0 when DIST=NORMAL and 1 when
DIST=LOGNORMAL. This option can only be used with the TEST=T analysis.
See the “Specifying Value Lists in Analysis Statements” section on page 3218 for
information on specifying the number-list.
OUTPUTORDER=INTERNAL
OUTPUTORDER=REVERSE
OUTPUTORDER=SYNTAX

controls how the input and default analysis parameters are ordered in the output.
OUTPUTORDER=INTERNAL (the default) produces the following order.

3190
Chapter 56. The POWER Procedure (Experimental)
• SIDES
• NULL
• LOWER
• UPPER
• ALPHA
• MEAN
• HALFWIDTH
• STDDEV
• CV
• NTOTAL
• POWER
• GIVENVALIDITY
• PROBWIDTH
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the
same order as their corresponding options are specified in the ONESAMPLEMEANS
statement. The OUTPUTORDER=REVERSE option arranges the parameters in
the output in the reverse order as their corresponding options are specified in the
ONESAMPLEMEANS statement.
POWER= number-list
specifies the desired power of the test or requests a solution for the power with a
missing value (POWER=.). The power is expressed as a probability (for example,
0.9) rather than a percentage. This option can only be used with the TEST=T and
TEST=EQUIV analyses. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
PROBWIDTH=number-list
specifies the desired probability of obtaining a confidence interval half-width less
than or equal to the value specified by the HALFWIDTH= option. A missing value
(PROBWIDTH=.) requests a solution for this probability. The type of probability
(unconditional versus conditional on the interval containing the mean) is controlled
with the GIVENVALIDITY= option. Values are expressed as probabilities (for ex-
ample, 0.9) rather than percentages. This option can only be used with the CI=T
analysis. See the “Specifying Value Lists in Analysis Statements” section on page
3218 for information on specifying the number-list.
SIDES=keyword-list
specifies the number of sides (or tails) and direction of the statistical test or confi-
dence interval. See the “Specifying Value Lists in Analysis Statements” section on
page 3218 for information on specifying the keyword-list. Valid keywords and their
interpretation for the TEST= analyses are
1
one-sided with alternative hypothesis in same direction as effect
2
two-sided

ONESAMPLEMEANS Statement
3191
U
upper one-sided with alternative greater than null value
L
lower one-sided with alternative less than null value
For confidence intervals, SIDES=U refers to an interval between the lower confidence
limit and infinity, and SIDES=L refers to an interval between negative infinity and the
upper confidence limit. For both of these cases and SIDES=1, the confidence interval
computations are equivalent. The SIDES= option can only be used with the TEST=T
and CI=T analyses. The default value is 2.
STDDEV=number-list
specifies the standard deviation. You can use this option only with DIST=NORMAL.
See the “Specifying Value Lists in Analysis Statements” section on page 3218 for
information on specifying the number-list.
TEST
TEST=EQUIV
TEST=T

specifies the statistical analysis. TEST=EQUIV specifies an equivalence test of the
mean using a two one-sided-t test (TOST) analysis. TEST or TEST=T (the default)
specifies a t test on the mean. If neither the TEST= option nor the CI= option is used,
the default is TEST=T.
UPPER=number-list
specifies the upper equivalence bound for the mean, in the original scale (whether
DIST=NORMAL or DIST=LOGNORMAL). This option can only be used with the
TEST=EQUIV analysis. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
Restrictions on Option Combinations
For the analysis definition, use either the TEST= or the CI= option (but not both).
Option Groups for Common Analyses
This section summarizes the syntax for the common analyses supported in the
ONESAMPLEMEANS statement.
One-sample t Test
Note that default values for the DIST=, SIDES=, NULL=, and ALPHA= options
specify a two-sided test for zero mean with a normal distribution and a significance
level of 0.05.
proc power;
onesamplemeans test=t
mean = 7
stddev = 3
ntotal = 50
power = .;
run;

3192
Chapter 56. The POWER Procedure (Experimental)
One-sample t Test with Lognormal Data
proc power;
onesamplemeans test=t dist=lognormal
mean = 7
cv = 0.8
ntotal = .
power = 0.9;
run;
Equivalence Test for Mean of Normal Data
proc power;
onesamplemeans test=equiv dist=normal
lower = 2
upper = 7
mean = 4
stddev = 3
ntotal = 100
power = .;
run;
Equivalence Test for Mean of Lognormal Data
proc power;
onesamplemeans test=equiv dist=lognormal
lower = 1
upper = 5
mean = 3
cv = 0.6
ntotal = .
power = 0.85;
run;
Confidence Interval for Mean
Note that a default value of GIVENVALIDITY=YES specifies a conditional prob-
ability of obtaining the desired precision, given that the interval contains the true
mean.
proc power;
onesamplemeans ci = t
halfwidth = 14
stddev = 8
ntotal = 50
probwidth = .;
run;
ONEWAYANOVA Statement
ONEWAYANOVA < options > ;
The ONEWAYANOVA statement performs power and sample size analyses for one-
d.f. contrasts and the overall F test in one-way analysis of variance.

ONEWAYANOVA Statement
3193
Summary of Options
Table 56.8 summarizes categories of options available in the ONEWAYANOVA state-
ment.
Table 56.8.
Summary of Options in the ONEWAYANOVA Statement
Task
Options
Define analysis
TEST=
Specify analysis information
ALPHA=
CONTRAST=
SIDES=
NULL=
Specify effects
GROUPMEANS=
Specify variability
STDDEV=
Specify sample size and allocation
GROUPNS=
GROUPWEIGHTS=
NPERGROUP=
NTOTAL=
Specify power
POWER=
Control sample size rounding
NFRACTIONAL
Control ordering in output
OUTPUTORDER=
Table 56.9 summarizes the valid result parameters for different analyses in the
ONEWAYANOVA statement.
Table 56.9.
Summary of Result Parameters in the ONEWAYANOVA Statement
Analyses
Solve for
Syntax
TEST=CONTRAST
Power
POWER = .
Sample size
NTOTAL = .
NPERGROUP = .
TEST=OVERALL–F Power
POWER = .
Sample size
NTOTAL = .
NPERGROUP = .
Dictionary of Options
ALPHA=number-list
specifies the level of significance of the statistical test. The default is 0.05, corre-
sponding to the usual 0.05 × 100% = 5% level of significance. See the “Specifying
Value Lists in Analysis Statements” section on page 3218 for information on speci-
fying the number-list.
CONTRAST= ( values ) < ( ... values ) >
specifies coefficients for single-degree-of-freedom hypothesis tests. You must pro-
vide a coefficient for every mean appearing in the GROUPMEANS= option. Specify

3194
Chapter 56. The POWER Procedure (Experimental)
multiple contrasts either with additional sets of coefficients or with additional
CONTRAST= options. For example, you can specify two different contrasts of five
means using
CONTRAST = (1 -1 0 0 0) (1 0 -1 0 0)
GROUPMEANS=grouped-number-list
specifies the group means. This option is used to implicitly set the number of groups.
See the “Specifying Value Lists in Analysis Statements” section on page 3218 for
information on specifying the grouped-number-list.
GROUPNS= grouped-number-list
specifies the group sample sizes. The number of groups represented must be the same
as with the GROUPMEANS= option. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the grouped-number-
list
.
GROUPWEIGHTS= grouped-number-list
specifies the sample size allocation weights for the groups. This option controls how
the total sample size is divided between the groups. Each set of values across all
groups represents relative allocation weights. Additionally, if the NFRACTIONAL
option is not used, the total sample size is restricted to be equal to a multiple of
the sum of the group weights (so that the resulting design has an integer sample
size for each group while adhering exactly to the group allocation weights). The
number of groups represented must be the same as with the GROUPMEANS= option.
Values must be integers unless the NFRACTIONAL option is used. The default value
is 1 for each group, amounting to a balanced design. See the “Specifying Value
Lists in Analysis Statements” section on page 3218 for information on specifying the
grouped-number-list.
NFRACTIONAL
enables fractional input and output for sample sizes.
See the “Sample Size
Adjustment Options” section on page 3220 for information on the ramifications of
the presence (and absence) of the NFRACTIONAL option.
NPERGROUP= number-list
specifies the common sample size per group or requests a solution for the common
sample size per group with a missing value (NPERGROUP=.). Use of this option
implicitly specifies a balanced design. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing
value (NTOTAL=.). See the “Specifying Value Lists in Analysis Statements” section
on page 3218 for information on specifying the number-list.
NULL=number-list
specifies the null value of the contrast. The default value is 0. This option can only
be used with the TEST=CONTRAST analysis. See the “Specifying Value Lists in

ONEWAYANOVA Statement
3195
Analysis Statements” section on page 3218 for information on specifying the number-
list
.
OUTPUTORDER=INTERNAL
OUTPUTORDER=REVERSE
OUTPUTORDER=SYNTAX

controls how the input and default analysis parameters are ordered in the output.
OUTPUTORDER=INTERNAL (the default) produces the following order.
• CONTRAST
• SIDES
• NULL
• ALPHA
• GROUPMEANS
• STDDEV
• GROUPWEIGHTS
• NTOTAL
• NPERGROUP
• GROUPNS
• POWER
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in
the same order as their corresponding options are specified in the ONEWAYANOVA
statement. The OUTPUTORDER=REVERSE option arranges the parameters in
the output in the reverse order as their corresponding options are specified in the
ONEWAYANOVA statement.
POWER= number-list
specifies the desired power of the test or requests a solution for the power with a
missing value (POWER=.). The power is expressed as a probability (for example,
0.9) rather than a percentage. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
SIDES=keyword-list
specifies the number of sides (or tails) and direction of the statistical test. See the
“Specifying Value Lists in Analysis Statements” section on page 3218 for information
on specifying the keyword-list. Valid keywords are
1
one-sided with alternative hypothesis in same direction as effect
2
two-sided
U
upper one-sided with alternative greater than null value
L
lower one-sided with alternative less than null value

3196
Chapter 56. The POWER Procedure (Experimental)
This option can only be used with the TEST=CONTRAST analysis. The default
value is 2.
STDDEV=number-list
specifies the error standard deviation. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
TEST= CONTRAST
TEST= OVERALL–F

specifies the statistical analysis. TEST=CONTRAST specifies a one-d.f. test of a
contrast of means. The test is the usual F test for the 2-sided case and the usual t test
for the 1-sided case. TEST=OVERALL–F specifies the overall F test of equality of
all means. The default is TEST=CONTRAST if the CONTRAST= option is used,
and TEST=OVERALL–F otherwise.
Restrictions on Option Combinations
Multiple parameterizations are supported for the sample size and allocation parame-
ters. Specify only one of the following.
• sample size per group in a balanced design (using the NPERGROUP= option)
• total sample size and allocation weights (using the NTOTAL= and
GROUPWEIGHTS= options)
• individual group sample sizes (using the GROUPNS= option)
Option Groups for Common Analyses
This section summarizes the syntax for the common analyses supported in the
ONEWAYANOVA statement.
One-d.f. Contrast
You can use the NPERGROUP= option in a balanced design. Note that default values
for the SIDES=, NULL=, and ALPHA= options specify a two-sided test for a contrast
value of zero with a significance level of 0.05.
proc power;
onewayanova test=contrast
contrast = (1 0 -1)
groupmeans = 3 | 7 | 8
stddev = 4
npergroup = 50
power = .;
run;
You can also specify an unbalanced design.
proc power;
onewayanova test=contrast
contrast = (1 0 -1)

PAIREDMEANS Statement
3197
groupmeans = 3 | 7 | 8
stddev = 4
groupweights = (1 2 2)
ntotal = .
power = 0.9;
run;
Overall F Test
proc power;
onewayanova test=overall_f
groupmeans = 3 | 7 | 8
stddev = 4
npergroup = 50
power = .;
run;
PAIREDMEANS Statement
PAIREDMEANS < options > ;
The PAIREDMEANS statement performs power and sample size analyses for paired-
sample versions of t tests, equivalence tests, and confidence interval precision.
Summary of Options
Table 56.10 summarizes categories of options available in the PAIREDMEANS state-
ment.
Table 56.10.
Summary of Options in the PAIREDMEANS Statement
Task
Options
Define analysis
CI=
DIST=
TEST=
Specify analysis information
ALPHA=
LOWER=
NULLDIFF=
SIDES=
UPPER=
Specify effects
HALFWIDTH=
MEANDIFF=
MEANRATIO=
PAIREDMEANS=
Specify variability
CORR=
CV=
PAIREDCVS=
PAIREDSTDDEVS=
STDDEV=
Specify sample size
NPAIRS=
Specify power and related
GIVENVALIDITY=

3198
Chapter 56. The POWER Procedure (Experimental)
Table 56.10.
(continued)
Task
Options
probabilities
POWER=
PROBWIDTH=
Control sample size rounding
NFRACTIONAL
Control ordering in output
OUTPUTORDER=
Table 56.11 summarizes the valid result parameters for different analyses in the
PAIREDMEANS statement.
Table 56.11.
Summary of Result Parameters in the PAIREDMEANS Statement
Analyses
Solve for
Syntax
TEST=DIFF
Power
POWER = .
Sample size
NPAIRS = .
TEST=EQUIV–ADD
Power
POWER = .
Sample size
NPAIRS = .
TEST=EQUIV–MULT Power
POWER = .
Sample size
NPAIRS = .
CI=DIFF
Prob(width)
PROBWIDTH = .
Sample size
NPAIRS = .
Dictionary of Options
ALPHA=number-list
specifies the level of significance of the statistical test. The default is 0.05, corre-
sponding to the usual 0.05 × 100% = 5% level of significance. See the “Specifying
Value Lists in Analysis Statements” section on page 3218 for information on speci-
fying the number-list.
CI
CI=DIFF

specifies an analysis of precision of the confidence interval for the mean differ-
ence. Instead of power, the relevant probability for this analysis is the probabil-
ity of achieving a desired precision. Specifically, it is the probability that the half-
width of the observed confidence interval will be at most the value specified by the
HALFWIDTH= option. If neither the CI= option nor the TEST= option is used, the
default is TEST=DIFF.
CORR=number-list
specifies the correlation between members of a pair. See the “Specifying Value
Lists in Analysis Statements” section on page 3218 for information on specifying
the number-list.
CV=number-list
specifies the coefficient of variation assumed to be common to both members of a
pair. The coefficient of variation is defined as the ratio of the standard deviation to the

PAIREDMEANS Statement
3199
mean. You can use this option only with DIST=LOGNORMAL. See the “Specifying
Value Lists in Analysis Statements” section on page 3218 for information on speci-
fying the number-list.
DIST=LOGNORMAL
DIST=NORMAL

specifies the underlying distribution assumed for the test statistic.
NORMAL
corresponds the normal distribution, and LOGNORMAL corresponds to the log-
normal distribution.
The default value (also the only acceptable value in each
case) is NORMAL for TEST=DIFF, TEST=EQUIV–ADD, and CI=DIFF; and
LOGNORMAL for TEST=EQUIV–MULT.
GIVENVALIDITY=keyword-list
specifies the type of probability for the PROBWIDTH= option. A value of NO indi-
cates the unconditional probability that the confidence interval half-width is at most
the value specified by the HALFWIDTH= option. A value of YES (the default) indi-
cates the conditional probability that the confidence interval half-width is at most the
value specified by the HALFWIDTH= option, given that the true mean difference is
captured by the confidence interval. This option can only be used with the CI=DIFF
analysis. See the “Specifying Value Lists in Analysis Statements” section on page
3218 for information on specifying the keyword-list.
NO
unconditional width probability
YES
width probability conditional on interval containing the mean difference
HALFWIDTH=number-list
specifies the desired confidence interval half-width. The half-width is defined as
the distance between the point estimate and a finite endpoint. This option can only
be used with the CI=DIFF analysis. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
LOWER=number-list
specifies the lower equivalence bound for the mean difference or mean ratio, in the
original scale (whether DIST=NORMAL or DIST=LOGNORMAL). This option can
only be used with the TEST=EQUIV–ADD and TEST=EQUIV–MULT analyses.
See the “Specifying Value Lists in Analysis Statements” section on page 3218 for
information on specifying the number-list.
MEANDIFF=number-list
specifies the mean difference, defined as the mean of the difference between the sec-
ond and first members of a pair. This option can only be used with the TEST=DIFF
and TEST=EQUIV–ADD analyses. When TEST=EQUIV–ADD, the mean dif-
ference is interpreted as the treatment mean minus the reference mean. See the
“Specifying Value Lists in Analysis Statements” section on page 3218 for informa-
tion on specifying the number-list.
MEANRATIO=number-list
specifies the mean ratio, defined as the mean of the ratio between the second and first
members of a pair, in the original scale. When DIST=LOGNORMAL, the means
are geometric means. This option can only be used with the TEST=EQUIV–MULT

3200
Chapter 56. The POWER Procedure (Experimental)
analysis. The mean ratio is interpreted as the treatment mean divided by the reference
mean. See the “Specifying Value Lists in Analysis Statements” section on page 3218
for information on specifying the number-list.
NFRACTIONAL
enables fractional input and output for sample sizes.
See the “Sample Size
Adjustment Options” section on page 3220 for information on the ramifications of
the presence (and absence) of the NFRACTIONAL option.
NPAIRS= number-list
specifies the number of pairs or requests a solution for the number of pairs with a
missing value (NPAIRS=.). See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
NULLDIFF=number-list
specifies the null mean difference. The default value is 0. This option can only be
used with the TEST=DIFF analysis. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
OUTPUTORDER=INTERNAL
OUTPUTORDER=REVERSE
OUTPUTORDER=SYNTAX

controls how the input and default analysis parameters are ordered in the output.
OUTPUTORDER=INTERNAL (the default) produces the following order.
• SIDES
• NULLDIFF
• LOWER
• UPPER
• ALPHA
• PAIREDMEANS
• MEANDIFF
• MEANRATIO
• HALFWIDTH
• STDDEV
• PAIREDSTDDEVS
• CV
• PAIREDCVS
• CORR
• NPAIRS
• POWER
• GIVENVALIDITY
• PROBWIDTH

PAIREDMEANS Statement
3201
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in
the same order as their corresponding options are specified in the PAIREDMEANS
statement. The OUTPUTORDER=REVERSE option arranges the parameters in
the output in the reverse order as their corresponding options are specified in the
PAIREDMEANS statement.
PAIREDCVS=grouped-number-list
specifies the coefficient of variation for each member of a pair. Unlike the CV=
option, the PAIREDCVS= option supports different values for each member of a pair.
This option can only be used with DIST=LOGNORMAL. See the “Specifying Value
Lists in Analysis Statements” section on page 3218 for information on specifying the
grouped-number-list.
PAIREDMEANS=grouped-number-list
specifies the two paired means, in the original scale. The means are arithmetic if
DIST=NORMAL and geometric if DIST=LOGNORMAL. This option cannot be
used with the CI=DIFF analysis. When TEST=EQUIV–ADD, the means are in-
terpreted as the reference mean (first) and the treatment mean (second). See the
“Specifying Value Lists in Analysis Statements” section on page 3218 for informa-
tion on specifying the grouped-number-list.
PAIREDSTDDEVS=grouped-number-list
specifies the standard deviation of each member of a pair. Unlike the STDDEV= op-
tion, the PAIREDSTDDEVS= option supports different values for each member of a
pair. This option can only be used with DIST=NORMAL. See the “Specifying Value
Lists in Analysis Statements” section on page 3218 for information on specifying the
grouped-number-list.
POWER= number-list
specifies the desired power of the test or requests a solution for the power with a
missing value (POWER=.). The power is expressed as a probability (for example,
0.9) rather than a percentage. This option cannot be used with the CI=DIFF analysis.
See the “Specifying Value Lists in Analysis Statements” section on page 3218 for
information on specifying the number-list.
PROBWIDTH=number-list
specifies the desired probability of obtaining a confidence interval half-width less
than or equal to the value specified by the HALFWIDTH= option. A missing value
(PROBWIDTH=.) requests a solution for this probability. The type of probability
(unconditional versus conditional on the interval containing the mean) is controlled
with the GIVENVALIDITY= option. Values are expressed as probabilities (for ex-
ample, 0.9) rather than percentages. This option can only be used with the CI=DIFF
analysis. See the “Specifying Value Lists in Analysis Statements” section on page
3218 for information on specifying the number-list.
SIDES=keyword-list
specifies the number of sides (or tails) and direction of the statistical test or confi-
dence interval. See the “Specifying Value Lists in Analysis Statements” section on
page 3218 for information on specifying the keyword-list. Valid keywords and their
interpretation for the TEST= analyses are

3202
Chapter 56. The POWER Procedure (Experimental)
1
one-sided with alternative hypothesis in same direction as effect
2
two-sided
U
upper one-sided with alternative greater than null value
L
lower one-sided with alternative less than null value
For confidence intervals, SIDES=U refers to an interval between the lower confidence
limit and infinity, and SIDES=L refers to an interval between negative infinity and
the upper confidence limit. For both of these cases and SIDES=1, the confidence
interval computations are equivalent. The SIDES= option cannot be used with the
TEST=EQUIV–ADD and TEST=EQUIV–MULT analyses. The default value is 2.
STDDEV=number-list
specifies the standard deviation assumed to be common to both members of a pair.
This option can only be used with DIST=NORMAL. See the “Specifying Value
Lists in Analysis Statements” section on page 3218 for information on specifying
the number-list.
TEST
TEST=DIFF
TEST=EQUIV–ADD
TEST=EQUIV–MULT

specifies the statistical analysis. TEST or TEST=DIFF (the default) specifies a paired
t test on the mean difference. TEST=EQUIV–ADD specifies an additive equiv-
alence test of the mean difference using a two one-sided-t test (TOST) analysis.
TEST=EQUIV–MULT specifies a multiplicative equivalence test of the mean ratio
using a two one-sided-t test (TOST) analysis. If neither the TEST= option nor the
CI= option is used, the default is TEST=DIFF.
UPPER=number-list
specifies the upper equivalence bound for the mean difference or mean ratio, in the
original scale (whether DIST=NORMAL or DIST=LOGNORMAL). This option can
only be used with the TEST=EQUIV–ADD and TEST=EQUIV–MULT analyses.
See the “Specifying Value Lists in Analysis Statements” section on page 3218 for
information on specifying the number-list.
Restrictions on Option Combinations
Multiple parameterizations are supported for some of the analysis parameters.
Choose among possibilities as follows.
• For the analysis definition, use either the TEST= or the CI= option.
• For
the
means,
specify
either
the
individual
means
(using
the
PAIREDMEANS= option), mean differences (using the MEANDIFF=
option), or mean ratios (using the MEANRATIO= option).
• For the coefficient of variation, specify either a common coefficient of varia-
tion (using the CV= option) or individual coefficients of variation (using the
PAIREDCVS= option).

PAIREDMEANS Statement
3203
• For the standard deviation, specify either a common standard deviation
(using the STDDEV= option) or individual standard deviations (using the
PAIREDSTDDEVS= option).
Option Groups for Common Analyses
This section summarizes the syntax for the common analyses supported in the
PAIREDMEANS statement.
Paired t Test
You can express effects in terms of the mean difference and variability in terms of a
correlation and common standard deviation. Note that default values for the DIST=,
SIDES=, NULLDIFF=, and ALPHA= options specify a two-sided test for no differ-
ence with a normal distribution and a significance level of 0.05.
proc power;
pairedmeans test=diff
meandiff = 7
corr = 0.4
stddev = 12
npairs = 50
power = .;
run;
You can also express effects in terms of individual means and variability in terms of
correlation and individual standard deviations.
proc power;
pairedmeans test=diff
pairedmeans = 8 | 15
corr = 0.4
pairedstddevs = (7 12)
npairs = .
power = 0.9;
run;
Additive Equivalence Test for Mean Difference with Normal Data
proc power;
pairedmeans test=equiv_add
lower = 2
upper = 5
meandiff = 4
corr = 0.2
stddev = 8
npairs = .
power = 0.9;
run;

3204
Chapter 56. The POWER Procedure (Experimental)
Multiplicative Equivalence Test for Mean Ratio with Lognormal Data
proc power;
pairedmeans test=equiv_mult
lower = 3
upper = 7
meanratio = 5
corr = 0.2
cv = 1.1
npairs = 50
power = .;
run;
Confidence Interval for Mean Difference
Note that a default value of GIVENVALIDITY=YES specifies a conditional proba-
bility of obtaining the desired precision, given that the interval contains the true mean
difference.
proc power;
pairedmeans ci = diff
halfwidth = 4
corr = 0.35
stddev = 8
npairs = 30
probwidth = .;
run;
TWOSAMPLEMEANS Statement
TWOSAMPLEMEANS < options > ;
The TWOSAMPLEMEANS statement performs power and sample size analyses for
two-independent-sample versions of pooled and unpooled t tests, equivalence tests,
and confidence interval precision.
Summary of Options
Table
56.12
summarizes
categories
of
options
available
in
the
TWOSAMPLEMEANS statement.
Table 56.12.
Summary of Options in the TWOSAMPLEMEANS Statement
Task
Options
Define analysis
CI=
DIST=
TEST=
Specify analysis information
ALPHA=
LOWER=
NULLDIFF=
NULLRATIO=
SIDES=
UPPER=

TWOSAMPLEMEANS Statement
3205
Table 56.12.
(continued)
Task
Options
Specify effects
HALFWIDTH=
GROUPMEANS=
MEANDIFF=
MEANRATIO=
Specify variability
CV=
GROUPSTDDEVS=
STDDEV=
Specify sample size and allocation
GROUPNS=
GROUPWEIGHTS=
NPERGROUP=
NTOTAL=
Specify power and related
GIVENVALIDITY=
probabilities
POWER=
PROBWIDTH=
Control sample size rounding
NFRACTIONAL
Control ordering in output
OUTPUTORDER=
Table 56.13 summarizes the valid result parameters for different analyses in the
TWOSAMPLEMEANS statement.
Table 56.13.
Summary of Result Parameters in the TWOSAMPLEMEANS
Statement
Analyses
Solve for
Syntax
TEST=DIFF
Power
POWER = .
Sample size
NTOTAL = .
NPERGROUP = .
Group sample size
GROUPNS = n1 | .
GROUPNS = . | n2
GROUPNS = (n1 .)
GROUPNS = (. n2)
Group weight
GROUPWEIGHTS = w1 | .
GROUPWEIGHTS = . | w2
GROUPWEIGHTS = (w1 .)
GROUPWEIGHTS = (. w2)
Alpha
ALPHA = .
Group mean
GROUPMEANS = mean1 | .
GROUPMEANS = . | mean2
GROUPMEANS = (mean1 .)
GROUPMEANS = (. mean2)
Mean difference
MEANDIFF = .
Standard deviation
STDDEV = .
TEST=DIFF–SATT
Power
POWER = .
Sample size
NTOTAL = .

3206
Chapter 56. The POWER Procedure (Experimental)
Table 56.13.
(continued)
Analyses
Solve for
Syntax
NPERGROUP = .
TEST=RATIO
Power
POWER = .
Sample size
NTOTAL = .
NPERGROUP = .
TEST=EQUIV–ADD
Power
POWER = .
Sample size
NTOTAL = .
NPERGROUP = .
TEST=EQUIV–MULT Power
POWER = .
Sample size
NTOTAL = .
NPERGROUP = .
CI=DIFF
Prob(width)
PROBWIDTH = .
Sample size
NTOTAL = .
NPERGROUP = .
Dictionary of Options
ALPHA=number-list
specifies the level of significance of the statistical test or requests a solution for alpha
with a missing value (ALPHA=.). The default is 0.05, corresponding to the usual
0.05 × 100% = 5% level of significance. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
CI
CI=DIFF

specifies an analysis of precision of the confidence interval for the mean difference,
assuming equal variances. Instead of power, the relevant probability for this analysis
is the probability that the interval half-width is at most the value specified by the
HALFWIDTH= option. If neither the TEST= option nor the CI= option is used, the
default is TEST=DIFF.
CV=number-list
specifies the coefficient of variation assumed to be common to both groups. The
coefficient of variation is defined as the ratio of the standard deviation to the mean.
You can use this option only with DIST=LOGNORMAL. See the “Specifying Value
Lists in Analysis Statements” section on page 3218 for information on specifying the
number-list.
DIST=LOGNORMAL
DIST=NORMAL

specifies the underlying distribution assumed for the test statistic.
NORMAL
corresponds the normal distribution, and LOGNORMAL corresponds to the log-
normal distribution.
The default value (also the only acceptable value in each
case) is NORMAL for TEST=DIFF, TEST=DIFF–SATT, TEST=EQUIV–ADD, and
CI=DIFF; and LOGNORMAL for TEST=RATIO and TEST=EQUIV–MULT.

TWOSAMPLEMEANS Statement
3207
GIVENVALIDITY=keyword-list
specifies the type of probability for the PROBWIDTH= option. A value of NO
indicates the unconditional probability that the confidence interval half-width is
at most the value specified by the HALFWIDTH= option. A value of YES (the
default) indicates the conditional probability that the confidence interval half-width
is at most the value specified by the HALFWIDTH= option, given that the true
mean difference is captured by the confidence interval. This option can only be
used with the CI=DIFF analysis.
See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the keyword-list.
NO
unconditional width probability
YES
width probability conditional on interval containing the mean difference
GROUPMEANS=grouped-number-list
specifies the two group means or requests a solution for one group mean given the
other. Means are in the original scale. They are arithmetic if DIST=NORMAL and
geometric if DIST=LOGNORMAL. This option cannot be used with the CI=DIFF
analysis. When TEST=EQUIV–ADD, the means are interpreted as the reference
mean (first) and the treatment mean (second).
See the “Specifying Value Lists
in Analysis Statements” section on page 3218 for information on specifying the
grouped-number-list.
GROUPNS= grouped-number-list
specifies the two group sample sizes or requests a solution for one group sample size
given the other. See the “Specifying Value Lists in Analysis Statements” section on
page 3218 for information on specifying the grouped-number-list.
GROUPSTDDEVS=grouped-number-list
specifies the standard deviation of each group. Unlike the STDDEV= option, the
GROUPSTDDEVS= option supports different values for each group. It is valid
only for the Satterthwaite t test (TEST=DIFF–SATT DIST=NORMAL). See the
“Specifying Value Lists in Analysis Statements” section on page 3218 for informa-
tion on specifying the grouped-number-list.
GROUPWEIGHTS= grouped-number-list
specifies the sample size allocation weights for the two groups, or requests a solution
for one group weight given the other. This option controls how the total sample size
is divided between the two groups. Each pair of values for the two groups represents
relative allocation weights. Additionally, if the NFRACTIONAL option is not used,
the total sample size is restricted to be equal to a multiple of the sum of the two group
weights (so that the resulting design has an integer sample size for each group while
adhering exactly to the group allocation weights). Values must be integers unless the
NFRACTIONAL option is used. The default value is (1 1), a balanced design with a
weight of 1 for each group. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the grouped-number-list.
HALFWIDTH=number-list
specifies the desired confidence interval half-width. The half-width is defined as

3208
Chapter 56. The POWER Procedure (Experimental)
the distance between the point estimate and a finite endpoint. This option can only
be used with the CI=DIFF analysis. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
LOWER=number-list
specifies the lower equivalence bound for the mean difference or mean ratio, in the
original scale (whether DIST=NORMAL or DIST=LOGNORMAL). Values must
be greater than 0 when DIST=LOGNORMAL. This option can only be used with
the TEST=EQUIV–ADD and TEST=EQUIV–MULT analyses. See the “Specifying
Value Lists in Analysis Statements” section on page 3218 for information on speci-
fying the number-list.
MEANDIFF=number-list
specifies the mean difference, defined as the group 2 mean minus the group 1 mean,
or requests a solution for the mean difference with a missing value (MEANDIFF=.).
This option can only be used with the TEST=DIFF, TEST=DIFF–SATT, and
TEST=EQUIV–ADD analyses. When TEST=EQUIV–ADD, the mean difference
is interpreted as the treatment mean minus the reference mean. See the “Specifying
Value Lists in Analysis Statements” section on page 3218 for information on speci-
fying the number-list.
MEANRATIO=number-list
specifies the mean ratio, defined as the group 2 mean divided by the group 1 mean, in
the original scale (whether DIST=NORMAL or DIST=LOGNORMAL). This option
can only be used with the TEST=RATIO and TEST=EQUIV–MULT analyses. When
TEST=EQUIV–MULT, the mean ratio is interpreted as the treatment mean divided
by the reference mean. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
NFRACTIONAL
enables fractional input and output for sample sizes.
See the “Sample Size
Adjustment Options” section on page 3220 for information on the ramifications of
the presence (and absence) of the NFRACTIONAL option.
NPERGROUP= number-list
specifies the common sample size per group or requests a solution for the common
sample size per group with a missing value (NPERGROUP=.). Use of this option
implicitly specifies a balanced design. See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for information on specifying the number-list.
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing
value (NTOTAL=.). See the “Specifying Value Lists in Analysis Statements” section
on page 3218 for information on specifying the number-list.
NULLDIFF=number-list
specifies the null mean difference. The default value is 0. This option can only be
used with the TEST=DIFF and TEST=DIFF–SATT analyses. See the “Specifying
Value Lists in Analysis Statements” section on page 3218 for information on speci-
fying the number-list.

TWOSAMPLEMEANS Statement
3209
NULLRATIO=number-list
specifies the null mean ratio. The default value is 1. This option can only be used with
the TEST=RATIO analysis. See the “Specifying Value Lists in Analysis Statements”
section on page 3218 for information on specifying the number-list.
OUTPUTORDER=INTERNAL
OUTPUTORDER=REVERSE
OUTPUTORDER=SYNTAX

controls how the input and default analysis parameters are ordered in the output.
OUTPUTORDER=INTERNAL (the default) produces the following order.
• SIDES
• NULLDIFF
• NULLRATIO
• LOWER
• UPPER
• ALPHA
• GROUPMEANS
• MEANDIFF
• MEANRATIO
• HALFWIDTH
• STDDEV
• GROUPSTDDEVS
• CV
• GROUPWEIGHTS
• NTOTAL
• NPERGROUP
• GROUPNS
• POWER
• GIVENVALIDITY
• PROBWIDTH
The OUTPUTORDER=SYNTAX option arranges the parameters in the out-
put in the same order as their corresponding options are specified in the
TWOSAMPLEMEANS statement.
The OUTPUTORDER=REVERSE option
arranges the parameters in the output in the reverse order as their corresponding
options are specified in the TWOSAMPLEMEANS statement.
POWER= number-list
specifies the desired power of the test or requests a solution for the power with a
missing value (POWER=.). The power is expressed as a probability (for example,
0.9) rather than a percentage. This option cannot be used with the CI=DIFF analysis.

3210
Chapter 56. The POWER Procedure (Experimental)
See the “Specifying Value Lists in Analysis Statements” section on page 3218 for
information on specifying the number-list.
PROBWIDTH=number-list
specifies the desired probability of obtaining a confidence interval half-width less
than or equal to the value specified by the HALFWIDTH= option. A missing value
(PROBWIDTH=.) requests a solution for this probability. The type of probability
(unconditional versus conditional on the interval containing the mean) is controlled
with the GIVENVALIDITY= option. Values are expressed as probabilities (for ex-
ample, 0.9) rather than percentages. This option can only be used with the CI=DIFF
analysis. See the “Specifying Value Lists in Analysis Statements” section on page
3218 for information on specifying the number-list.
SIDES=keyword-list
specifies the number of sides (or tails) and direction of the statistical test or confi-
dence interval. See the “Specifying Value Lists in Analysis Statements” section on
page 3218 for information on specifying the keyword-list. Valid keywords and their
interpretation for the TEST= analyses are
1
one-sided with alternative hypothesis in same direction as effect
2
two-sided
U
upper one-sided with alternative greater than null value
L
lower one-sided with alternative less than null value
For confidence intervals, SIDES=U refers to an interval between the lower confidence
limit and infinity, and SIDES=L refers to an interval between negative infinity and
the upper confidence limit. For both of these cases and SIDES=1, the confidence
interval computations are equivalent. The SIDES= option cannot be used with the
TEST=EQUIV–ADD and TEST=EQUIV–MULT analyses. The default value is 2.
STDDEV=number-list
specifies the standard deviation assumed to be common to both groups, or requests a
solution for the common standard deviation with a missing value (STDDEV=.). This
option can only be used with DIST=NORMAL. See the “Specifying Value Lists in
Analysis Statements” section on page 3218 for information on specifying the number-
list
.
TEST
TEST=DIFF
TEST=DIFF–SATT
TEST=EQUIV–ADD
TEST=EQUIV–MULT
TEST=RATIO

specifies the statistical analysis. TEST or TEST=DIFF (the default) specifies a pooled
t test on the mean difference, assuming equal variances. TEST=DIFF–SATT spec-
ifies a Satterthwaite unpooled t test on the mean difference, assuming unequal vari-
ances. TEST=EQUIV–ADD specifies an additive equivalence test of the mean differ-
ence using a two one-sided-t test (TOST) analysis. TEST=EQUIV–MULT specifies a

TWOSAMPLEMEANS Statement
3211
multiplicative equivalence test of the mean ratio using a two one-sided-t test (TOST)
analysis. TEST=RATIO specifies a pooled t test on the mean ratio, assuming equal
coefficients of variation. If neither the TEST= option nor the CI= option is used, the
default is TEST=DIFF.
UPPER=number-list
specifies the upper equivalence bound for the mean difference or mean ratio, in the
original scale (whether DIST=NORMAL or DIST=LOGNORMAL). This option can
only be used with the TEST=EQUIV–ADD and TEST=EQUIV–MULT analyses.
See the “Specifying Value Lists in Analysis Statements” section on page 3218 for
information on specifying the number-list.
Restrictions on Option Combinations
Multiple parameterizations are supported for some of the analysis parameters.
Choose among possibilities as follows.
• For the analysis definition, use either the TEST= or the CI= option.
• For the means, specify either the individual group means (using the
GROUPMEANS= option), mean differences (using the MEANDIFF= option),
or mean ratios (using the MEANRATIO= option).
• For the standard deviation in the Satterthwaite t test (TEST=DIFF–SATT),
specify either a common standard deviation (using the STDDEV= option) or
individual group standard deviations (using the GROUPSTDDEVS= option).
• For the sample sizes and allocation, specify either the sample size per group in
a balanced design (using the NPERGROUP= option), the total sample size and
allocation weights (using the NTOTAL= and GROUPWEIGHTS= options), or
the individual group sample sizes (using the GROUPNS= option).
Option Groups for Common Analyses
This section summarizes the syntax for the common analyses supported in the
TWOSAMPLEMEANS statement.
Two-sample t Test Assuming Equal Variances
You can use the NPERGROUP= option in a balanced design and express effects
in terms of the mean difference. Note that default values for the DIST=, SIDES=,
NULLDIFF=, and ALPHA= options specify a two-sided test for no difference with a
normal distribution and a significance level of 0.05.
proc power;
twosamplemeans test=diff
meandiff = 7
stddev = 12
npergroup = 50
power = .;
run;

3212
Chapter 56. The POWER Procedure (Experimental)
You can also specify an unbalanced design and express effects in terms of individual
group means.
proc power;
twosamplemeans test=diff
groupmeans = 8 | 15
stddev = 4
groupweights = (2 3)
ntotal = .
power = 0.9;
run;
Two-sample Satterthwaite t Test Assuming Unequal Variances
proc power;
twosamplemeans test=diff_satt
meandiff = 3
groupstddevs = 5 | 8
groupweights = (1 2)
ntotal = 60
power = .;
run;
Two-sample Pooled t Test of Mean Ratio with Lognormal Data
Note that defaults for the DIST= and NULLRATIO= options specify a test of mean
ratio = 1 assuming a lognormal distribution.
proc power;
twosamplemeans test=ratio
meanratio = 7
cv = 0.8
groupns = 50 | 70
power = .;
run;
Additive Equivalence Test for Mean Difference with Normal Data
Note that a default value of GROUPWEIGHTS=(1 1) specifies a balanced design.
proc power;
twosamplemeans test=equiv_add
lower = 2
upper = 5
meandiff = 4
stddev = 8
ntotal = .
power = 0.9;
run;

PLOT Statement
3213
Multiplicative Equivalence Test for Mean Ratio with Lognormal Data
proc power;
twosamplemeans test=equiv_mult
lower = 3
upper = 7
meanratio = 5
cv = 0.75
npergroup = 50
power = .;
run;
Confidence Interval for Mean Difference
Note that a default value of GIVENVALIDITY=YES specifies a conditional proba-
bility of obtaining the desired precision, given that the interval contains the true mean
difference.
proc power;
twosamplemeans ci = diff
halfwidth = 4
stddev = 8
groupns = (30 35)
probwidth = .;
run;
PLOT Statement
PLOT < plot-options > < / graph-options > ;
The PLOT statement produces a graph or set of graphs for the sample size analysis
defined by the previous analysis statement. The plot-options define the plot charac-
teristics, and the graph-options are SAS/GRAPH-style options.
Options
You can specify the following plot-options in the PLOT statement.
INTERPOL=JOIN
INTERPOL=NONE

specifies the type of curve to draw through the computed points.
The
INTERPOL=JOIN option connects computed points by straight lines.
The
INTERPOL=NONE option leaves computed points unconnected.
KEY= BYCURVE < ( bycurve-options ) >
KEY= BYFEATURE < ( byfeature-options ) >
KEY= ONCURVES
specifies the style of key (or “legend”) for the plot.
The default is
KEY=BYFEATURE, which specifies a key with a column of entries for each
used plot feature (line style, color, and/or symbol). Each entry shows the mapping
between a value of the feature and the value(s) of the analysis parameter(s) linked to
that feature. The KEY=BYCURVE option specifies a key with each row identifying

3214
Chapter 56. The POWER Procedure (Experimental)
a distinct curve in the plot. The KEY=ONCURVES option places a curve-specific
label adjacent to each curve.
You can specify the following byfeature-options in parentheses after the
KEY=BYCURVE option.
NUMBERS=OFF
NUMBERS=ON specifies how the key should identify curves. If NUMBERS=OFF,
then the key includes symbol, color, and line style samples to iden-
tify the curves. If NUMBERS=ON, then the key includes numbers
matching numeric labels placed adjacent to the curves. The default
is NUMBERS=ON.
POS=BOTTOM
POS=INSET
specifies the position of the key. The POS=BOTTOM option places
the key below the x-axis. The POS=INSET option places the key
inside the plotting region and attempts to choose the least crowded
corner. The default is POS=BOTTOM.
You can specify the following byfeature-options in parentheses after the
KEY=BYFEATURE option.
POS=BOTTOM
POS=INSET
specifies the position of the key. The POS=BOTTOM option places
the key below the x-axis. The POS=INSET option places the key
inside the plotting region and attempts to choose the least crowded
corner. The default is POS=BOTTOM.
MARKERS=ANALYSIS
MARKERS=COMPUTED
MARKERS=NICE
MARKERS=NONE

specifies the locations for plotting symbols.
The MARKERS=ANALYSIS option places plotting symbols at locations corre-
sponding to the values of the parameter associated with the “argument” axis (the axis
that is not representing the parameter being solved for) from the analysis statement
preceding the PLOT statement.
The MARKERS=COMPUTED option (the default) places plotting symbols at the
locations of actual computed points from the sample size analysis (as opposed to
interpolated values).
The MARKERS=NICE option places plotting symbols at tick mark locations (corre-
sponding to the argument axis).
The MARKERS=NONE option disables plotting symbols.
MAX=number
specifies the maximum of the range of values for the parameter associated with the

PLOT Statement
3215
“argument” axis (the axis that is not representing the parameter being solved for). The
default is the maximum value occurring for this parameter in the analysis statement
preceding the PLOT statement.
MIN=number
specifies the minimum of the range of values for the parameter associated with the
“argument” axis (the axis that is not representing the parameter being solved for). The
default is the minimum value occurring for this parameter in the analysis statement
preceding the PLOT statement.
NPOINTS=number
specifies the number of values for the parameter associated with the “argument” axis
(the axis that is not representing the parameter being solved for). You cannot use
the NPOINTS= and STEP= options simultaneously. The default value for typical
situations is 20.
STEP=number
specifies the increment between values of the parameter associated with the “argu-
ment” axis (the axis that is not representing the parameter being solved for). You
cannot use the STEP= and NPOINTS= options simultaneously. By default, the
NPOINTS= option is used instead of the STEP= option.
VARY ( feature < BY parameter-list > ... feature < BY parameter-list > )
specifies how plot features should be linked to varying analysis parameters. Available
plot features are COLOR, LINESTYLE, PANEL, and SYMBOL. A “panel” refers to
a separate plot with a heading identifying the subset of values represented in the plot.
The parameter-list is a list of one or more names separated by spaces. Each name
must match the name of an analysis option used in the analysis statement preceding
the PLOT statement.
If you omit the < BY parameter-list > portion for a feature, then one or more multi-
valued parameters from the analysis will be automatically selected for you.
X=EFFECT
X=N
X=POWER

specifies a plot with the requested type of parameter on the x-axis and the parame-
ter being solved for on the y-axis. When X=EFFECT, the parameter assigned to the
x-axis is the one most representative of “effect size.” When X=N, the parameter as-
signed to the x-axis is the sample size. When X=POWER, the parameter assigned to
the x-axis is the one most representative of “power” (either power itself or a similar
probability, such as Prob(Width) for confidence interval analyses). You cannot use
the X= and Y= options simultaneously. The default is X=POWER, unless the result
parameter is power or Prob(Width), in which case the default is X=N.
XOPTS= ( x-options )
specifies plot characteristics pertaining to the x-axis.
You can specify the following x-options in parentheses.

3216
Chapter 56. The POWER Procedure (Experimental)
CROSSREF=NO
CROSSREF=YES specifies whether the reference lines defined by the REF= x-
option should turn at the intersection with each curve and extend
to the y-axis.
REF=number-list specifies locations for reference lines extending from the x-axis
across the entire plotting region. See the “Specifying Value Lists
in Analysis Statements” section on page 3218 for information on
specifying the number-list.
Y=EFFECT
Y=N
Y=POWER

specifies a plot with the requested type of parameter on the y-axis and the parame-
ter being solved for on the x-axis. When Y=EFFECT, the parameter assigned to the
y-axis is the one most representative of “effect size.” When Y=N, the parameter as-
signed to the y-axis is the sample size. When Y=POWER, the parameter assigned to
the y-axis is the one most representative of “power” (either power itself or a similar
probability, such as Prob(Width) for confidence interval analyses). You cannot use
the Y= and X= options simultaneously. By default, the X= option is used instead of
the Y= option.
YOPTS= ( y-options )
specifies plot characteristics pertaining to the y-axis.
You can specify the following y-options in parentheses.
CROSSREF=NO
CROSSREF=YES specifies whether the reference lines defined by the REF= y-
option should turn at the intersection with each curve and extend
to the x-axis.
REF=number-list specifies locations for reference lines extending from the y-axis
across the entire plotting region. See the “Specifying Value Lists
in Analysis Statements” section on page 3218 for information on
specifying the number-list.
You can specify the following graph-options in the PLOT statement after a slash (/).
DESCRIPTION=’string
specifies a descriptive string of up to 40 characters that appears in the “Description”
field of the graphics catalog. The description does not appear on the plots. By default,
PROC POWER assigns a description either of the form “Y versus X” (for a single-
panel plot) or of the form “Y versus X (S),” where Y is the parameter on the y-axis, X
is the parameter on the x-axis, and S is a description of the subset represented on the
current panel of a multipanel plot.
NAME=’string
specifies a name of up to eight characters for the catalog entry for the plot. The

Summary of Analyses
3217
default name is PLOTn, where n is the number of the plot statement within the current
invocation of PROC POWER. If the name duplicates the name of an existing entry,
SAS/GRAPH software adds a number to the duplicate name to create a unique entry,
for example, PLOT11 and PLOT12 for the second and third panels of a multipanel
plot generated in the first PLOT statement in an invocation of PROC POWER.
Details
Summary of Analyses
Table 56.14 gives a summary of the analyses supported in the POWER procedure.
The name of the analysis statement reflects the type of data and design. The TEST=,
CI=, and DIST= options specify the focus of the statistical hypothesis (in other words,
the criterion on which the research question is based) and the test statistic to be used
in data analysis.
Table 56.14.
Summary of Analyses
Statement
Options
Multiple linear regression:
MULTREG
TEST=PREDICTORSET
Coefficients
Binomial proportion: Exact
ONESAMPLEFREQ
TEST=BINOMIAL
test (“Sign test” if null is 0.5)
One-sample t test
ONESAMPLEMEANS TEST=T
One-sample t test with log-
ONESAMPLEMEANS TEST=T
normal data
DIST=LOGNORMAL
One-sample equivalence test
ONESAMPLEMEANS TEST=EQUIV
for mean of normal data
One-sample equivalence test
ONESAMPLEMEANS TEST=EQUIV
for mean of lognormal data
DIST=LOGNORMAL
Confidence interval for a
ONESAMPLEMEANS CI=T
mean
One-way ANOVA: One-d.f.
ONEWAYANOVA
TEST=CONTRAST
contrast
One-way ANOVA: Overall F
ONEWAYANOVA
TEST=OVERALL–F
test
Paired t test
PAIREDMEANS
TEST=DIFF
Paired additive equivalence
PAIREDMEANS
TEST=EQUIV–ADD
of mean difference with nor-
mal data
Paired multiplicative equiva-
PAIREDMEANS
TEST=EQUIV–MULT
lence of mean ratio with log-
normal data
Confidence interval for mean
PAIREDMEANS
CI=DIFF
of paired differences
Two-sample t test assuming
TWOSAMPLEMEANS TEST=DIFF
equal variances

3218
Chapter 56. The POWER Procedure (Experimental)
Table 56.14.
(continued)
Statement
Options
Two-sample Satterthwaite t
TWOSAMPLEMEANS TEST=DIFF–SATT
test assuming unequal vari-
ances
Two-sample pooled t test of
TWOSAMPLEMEANS TEST=RATIO
mean ratio with lognormal
data
Two-sample additive equiv-
TWOSAMPLEMEANS TEST=EQUIV–ADD
alence of mean difference
with normal data
Two-sample
multiplicative
TWOSAMPLEMEANS TEST=EQUIV–MULT
equivalence of mean ratio
with lognormal data
Two-sample confidence in-
TWOSAMPLEMEANS CI=DIFF
terval for mean difference
Specifying Value Lists in Analysis Statements
To specify one or more scenarios for an analysis parameter (or set of parameters), you
provide a list of values attached to the statement option representing the parameter(s).
To identify the parameter you wish to solve for, you place missing values in the
appropriate list.
There are three basic types of such lists: keyword-lists, number-lists, and grouped-
number-lists
. Some parameters, such as the direction of a test, have values repre-
sented by one or more keywords in a keyword-list. Scenarios for scalar-valued pa-
rameters, such as power, are represented by a number-list. Scenarios for groups of
scalar-valued parameters, such as group sample sizes in a multigroup design, are rep-
resented by a grouped-number-list.
The following subsections explain these three basic types of lists.
Keyword-lists
A keyword-list is a list of one or more keywords separated by spaces. For example,
you can specify both 2-sided and upper-tailed versions of a one-sample t test:
SIDES = 2 U
Number-lists
A number-list can be one of two things: a series of one or more numbers expressed
in the form of one or more DOLISTs, or a missing value indicator ( . ).
The DOLIST format is the same as in the DATA step language. For example, for
the one-sample t test you can specify four scenarios (30, 50, 70, and 100) for a total
sample size in any of the following ways.

Specifying Value Lists in Analysis Statements
3219
NTOTAL = 30 50 70 100
NTOTAL = 30 to 70 by 20 100
A missing value identifies a parameter as the result parameter; it is valid only with
options representing parameters you can solve for in a given analysis. For example,
you can request a solution for NTOTAL:
NTOTAL = .
Grouped-number-lists
A grouped-number-list specifies multiple scenarios for numeric values in two or more
groups, possibly including missing value indicators to solve for a specific group.
The list can assume one of two general forms, a “crossed” version and a “matched”
version.
Crossed Grouped-number-lists
The crossed version of a grouped number list consists of a series of number-lists
(see the “Number-lists” section on page 3218), one representing each group, each
separated by a vertical bar (|). The values for each group represent multiple scenarios
for that group, and the scenarios for each individual group are crossed to produce
the set of all scenarios for the analysis option. For example, you can specify two
scenarios for a group 1 sample size (20 and 25) and three scenarios for a group 2
sample size (30, 40, and 50), amounting to 2 × 3 = 6 sample size scenarios, as
follows.
GROUPNS = 20 25 | 30 40 50
If the analysis can solve for a value in one group given the other groups, then one
of the number-lists can be a missing value indicator ( . ). For example, for the two-
sample t test you can posit three scenarios for the group 2 sample size and solve for
the group 1 sample size:
GROUPNS = . | 30 40 50
Some analyses can involve more than two groups. For example, you can specify 2 ×
3 × 1 = 6 scenarios for the means of three groups in a one-way ANOVA:
GROUPMEANS = 10 12 | 10 to 20 by 5 | 24
Matched Grouped-number-lists
The matched version of a grouped number list consists of a series of numeric lists
each enclosed in parentheses. Each list consists of a value for each group and rep-
resents a single scenario for the analysis option. Multiple scenarios for the analysis
option are represented by multiple lists. For example, you can express the first set of
group sample size scenarios discussed in the “Crossed Grouped-number-lists” section
on page 3219 alternatively in a matched format:

3220
Chapter 56. The POWER Procedure (Experimental)
GROUPNS = (20 30) (20 40) (20 50) (25 30) (25 40) (25 50)
The matched version is particularly useful when you wish to include only a subset of
all combinations of individual group values. For example, you may want to pair 20
only with 50, and 25 only with 30 and 40:
GROUPNS = (20 50) (25 30) (25 40)
If the analysis can solve for a value in one group given the other groups, then you
can replace the value for that group with a missing value indicator ( . ). If used, the
missing value indicator must occur in the same group in every scenario. For example,
you can solve for the group 1 sample size (as in the “Crossed Grouped-number-lists”
section on page 3219) using a matched format:
GROUPNS = (. 30) (. 40) (. 50)
Some analyses can involve more than two groups. For example, you can specify two
scenarios for the means of three groups in a one-way ANOVA:
GROUPMEANS = (15 24 32) (12 25 36)
Sample Size Adjustment Options
Without the NFRACTIONAL option, sample sizes are rounded conservatively (down
in the input, up in the output) so that all total sizes (and individual group sample sizes,
if a multigroup design) are integers. In addition, in a multigroup design, all group
sizes are adjusted to be multiples of their corresponding group weights. For example,
if GROUPWEIGHTS = (2 6), then all group 1 sample sizes become multiples of
2, and all group 2 sample sizes become multiples of 6 (and, all total sample sizes
become multiples of 8).
With the NFRACTIONAL option, sample size input is left alone, and sample size
results (whether total or group-wise) are reported in two versions, a raw “fractional”
version and a “ceiling” version rounded up to the nearest integer.
Whenever an input sample size is adjusted, both the original (“nominal”) and adjusted
(“actual”) sample sizes are reported. Whenever computed sample sizes are adjusted,
both the original input (“nominal”) power and the achieved (“actual”) power at the
adjusted sample size are reported.

Displayed Output
3221
Error and Information Output
The Error column in the main output table explains reasons for missing results and
flags numerical results that are bounds rather than exact answers.
The Information column provides further details about Error entries, warnings about
any boundary conditions detected, and notes about any adjustments to input. Note
that the Information column is hidden by default in the main output. But you can view
it as the Info column in the Output data set by using the ODS OUTPUT statement
and the PRINT procedure. For example, the following SAS statements print both the
Error and Info columns for a power computation in a two-sample t test.
proc power;
twosamplemeans
meandiff= 0 7
stddev=2
ntotal=2 5
power=.;
ods output output=Power;
proc print data=Power;
var NominalNTotal NTotal Power Error Info;
run;
The output is shown in Figure 56.6.
Nominal
Obs
NTotal
NTotal
Power
Error
Info
1
2
2
.
Invalid input
NTotal too small / No effect
2
5
4
0.050000
Input N adjusted / No effect
3
2
2
.
Invalid input
NTotal too small
4
5
4
0.477161
Input N adjusted
Figure 56.6.
Error and Information Columns
The mean difference of 0 specified with the MEANDIFF= option causes a “No ef-
fect” message to appear in the Info column. The sample size of 2 specified with
the NTOTAL= option causes an “Invalid input” message in the Error column and
an “NTotal too small” message in the Info column. The sample size of 5 causes an
“Input N adjusted” message in the Info column because it is rounded down to 4 to
produce integer group sizes of 2 per group.
Displayed Output
If you use the PLOTONLY option in the PROC POWER statement, the procedure
only displays graphical output. Otherwise, the displayed output of the POWER pro-
cedure includes the following.
• the description of the statistical analysis

3222
Chapter 56. The POWER Procedure (Experimental)
• the “Fixed Scenario Elements” table, which shows all applicable single-valued
analysis parameters, in the following order: distribution, method, parameters
input explicitly, and parameters supplied with defaults
• an output table showing the following when applicable (in order): the index
of the scenario, all multivalued input, ancillary results, the primary computed
result, and error descriptions
• plots (if requested)
Ancillary results include the following.
• Actual Power, the achieved power, if it differs from the input (Nominal) power
value
• Actual Prob(Width), the achieved precision probability, if it differs from the
input (Nominal) probability value
• Actual Alpha, the achieved significance level, if it differs from the input
(Nominal) alpha value
• fractional sample size, if the NFRACTIONAL option is used in the analysis
statement
If sample size is the result parameter and the NFRACTIONAL option is used in
the analysis statement, then both “Fractional” and “Ceiling” sample size results are
displayed. Fractional sample sizes correspond to the “Nominal” values of power or
precision probability. Ceiling sample sizes are simply the fractional sample sizes
rounded up to the nearest integer; they correspond to “Actual” values of power or
precision probability.
ODS Table Names
PROC POWER assigns a name to each table that it creates. You can use these names
to reference the table when using the Output Delivery System (ODS) to select ta-
bles and create output data sets. These names are listed in Table 56.15. For more
information on ODS, see Chapter 14, “Using the Output Delivery System.”
Table 56.15.
ODS Tables Produced in PROC POWER
ODS Table Name
Description
Statement
FixedElements
factoid with single-valued analy-
default*
sis parameters
Output
all input and computed analysis
default
parameters, error messages, and
information messages for each
scenario
PlotContent
data contained in plots, including
PLOT
analysis parameters and indices
identifying plot features

Mathematical Methods and Formulas
3223
*Depends on input.
The ODS path names are created as follows.
• Power.<analysis statement name><n>.FixedElements
• Power.<analysis statement name><n>.Output
• Power.<analysis statement name><n>.PlotContent
• Power.<analysis statement name><n>.Plot<n>
where
• The Plot<n> objects are the actual plots.
• The <n> indexing the analysis statement name is only used if there is more
than one instance.
• The <n> indexing the plots increases with every panel in every plot statement,
resetting to 1 only at new analysis statements.
Mathematical Methods and Formulas
This section describes the approaches used in PROC POWER to compute power for
each analysis. Unless otherwise indicated, computed values for parameters besides
power (for example, sample size) are obtained by solving power formulas for the
desired parameters.
Common Notation
Table 56.16 displays notation for some of the more common parameters across anal-
yses. The Associated Syntax column shows examples of relevant analysis statement
options, where applicable.
Table 56.16.
Common Notation
Symbol
Description
Associated Syntax
α
significance level
ALPHA=
N
total sample size
NTOTAL=, NPAIRS=
ni
sample size in ith group
NPERGROUP=,
GROUPNS=
wi
allocation weight for ith group (stan-
GROUPWEIGHTS=
dardized to sum to 1)
µ
(arithmetic) mean
MEAN=
µi
(arithmetic) mean in ith group
GROUPMEANS=,
PAIREDMEANS=
µdiff
(arithmetic) mean difference, µ2 −µ1
MEANDIFF=
or µT − µR
µ0
null mean or mean difference (arith-
NULL=, NULLDIFF=
metic)
γ
geometric mean
MEAN=
γi
geometric mean in ith group
GROUPMEANS=,
PAIREDMEANS=

3224
Chapter 56. The POWER Procedure (Experimental)
Table 56.16.
(continued)
Symbol
Description
Associated Syntax
γ0
null mean or mean ratio (geometric)
NULL=, NULLRATIO=
σ
standard deviation (or common stan-
STDDEV=
dard deviation per group)
σi
standard deviation in ith group
GROUPSTDDEVS=,
PAIREDSTDDEVS=
σdiff
standard deviation of differences
CV
coefficient of variation, defined as the
CV=,
GROUPCVS=,
ratio of the standard deviation to the
PAIREDCVS=
(arithmetic) mean
ρ
correlation
CORR=
p
binomial proportion
PROPORTION=
p0
null binomial proportion
NULLPROPORTION=
µT , µR
treatment and reference (arithmetic)
GROUPMEANS=,
means for equivalence test
PAIREDMEANS=
γT , γR
treatment and reference geometric
GROUPMEANS=,
means for equivalence test
PAIREDMEANS=
θL
lower equivalence bound
LOWER=
θU
upper equivalence bound
UPPER=
t(ν, δ)
t distribution with d.f. ν and noncen-
trality δ
F (ν1, ν2, λ)
F distribution with numerator d.f. ν1,
denominator d.f. ν2, and noncentral-
ity λ
tp;ν
pth percentile of t distribution with
d.f. ν
Fp;ν
pth percentile of F distribution with
1,ν2
numerator d.f. ν1 and denominator
d.f. ν2
Bin(N, p)
binomial distribution with sample
size N and proportion p
A “lower 1-sided” test is associated with SIDES=L (or SIDES=1 with the effect
smaller than the null value), and an “upper 1-sided” test is associated with SIDES=U
(or SIDES=1 with the effect larger than the null value).
Owen (1965) defines a “Q function” that is convenient for representing terms in
power formulas for confidence intervals and equivalence tests:
√2π
b
tx
Qν(t, δ; a, b) =
Φ
√ − δ xν−1φ(x)dx
ν−2
Γ( ν )2
ν
2
a
2
where φ(·) and Φ(·) are the density and cumulative distribution function of the stan-
dard normal distribution, respectively.

Mathematical Methods and Formulas
3225
Analyses in the MULTREG Statement
Type III F Test of a Set of Predictors (TEST=PREDICTORSET)
Maxwell (2000) discusses a number of different ways to represent effect sizes (and
compute exact power based on them) in multiple regression. PROC POWER supports
two of these, (1) multiple partial correlation and (2) R2 in full and reduced models.
Assume that all predictors are fixed (as opposed to random). Let p denote the total
number of predictors in the full model (excluding the intercept) and Y the response
variable. You are testing that the coefficients of p1 ≥ 1 predictors in a set Xj are zero,
controlling for all of the other predictors X−j (comprised of p − p1 ≥ 0 variables).
The hypotheses can be expressed in two different ways. The first is in terms of
ρY X
, the multiple partial correlation between the predictors in X
j |X−j
j and the re-
sponse Y adjusting for the predictors in X−j:
H0 : ρ2
= 0
Y Xj |X−j
H1 : ρ2
> 0
Y Xj |X−j
The second is in terms of the multiple correlations in full (ρY |(Xj,X−j)) and reduced
(ρY |X ) nested models (whose squared values are the population R2 values for full
−j
and reduced models):
H0 : ρ2
− ρ2
= 0
Y |(Xj ,X−j )
Y |X−j
H1 : ρ2
− ρ2
> 0
Y |(Xj ,X−j )
Y |X−j
The test statistic can be written in terms of the sample multiple partial correlation
RY X
,
j |X−j

R2
Y X

j |X−j
 (N − p − 1)
,
intercept

1−R2
F =
Y Xj |X−j
R2
Y X

j |X−j
 (N − p)
,
no intercept

1−R2
Y Xj |X−j
or the sample multiple correlations in full (RY |(X
) mod-
j ,X−j )) and reduced (RY |X−j
els,

R2
−R2
Y |(Xj ,X−j )
Y |X−j

 (N − p − 1)
,
intercept

1−R2
F =
Y |(Xj ,X−j )
R2
−R2
Y |(X
Y |X

j ,X−j )
−j
 (N − p)
,
no intercept

1−R2
Y |(Xj ,X−j )
The test is the usual type III F test in multiple regression:
F ≥ F
Reject
H
1−α(p1, N − p − 1),
intercept
0
if
F ≥ F1−α(p1, N − p),
no intercept

3226
Chapter 56. The POWER Procedure (Experimental)
The noncentrality parameter is
ρ2Y X
λ = N
j |X−j
1 − ρ2Y Xj|X−j
or equivalently,
ρ2
− ρ2
Y |(X
Y |X
λ = N
j ,X−j )
−j
1 − ρ2Y |(Xj,X−j)
The power is
P (F (p
power
=
1, N − p − 1, λ) ≥ F1−α(p1, N − p − 1)) ,
intercept
P (F (p1, N − p, λ) ≥ F1−α(p1, N − p)) ,
no intercept
The solution for N is obtained by numerically inverting the power equation.
Analyses in the ONESAMPLEFREQ Statement
Exact Test of a Binomial Proportion (TEST=BINOMIAL)
Let X be distributed as Bin(N, p). The hypotheses for the test of the proportion p
are as follows.
H0 : p = p0
 p = p0, 2-sided

H1 :
p > p0, upper 1-sided
 p < p0, lower 1-sided
The exact test assumes binomially distributed data and requires N ≥ 1 and 0 < p0 <
1. The test statistic is
X = number of successes ∼ Bin(N, p)
Alpha is split symmetrically for 2-sided tests, in the sense that each tail is filled with
as much as possible up to α .
2
Exact power computations are based on the binomial distribution and computing for-
mulas such as the following from Johnson and Kotz (1970, equation 3.20):
ν2p
P (X ≥ C|N, p)
=
P


1,ν2
ν1(1 − p)
where ν1 = 2C and ν2 = 2(N − C + 1)
Let CL and CU denote lower and critical values, respectively. Let αa denote the
achieved (actual) significance level, which for 2-sided tests is the sum of the favorable
major tail (αM ) and the opposite minor tail (αm).

Mathematical Methods and Formulas
3227
For the upper 1-sided case,
CU
=
min{C : P (X ≥ C|p0) ≤ α}
Reject H0
if
X ≥ CU
αa = P (X ≥ CU |p0)
power
=
P (X ≥ CU |p)
For the lower 1-sided case,
CL = max{C : P (X ≤ C|p0) ≤ α}
Reject H0
if
X ≤ CL
αa = P (X ≤ CL|p0)
power
=
P (X ≤ CL|p)
For the 2-sided case,
α
CL = max{C : P (X ≤ C|p0) ≤
}
2
α
CU
=
min{C : P (X ≥ C|p0) ≤
}
2
Reject H0
if
X ≤ CL or X ≥ CU
αa = P (X ≤ CL or X ≥ CU |p0)
power
=
P (X ≤ CL or X ≥ CU |p)
The computed total sample size is the smallest N such that
 P (X ≥ CU |N, p),
upper 1-sided case

nominal power ≤
P (X ≤ CL|N, p),
lower 1-sided case
 P (X ≤ CL or X ≥ CU |N, p), 2-sided case
Analyses in the ONESAMPLEMEANS Statement
One-sample t Test (TEST=T)
The hypotheses for the one-sample t test are
H0 : µ = µ0
 µ = µ0, 2-sided

H1 :
µ > µ0, upper 1-sided
 µ < µ0, lower 1-sided
The test assumes normally distributed data and requires N ≥ 2. The test statistics are
1
¯
x − µ0
t
=
N 2
∼ t(N − 1, δ)
s
t2

F (1, N − 1, δ2)

3228
Chapter 56. The POWER Procedure (Experimental)
where ¯
x is the sample mean, s is the sample standard deviation, and
1
µ − µ0
δ = N 2
σ
The test is
 t2 ≥ F1−α(1, N − 1), 2-sided

Reject
H0
if
t ≥ t1−α(N − 1),
upper 1-sided
 t ≤ tα(N − 1),
lower 1-sided
Exact power computations for t tests are discussed in O’Brien and Muller (1993,
section 8.2), although not specifically for the one-sample case. The power is based
on the non-central t and F distributions:
 P F (1, N − 1, δ2) ≥ F1−α(1, N − 1) , 2-sided

power
=
P (t(N − 1, δ) ≥ t1−α(N − 1)) ,
upper 1-sided
 P (t(N − 1, δ) ≤ tα(N − 1)) ,
lower 1-sided
Solutions for N , α, and δ are obtained by numerically inverting the power equation.
Closed-form solutions for other parameters, in terms of δ, are as follows.
µ
=
δσN − 12 + µ0
1
δ−1N 2 (µ − µ
σ
=
0),
|δ| > 0
undefined,
otherwise
One-sample t Test with Lognormal Data (TEST=T DIST=LOGNORMAL)
The lognormal case is handled by re-expressing the analysis equivalently as a
normality-based test on the log-transformed data, using properties of the lognormal
distribution as discussed in Johnson and Kotz (1970, chapter 14). The approaches in
the “One-sample t Test (TEST=T)” section on page 3227 then apply.
In contrast to the usual t test on normal data, the hypotheses with lognormal data are
defined in terms of geometric means rather than arithmetic means. This is because
the transformation of a null arithmetic mean of lognormal data to the normal scale
depends on the unknown coefficient of variation, resulting in an ill-defined hypothesis
on the log-transformed data. Geometric means transform cleanly and are more natural
for lognormal data.
The hypotheses for the one-sample t test with lognormal data are
γ
H0 :
= 1
γ0

γ = 1, 2-sided
 γ

0
H
γ
1
:
> 1,
upper 1-sided
γ0

γ

< 1,
lower 1-sided
γ0

Mathematical Methods and Formulas
3229
Let µ and σ be the (arithmetic) mean and standard deviation of the normal distri-
bution of the log-transformed data. The hypotheses can be rewritten as follows.
H0 : µ = log(γ0)
 µ = log(γ0), 2-sided

H1 :
µ > log(γ0), upper 1-sided
 µ < log(γ0), lower 1-sided
where µ = log(γ).
The test assumes lognormally distributed data and requires N ≥ 2.
The power is
 P F (1, N − 1, δ2) ≥ F1−α(1, N − 1) , 2-sided

power =
P (t(N − 1, δ) ≥ t1−α(N − 1)) ,
upper 1-sided
 P (t(N − 1, δ) ≤ tα(N − 1)) ,
lower 1-sided
where
1
µ − log(γ0)
δ
=
N 2
σ
1
σ
=
log(CV2 + 1) 2
The solution for N is obtained by numerically inverting the power equation.
Equivalence Test for Mean of Normal Data (TEST=EQUIV DIST=NORMAL)
The hypotheses for the equivalence test are
H0 : µ < θL
or
µ > θU
H1 : θL ≤ µ ≤ θU
The analysis is the two one-sided tests (TOST) procedure of Schuirmann (1987). The
test assumes normally distributed data and requires N ≥ 2. Phillips (1990) derives an
expression for the exact power assuming a two-sample balanced design; the results
are easily adapted to a one-sample design:
1
µ − θU
(N − 1) 2 (θU − θL)
power
=
QN−1
(−t1−α(N − 1)),
; 0,

σN − 12
2σN − 12 (t1−α(N − 1))
1
µ − θL
(N − 1) 2 (θU − θL)
QN−1
(t1−α(N − 1)),
; 0,
σN − 12
2σN − 12 (t1−α(N − 1))
where Q·(·, ·; ·, ·) is Owen’s Q function, defined in the “Common Notation” section
on page 3223. The solution for N is obtained by numerically inverting the power
equation.

3230
Chapter 56. The POWER Procedure (Experimental)
Equivalence Test for Mean of Lognormal Data (TEST=EQUIV DIST=LOGNORMAL)
The lognormal case is handled by re-expressing the analysis equivalently as a
normality-based test on the log-transformed data, using properties of the lognormal
distribution as discussed in Johnson and Kotz (1970, chapter 14). The approaches in
the “Equivalence Test for Mean of Normal Data (TEST=EQUIV DIST=NORMAL)”
section on page 3229 then apply.
In contrast to the additive equivalence test on normal data, the hypotheses with log-
normal data are defined in terms of geometric means rather than arithmetic means.
This is because the transformation of an arithmetic mean of lognormal data to the nor-
mal scale depends on the unknown coefficient of variation, resulting in an ill-defined
hypothesis on the log-transformed data. Geometric means transform cleanly and are
more natural for lognormal data.
The hypotheses for the equivalence test are
H0 : γ ≤ θL
or
γ ≥ θU
H1 : θL < γ < θU
where
0 < θL < θU
The analysis is the two one-sided tests (TOST) procedure of Schuirmann (1987) on
the log-transformed data. The test assumes lognormally distributed data and requires
N ≥ 2. Diletti, Hauschke, and Steinijans (1991) derive an expression for the exact
power assuming a cross-over design; the results are easily adapted to a one-sample
design:
log (γ) − log(θU )
power
=
QN−1 (−t1−α(N − 1)),
;
σ N − 12
1
(N − 1) 2 (log(θU ) − log(θL))
0,

2σ N − 12 (t1−α(N − 1))
log (γ) − log(θL)
QN−1 (t1−α(N − 1)),
;
σ N − 12
1
(N − 1) 2 (log(θU ) − log(θL))
0,
2σ N − 12 (t1−α(N − 1))
where
1
σ = log(CV2 + 1) 2
is the standard deviation of the log-transformed data, and Q·(·, ·; ·, ·) is Owen’s Q
function, defined in the “Common Notation” section on page 3223. The solution for
N is obtained by numerically inverting the power equation.

Mathematical Methods and Formulas
3231
Confidence Interval for Mean (CI=T)
This analysis of precision applies to the standard t-based confidence interval:
¯
x − t1− α (N − 1) s

,
¯
x + t1− α (N − 1) s

,
2-sided
2
N
2
N
¯
x − t1−α(N − 1) s

,
∞ ,
upper 1-sided
N
−∞,
¯
x + t1−α(N − 1) s

,
lower 1-sided
N
where ¯
x is the sample mean and s is the sample standard deviation. The “half-width”
is defined as the distance from the point estimate ¯
x to a finite endpoint,
t1− α (N − 1) s

,
2-sided
half-width =
2
N
t1−α(N − 1) s

,
1-sided
N
A “valid” conference interval captures the true mean. The exact probability of obtain-
ing at most the target confidence interval half-width h, unconditional or conditional
on validity, is given by Beal (1989):

 P
χ2(N − 1) ≤
h2N (N −1)
,
2-sided

σ2(t2
(N −1))
Pr(half-width ≤ h)
=
1− α
2

 P
χ2(N − 1) ≤
h2N (N −1)
,
1-sided
σ2(t2
(N −1))
1−α

1

2 Q
(N − 1)), 0;
1−α
N −1
(t1− α
Pr(half-width ≤ h |


2
=
0, b
validity)
1) − QN −1(0, 0; 0, b1)] ,
2-sided


1

Q
1−α
N −1 ((t1−α(N − 1)), 0; 0, b1) ,
1-sided
where
1
h(N − 1) 2
b1 =
σ(t1− α (N − 1))N − 12
c
c
=
number of sides
and Q·(·, ·; ·, ·) is Owen’s Q function, defined in the “Common Notation” section on
page 3223. The solution for N is obtained by numerically inverting the probability
equation.
A “quality” confidence interval is both sufficiently narrow (half-width ≤ h) and valid:
Pr(quality)
=
Pr(half-width ≤ h and validity)
=
Pr(half-width ≤ h | validity)(1 − α)

3232
Chapter 56. The POWER Procedure (Experimental)
Analyses in the ONEWAYANOVA Statement
One-d.f. Contrast (TEST=CONTRAST)
The hypotheses are
H0 : c1µ1 + · · · + cGµG = c0
 c1µ1 + · · · + cGµG = c0, 2-sided

H1 :
c1µ1 + · · · + cGµG > c0, upper 1-sided
 c1µ1 + · · · + cGµG < c0, lower 1-sided
where G is the number of groups, {c1, . . . , cG} are the contrast coefficients, and c0 is
the null contrast value.
The test is the usual F test for a contrast in one-way ANOVA. It assumes normal data
with common group variances and requires N ≥ G + 1 and ni ≥ 1.
O’Brien and Muller (1993, section 8.2.3.2) give the exact power as
 P F (1, N − G, δ2) ≥ F1−α(1, N − G) , 2-sided

power =
P (t(N − G, δ) ≥ t1−α(N − G)) ,
upper 1-sided
 P (t(N − G, δ) ≤ tα(N − G)) ,
lower 1-sided
where


G
1
ciµi − c0
δ = N
i=1
2 


1
c2

2
σ
G
i
i=1 wi
The solution for N is obtained by numerically inverting the power equation.
Overall F Test (TEST=OVERALL–F)
The hypotheses are
H0 : µ1 = µ2 = · · · = µG
H1 : µi = µj for some i,j
where G is the number of groups.
The test is the usual overall F test for equality of means in one-way ANOVA. It
assumes normal data with common group variances and requires N ≥ G + 1 and
ni ≥ 1.
O’Brien and Muller (1993, section 8.2.3.1) give the exact power as
power = P (F (G − 1, N − G, λ) ≥ F1−α(G − 1, N − G))

Mathematical Methods and Formulas
3233
where the noncentrality is
G
wi(µi − ¯
µ)2
λ = N
i=1
σ2
and
G
¯
µ =
wiµi
i=1
The solution for N is obtained by numerically inverting the power equation.
Analyses in the PAIREDMEANS Statement
Paired t Test (TEST=DIFF)
The hypotheses for the paired t test are
H0 : µdiff = µ0
 µdiff = µ0, 2-sided

H1 :
µdiff > µ0, upper 1-sided
 µdiff < µ0, lower 1-sided
The test assumes normally distributed data and requires N ≥ 2. The test statistics are
¯
1
d − µ0
t
=
N 2
∼ t(N − 1, δ)
sd
t2

F (1, N − 1, δ2)
where ¯
d and sd are the sample mean and standard deviation of the differences and
1
µdiff − µ0
δ = N 2
σdiff
and
1
σ
2
diff =
σ2

1 + σ2
2
2ρσ1σ2
The test is
 t2 ≥ F1−α(1, N − 1), 2-sided

Reject
H0
if
t ≥ t1−α(N − 1),
upper 1-sided
 t ≤ tα(N − 1),
lower 1-sided

3234
Chapter 56. The POWER Procedure (Experimental)
Exact power computations for t tests are given in O’Brien and Muller (1993, section
8.2.2):
 P F (1, N − 1, δ2) ≥ F1−α(1, N − 1) , 2-sided

power
=
P (t(N − 1, δ) ≥ t1−α(N − 1)) ,
upper 1-sided
 P (t(N − 1, δ) ≤ tα(N − 1)) ,
lower 1-sided
The solution for N is obtained by numerically inverting the power equation.
Additive Equivalence Test for Mean Difference with Normal Data (TEST=EQUIV–ADD)
The hypotheses for the equivalence test are
H0 : µdiff < θL
or
µdiff > θU
H1 : θL ≤ µdiff ≤ θU
The analysis is the two one-sided tests (TOST) procedure of Schuirmann (1987). The
test assumes normally distributed data and requires N ≥ 2. Phillips (1990) derives an
expression for the exact power assuming a two-sample balanced design; the results
are easily adapted to a paired design:
1
µdiff − θU
(N − 1) 2 (θU − θL)
power
=
QN−1
(−t1−α(N − 1)),
; 0,

σdiff N − 12
2σdiff N − 12 (t1−α(N − 1))
1
µdiff − θL
(N − 1) 2 (θU − θL)
QN−1
(t1−α(N − 1)),
; 0,
σdiff N − 12
2σdiff N − 12 (t1−α(N − 1))
where
1
σ
2
diff =
σ2

1 + σ2
2
2ρσ1σ2
and Q·(·, ·; ·, ·) is Owen’s Q function, defined in the “Common Notation” section
on page 3223. The solution for N is obtained by numerically inverting the power
equation.
Multiplicative Equivalence Test for Mean Ratio with Lognormal Data
(TEST=EQUIV–MULT)
The lognormal case is handled by re-expressing the analysis equivalently as a
normality-based test on the log-transformed data, using properties of the lognor-
mal distribution as discussed in Johnson and Kotz (1970, chapter 14). The ap-
proaches in the “Additive Equivalence Test for Mean Difference with Normal Data
(TEST=EQUIV–ADD)” section on page 3234 then apply.
In contrast to the additive equivalence test on normal data, the hypotheses with log-
normal data are defined in terms of geometric means rather than arithmetic means.

Mathematical Methods and Formulas
3235
The hypotheses for the equivalence test are
γT
γT
H0 :
≤ θL or
≥ θU
γR
γR
γT
H1 : θL <
< θU
γR
where
0 < θL < θU
The analysis is the two one-sided tests (TOST) procedure of Schuirmann (1987) on
the log-transformed data. The test assumes lognormally distributed data and requires
N ≥ 2. Diletti, Hauschke, and Steinijans (1991) derive an expression for the exact
power assuming a cross-over design; the results are easily adapted to a paired design:

log
γT
− log(θ
γ
U )
R
power
=
QN−1 (−t1−α(N − 1)),
;
σ N − 12
1
(N − 1) 2 (log(θU ) − log(θL))
0,

2σ N − 12 (t1−α(N − 1))

log
γT
− log(θ
γ
L)
R
QN−1 (t1−α(N − 1)),
;
σ N − 12
1
(N − 1) 2 (log(θU ) − log(θL))
0,
2σ N − 12 (t1−α(N − 1))
where σ is the standard deviation of the differences between the log-transformed
pairs (in other words, the standard deviation of log(YT ) − log(YR), where YT and YR
are observations from the treatment and reference, respectively), computed as
1
σ
=
σ 2

2
R + σ 2
T
2ρσRσT
1
σ
2
i
=
log(CV2i + 1)
,
i ∈ {R, T }
where ρ is the correlation between the log-transformed pairs (in other words, the
correlation between log(YT ) and log(YR)), and Q·(·, ·; ·, ·) is Owen’s Q function,
defined in the “Common Notation” section on page 3223. The solution for N is
obtained by numerically inverting the power equation.
Confidence Interval for Mean Difference (CI=DIFF)
This analysis of precision applies to the standard t-based confidence interval:
¯
d − t1− α (N − 1) sd

,
¯
d + t1− α (N − 1) sd

,
2-sided
2
N
2
N
¯
d − t1−α(N − 1) sd

,
∞ ,
upper 1-sided
N
−∞,
¯
d + t1−α(N − 1) sd

,
lower 1-sided
N

3236
Chapter 56. The POWER Procedure (Experimental)
where ¯
d and sd are the sample mean and standard deviation of the differences. The
“half-width” is defined as the distance from the point estimate ¯
d to a finite endpoint,
t1− α (N − 1) sd

,
2-sided
half-width =
2
N
t1−α(N − 1) sd

,
1-sided
N
A “valid” conference interval captures the true mean difference. The exact probability
of obtaining at most the target confidence interval half-width h, unconditional or
conditional on validity, is given by Beal (1989):

 P
χ2(N − 1) ≤
h2N (N −1)
,
2-sided

σ2
(t2
(N −1))
Pr(half-width ≤ h)
=
diff
1− α
2

 P
χ2(N − 1) ≤
h2N (N −1)
,
1-sided
σ2
(t2
(N −1))
diff
1−α

1

2 Q
(N − 1)), 0;
1−α
N −1
(t1− α
Pr(half-width ≤ h |


2
=
0, b
validity)
1) − QN −1(0, 0; 0, b1)] ,
2-sided


1

Q
1−α
N −1 ((t1−α(N − 1)), 0; 0, b1) ,
1-sided
where
1
σ
2
diff
=
σ2

1 + σ2
2
2ρσ1σ2
1
h(N − 1) 2
b1 =
σdiff (t1− α (N − 1))N − 12
c
c
=
number of sides
and Q·(·, ·; ·, ·) is Owen’s Q function, defined in the “Common Notation” section on
page 3223. The solution for N is obtained by numerically inverting the probability
equation.
A “quality” confidence interval is both sufficiently narrow (half-width ≤ h) and valid:
Pr(quality)
=
Pr(half-width ≤ h and validity)
=
Pr(half-width ≤ h | validity)(1 − α)
Analyses in the TWOSAMPLEMEANS Statement
Two-sample t Test Assuming Equal Variances (TEST=DIFF)
The hypotheses for the two-sample t test are
H0 : µdiff = µ0
 µdiff = µ0, 2-sided

H1 :
µdiff > µ0, upper 1-sided
 µdiff < µ0, lower 1-sided

Mathematical Methods and Formulas
3237
The test assumes normally distributed data and common standard deviation per group,
and it requires N ≥ 3, n1 ≥ 1, and n2 ≥ 1. The test statistics are
1
1
¯
x2 − ¯
x1 − µ0
t
=
N 2 (w1w2) 2
∼ t(N − 2, δ)
sp
t2

F (1, N − 2, δ2)
where ¯
x1 and ¯
x2 are the sample means and sp is the pooled standard deviation, and
1
1
µdiff − µ0
δ = N 2 (w1w2) 2
σ
The test is
 t2 ≥ F1−α(1, N − 2), 2-sided

Reject
H0
if
t ≥ t1−α(N − 2),
upper 1-sided
 t ≤ tα(N − 2),
lower 1-sided
Exact power computations for t tests are given in O’Brien and Muller (1993, section
8.2.1):
 P F (1, N − 2, δ2) ≥ F1−α(1, N − 2) , 2-sided

power
=
P (t(N − 2, δ) ≥ t1−α(N − 2)) ,
upper 1-sided
 P (t(N − 2, δ) ≤ tα(N − 2)) ,
lower 1-sided
Solutions for N , n1, n2, α, and δ are obtained by numerically inverting the power
equation. Closed-form solutions for other parameters, in terms of δ, are as follows.
µdiff
=
δσ(N w1w2)− 12 + µ0
µ1 = δσ(N w1w2)− 12 + µ0 − µ2
µ2 = δσ(N w1w2)− 12 + µ0 − µ1
1
δ−1(N w
2 (µ
σ
=
1w2)
diff − µ0),
|δ| > 0
undefined,
otherwise

1
1
 1 ± 1
2
|µdiff −µ0|
w
1 −
4δ2σ2
,
0 < |δ| ≤ 1 N 2
1
=
2
2
N (µdiff −µ0)2
2
σ
 undefined,
otherwise

1
1
 1 ± 1
2
|µdiff −µ0|
w
1 −
4δ2σ2
,
0 < |δ| ≤ 1 N 2
2
=
2
2
N (µdiff −µ0)2
2
σ
 undefined,
otherwise
Finally, here is a derivation of the solution for w1:

3238
Chapter 56. The POWER Procedure (Experimental)
Solve the δ equation for w1 (which requires the quadratic formula). Then determine
the range of δ given w1:
0,
when
w1 = 0
or
1,
if
(µdiff − µ0) ≥ 0
min(δ)
=
1 (µ
w
1
diff −µ0)
1
N 2
,
when
w
,
if

2
σ
1 = 1
2
diff − µ0) < 0
0,
when
w1 = 0
or
1,
if
(µdiff − µ0) < 0
max(δ)
=
1 (µ
w
1
diff −µ0)
1
N 2
,
when
w
,
if

2
σ
1 = 1
2
diff − µ0) ≥ 0
This implies
1
1 |µ
|
diff − µ0|
δ| ≤
N 2
2
σ
Two-sample Satterthwaite t Test Assuming Unequal Variances (TEST=DIFF–SATT)
The hypotheses for the two-sample Satterthwaite t test are
H0 : µdiff = µ0
 µdiff = µ0, 2-sided

H1 :
µdiff > µ0, upper 1-sided
 µdiff < µ0, lower 1-sided
The test assumes normally distributed data and requires N ≥ 3, n1 ≥ 1, and n2 ≥ 1.
The test statistics are
¯
x2 − ¯
x1 − µ0
1 ¯
x2 − ¯
x1 − µ0
t
=
= N 2
1
1
s2
s2
2
s2
s2
2
1 + 2
1 + 2
n1
n2
w1
w2
F
=
t2
where ¯
x1 and ¯
x2 are the sample means and s1 and s2 are the sample standard devia-
tions.
As DiSantostefano and Muller (1995, p. 585) state, the test is based on assuming that
under H0, F is distributed as F (1, ν), where ν is given by Satterthwaite’s approxi-
mation (Satterthwaite, 1946),
σ2
σ2 2
σ2
σ2
2
1 + 2
1 + 2
n1
n2
w1
w2
ν =
=
2
2
2
2
σ2
σ2
σ2
σ2
1
2
1
2
n1
n
w
w
+
2
1
+
2
n1−1
n2−1
N w1−1
N w2−1
Since ν is unknown, in practice it must be replaced by an estimate
s2
s2
2
s2
s2
2
1 + 2
1 + 2
n1
n2
w1
w2
ˆ
ν =
=
2
2
2
2
s2
s2
s2
s2
1
2
1
2
n1
n
w
w
+
2
1
+
2
n1−1
n2−1
N w1−1
N w2−1

Mathematical Methods and Formulas
3239
So the test is
 F ≥ F1−α(1, ˆν), 2-sided

Reject
H0
if
t ≥ t1−α(ˆ
ν),
upper 1-sided
 t ≤ tα(ˆ
ν),
lower 1-sided
Exact solutions for power for the 2-sided and upper 1-sided cases are given in Moser,
Stevens, and Watts (1989). The lower 1-sided case follows easily using symmetry.
The equations are as follows.

∞ P (F (1, N − 2, λ) >

0



h(u)F1−α(1, v(u))|u) f (u)du,
2-sided




1


P
t(N − 2, λ 2 ) >

0

power
=
1
[h(u)] 2 t1−α(v(u))|u f (u)du, upper 1-sided




1


P
t(N − 2, λ 2 ) <

0



1


[h(u)] 2 tα(v(u))|u f (u)du,
lower 1-sided
where
1 + u (n
n
1 + n2 − 2)
1
n2
h(u)
=
uσ2
σ2
(n
1
1
2
1 − 1) + (n2 − 1)
+
σ2
n
σ2n
2
1
1
2
2
1 + u
n1
n2
v(u)
=
1
+
u2
n2(n
n2(n
1
1−1)
2
2−1)
(µdiff − µ0)2
λ
=
σ2
σ2
1 + 2
n1
n2
n2−1
Γ n1+n2−2
σ2(n
2
2 − 1)
f (u)
=
2
1
·
Γ n1−1 Γ n2−1
σ2(n
2
2
2
1 − 1)
− n1+n2−2
n
2
2−3
n2 − 1
uσ2
u
1
2
1 +
n1 − 1
σ22
The density f (u) is obtained from the fact that
uσ21 ∼ F(n2 − 1,n1 − 1)
σ22
The solution for N is obtained by numerically inverting the power equation.
Two-sample Pooled t Test of Mean Ratio with Lognormal Data (TEST=RATIO)
The lognormal case is handled by re-expressing the analysis equivalently as a
normality-based test on the log-transformed data, using properties of the lognormal
distribution as discussed in Johnson and Kotz (1970, chapter 14). The approaches in
the “Two-sample t Test Assuming Equal Variances (TEST=DIFF)” section on page
3236 then apply.

3240
Chapter 56. The POWER Procedure (Experimental)
In contrast to the usual t test on normal data, the hypotheses with lognormal data are
defined in terms of geometric means rather than arithmetic means. The test assumes
equal coefficients of variation in the two groups.
The hypotheses for the two-sample t test with lognormal data are
γ2
H0 :
= γ0
γ1
 γ2 = γ
 γ
0,
2-sided

1
H
γ2
1
:
> γ
γ
0,
upper 1-sided
1
 γ2

< γ
γ
0,
lower 1-sided
1
Let µ1, µ2, and σ be the (arithmetic) means and common standard deviation of the
corresponding normal distributions of the log-transformed data. The hypotheses can
be rewritten as follows.
H0 : µ −
2
µ1 = log(γ0)
 µ − µ = log(γ0), 2-sided

2
1
H1 :
µ − µ > log(γ
2
1
0),
upper 1-sided
 µ − µ < log(γ
2
1
0),
lower 1-sided
where
µ1 = log γ1
µ2 = log γ2
The test assumes lognormally distributed data and requires N ≥ 3, n1 ≥ 1, and
n2 ≥ 1.
The power is
 P F (1, N − 2, δ2) ≥ F1−α(1, N − 2) , 2-sided

power =
P (t(N − 2, δ) ≥ t1−α(N − 2)) ,
upper 1-sided
 P (t(N − 2, δ) ≤ tα(N − 2)) ,
lower 1-sided
where
1
1
µ − µ − log(γ0)
δ
=
N
2
1
2 (w1w2) 2
σ
1
σ
=
log(CV2 + 1) 2
The solution for N is obtained by numerically inverting the power equation.

Mathematical Methods and Formulas
3241
Additive Equivalence Test for Mean Difference with Normal Data (TEST=EQUIV–ADD)
The hypotheses for the equivalence test are
H0 : µdiff < θL
or
µdiff > θU
H1 : θL ≤ µdiff ≤ θU
The analysis is the two one-sided tests (TOST) procedure of Schuirmann (1987).
The test assumes normally distributed data and requires N ≥ 3, n1 ≥ 1, and n2 ≥ 1.
Phillips (1990) derives an expression for the exact power assuming a balanced design;
the results are easily adapted to an unbalanced design:
µdiff − θU
power
=
QN−2
(−t1−α(N − 2)),
;
σN − 12 (w1w2)− 12
1
(N − 2) 2 (θU − θL)
0,

2σN − 12 (w1w2)− 12 (t1−α(N − 2))
µdiff − θL
QN−2
(t1−α(N − 2)),
;
σN − 12 (w1w2)− 12
1
(N − 2) 2 (θU − θL)
0,
2σN − 12 (w1w2)− 12 (t1−α(N − 2))
where Q·(·, ·; ·, ·) is Owen’s Q function, defined in the “Common Notation” section
on page 3223. The solution for N is obtained by numerically inverting the power
equation.
Multiplicative Equivalence Test for Mean Ratio with Lognormal Data
(TEST=EQUIV–MULT)
The lognormal case is handled by re-expressing the analysis equivalently as a
normality-based test on the log-transformed data, using properties of the lognor-
mal distribution as discussed in Johnson and Kotz (1970, chapter 14). The ap-
proaches in the “Additive Equivalence Test for Mean Difference with Normal Data
(TEST=EQUIV–ADD)” section on page 3234 then apply.
In contrast to the additive equivalence test on normal data, the hypotheses with log-
normal data are defined in terms of geometric means rather than arithmetic means.
The hypotheses for the equivalence test are
γT
γT
H0 :
≤ θL or
≥ θU
γR
γR
γT
H1 : θL <
< θU
γR
where
0 < θL < θU
The analysis is the two one-sided tests (TOST) procedure of Schuirmann (1987) on
the log-transformed data. The test assumes lognormally distributed data and requires

3242
Chapter 56. The POWER Procedure (Experimental)
N ≥ 3, n1 ≥ 1, and n2 ≥ 1. Diletti, Hauschke, and Steinijans (1991) derive an
expression for the exact power assuming a cross-over design; the results are easily
adapted to an unbalanced two-sample design:

log
γT
− log(θ
γ
U )
R
power
=
QN−2 (−t1−α(N − 2)),
;
σ N − 12 (w1w2)− 12
1
(N − 2) 2 (log(θU ) − log(θL))
0,

2σ N − 12 (w1w2)− 12 (t1−α(N − 2))

log
γT
− log(θ
γ
L)
R
QN−2 (t1−α(N − 2)),
;
σ N − 12 (w1w2)− 12
1
(N − 2) 2 (log(θU ) − log(θL))
0,
2σ N − 12 (w1w2)− 12 (t1−α(N − 2))
where
1
σ = log(CV2 + 1) 2
is the (assumed common) standard deviation of the normal distribution of the log-
transformed data, and Q·(·, ·; ·, ·) is Owen’s Q function, defined in the “Common
Notation” section on page 3223. The solution for N is obtained by numerically
inverting the power equation.
Confidence Interval for Mean Difference (CI=DIFF)
This analysis of precision applies to the standard t-based confidence interval:

x2 − ¯
x1) − t1− α (N − 2)
sp

,
2
N w1w2

x2 − ¯
x1) + t1− α (N − 2)
sp

,
2-sided
2
N w1w2

x2 − ¯
x1) − t1−α(N − 2)
sp

,
∞ ,
upper 1-sided
N w1w2
−∞,

x2 − ¯
x1) + t1−α(N − 2)
sp

,
lower 1-sided
N w1w2
where ¯
x1 and ¯
x2 are the sample means and sp is the pooled standard deviation. The
“half-width” is defined as the distance from the point estimate ¯
x2 − ¯
x1 to a finite
endpoint,
t1− α (N − 2)
sp

,
2-sided
half-width =
2
N w1w2
t1−α(N − 2)
sp

,
1-sided
N w1w2
A “valid” conference interval captures the true mean. The exact probability of obtain-
ing at most the target confidence interval half-width h, unconditional or conditional

Example 56.1. One-Way ANOVA
3243
on validity, is given by Beal (1989):

 P
χ2(N − 2) ≤ h2N(N−2)(w1w2)
,
2-sided

σ2(t2
(N −2))
Pr(half-width ≤ h)
=
1− α
2

 P
χ2(N − 2) ≤ h2N(N−2)(w1w2) ,
1-sided
σ2(t2
(N −2))
1−α

1

2 Q
(N − 2)), 0;
1−α
N −2
(t1− α
Pr(half-width ≤ h |


2
=
0, b
validity)
2) − QN −2(0, 0; 0, b2)] ,
2-sided


1

Q
1−α
N −2 ((t1−α(N − 2)), 0; 0, b2) ,
1-sided
where
1
h(N − 2) 2
b2 =
σ(t1− α (N − 2))N − 12 (w1w2)− 12
c
c
=
number of sides
and Q·(·, ·; ·, ·) is Owen’s Q function, defined in the “Common Notation” section on
page 3223. The solution for N is obtained by numerically inverting the probability
equation.
A “quality” confidence interval is both sufficiently narrow (half-width ≤ h) and valid:
Pr(quality)
=
Pr(half-width ≤ h and validity)
=
Pr(half-width ≤ h | validity)(1 − α)
Examples
Example 56.1. One-Way ANOVA
This example duplicates Example 33.1 on page 1811 of Chapter 33, “The
GLMPOWER Procedure,” using PROC POWER to perform the same sample size
analysis.
Hocking (1985, p. 109) describes a study of the effectiveness of electrolytes in reduc-
ing lactic acid build-up for long-distance runners. You are planning a similar study
in which you will allocate five different fluids to runners on a 10-mile course and
measure lactic acid build-up immediately after the race. The fluids consist of water
and two commercial electrolyte drinks, A and B, each prepared at two concentrations,
low (A1 and B1) and high (A2 and B2).
You conjecture that the standard deviation of lactic acid measurements given any
particular fluid is about 3.75, and that the expected lactic acid values will correspond
roughly to those in Table 56.17. You are least familiar with the B1 drink and hence
decide to consider reasonable upper and lower values for that mean.

3244
Chapter 56. The POWER Procedure (Experimental)
Table 56.17.
Mean Lactic Acid Build-up by Fluid
Water
A1
A2
B1
B2
35.6
33.7
30.2
29 or 28
25.9
You are interested in four different comparisons, shown in Table 56.18 with appro-
priate contrast coefficients.
Table 56.18.
Planned Comparisons
Contrast Coefficients
Comparison
Water
A1
A2
B1
B2
Water versus electrolytes
4
-1
-1
-1
-1
A versus B
0
1
1
-1
-1
A1 versus A2
0
1
-1
0
0
B1 versus B2
0
0
0
1
-1
For each of these contrasts you want to determine the sample size required to achieve
a power of 0.9 to detect an effect with magnitude according to Table 56.17. You are
not yet attempting to choose a single sample size for the study, but rather checking the
range of sample sizes needed by individual contrasts. You plan to test each contrast
at α = 0.025. You will provide twice as many runners with water as with any of
the electrolytes; in other words, you will use a sample size weighting scheme of
2:1:1:1:1.
Use the ONEWAYANOVA statement in the POWER procedure to compute the sam-
ple sizes. Specify TEST=CONTRAST to define the statistical analysis as contrasts of
means. Indicate total sample size as the result parameter by specifying the NTOTAL=
option with a missing value (.). Specify your conjectures for the means using the
GROUPMEANS= option with values from Table 56.17. With only one mean varying
(the B1 mean), the “crossed” notation is simpler, showing scenarios for each group
mean separated by a vertical bar (|). See the “Specifying Value Lists in Analysis
Statements” section on page 3218 for more details on crossed and matched notations
for grouped values. Specify the contrasts in Table 56.18 using the CONTRAST op-
tion, using the “matched” notation with each contrast enclosed in parentheses. Use
the STDDEV=, ALPHA=, and POWER= options to specify the error standard de-
viation, significance level, and power. Specify the weighting schemes using the
GROUPWEIGHTS= option and matched notation. The statements required to per-
form this analysis are as follows.
proc power;
onewayanova test=contrast
groupmeans = 35.6 | 33.7 | 30.2 | 29 28 | 25.9
stddev = 3.75
groupweights = (2 1 1 1 1)
alpha = 0.025
ntotal = .
power = 0.9
contrast = (4 -1 -1 -1 -1) (0
1
1 -1 -1)
(0
1 -1
0
0) (0
0
0
1 -1);
run;

Example 56.1. One-Way ANOVA
3245
Default values for the NULL= and SIDES= options specify a 2-sided t test of the
contrast equal to 0. See Output 56.1.1 for the output.
Output 56.1.1.
Sample Sizes for One-Way ANOVA Contrasts
The POWER Procedure
Single DF Contrast in One-Way ANOVA
Fixed Scenario Elements
Method
Exact
Alpha
0.025
Standard Deviation
3.75
Group Weights
2 1 1 1 1
Nominal Power
0.9
Number of Sides
2
Null Contrast Value
0
Actual
N
Index
-----Contrast-----
-------------Means-------------
Power
Total
1
4
-1
-1
-1
-1
35.6
33.7
30.2
29
25.9
0.946500
30
2
4
-1
-1
-1
-1
35.6
33.7
30.2
28
25.9
0.901344
24
3
0
1
1
-1
-1
35.6
33.7
30.2
29
25.9
0.928644
60
4
0
1
1
-1
-1
35.6
33.7
30.2
28
25.9
0.921942
48
5
0
1
-1
0
0
35.6
33.7
30.2
29
25.9
0.900801
174
6
0
1
-1
0
0
35.6
33.7
30.2
28
25.9
0.900801
174
7
0
0
0
1
-1
35.6
33.7
30.2
29
25.9
0.902098
222
8
0
0
0
1
-1
35.6
33.7
30.2
28
25.9
0.901643
480
The sample sizes in Output 56.1.1 range from 24 for the comparison of water versus
electrolytes to 480 for the comparison of B1 versus B2, both assuming the smaller
B1 mean. The sample size for this latter comparison is relatively large because the
small mean difference of 28 − 25.9 = 2.1 is hard to detect.
The Nominal Power of 0.9 in the Fixed Scenario Elements table in Output 56.1.1
represents the input target power, and the Actual Power column in the Computed N
Total table is the power at the sample size (N Total) adjusted to achieve the specified
sample weighting exactly. Note that all of the sample sizes are rounded up to multi-
ples of 6 to preserve integer group sizes (since the group weights add up to 6). You
can use the NFRACTIONAL option in the ONEWAYANOVA statement to compute
raw fractional sample sizes.
Suppose you want to plot the required sample size for the range of power values from
0.5 to 0.95. First, define the analysis by specifying the same statements as before,
but add the PLOTONLY option to the PROC POWER statement to disable the non-
graphical results. Next, specify the PLOT statement with X=POWER to request a
plot with power on the x-axis. (The result parameter, here sample size, is always
plotted on the other axis). Use the MIN= and MAX= options in the PLOT statement
to specify the power range.

3246
Chapter 56. The POWER Procedure (Experimental)
proc power plotonly;
onewayanova test=contrast
groupmeans = 35.6 | 33.7 | 30.2 | 29 28 | 25.9
stddev = 3.75
groupweights = (2 1 1 1 1)
alpha = 0.025
ntotal = .
power = 0.9
contrast = (4 -1 -1 -1 -1) (0
1
1 -1 -1)
(0
1 -1
0
0) (0
0
0
1 -1);
plot x=power min=.5 max=.95;
run;
See Output 56.1.2 for the resulting plot.
Output 56.1.2.
Plot of Sample Size versus Power for One-Way ANOVA Contrasts
In Output 56.1.2, the line style identifies the contrast, and the plotting symbol identi-
fies the group means scenario. The plot shows that the required sample size is highest
for the (0 0 0 1 -1) contrast, the test of B1 versus B2, for either cell means scenario.
Note that some of the plotted points in Output 56.1.2 are unevenly spaced. This is
because the plotted points are the rounded sample size results at their correspond-
ing actual power levels. The range specified with the MIN= and MAX= values
in the PLOT statement correspond to nominal power levels. In some cases, actual
power is substantially higher than nominal power. To obtain plots with evenly spaced

Example 56.1. One-Way ANOVA
3247
points (but with fractional sample sizes at the computed points), you can use the
NFRACTIONAL option in the analysis statement preceding the PLOT statement.
Finally, suppose you want to plot the power for the range of sample sizes you will
likely consider for the study (the range of 24 to 480 that achieves 0.9 power for
different comparisons). Use PROC POWER again with the PLOTONLY option in
the PROC POWER statement. In the ONEWAYANOVA statement, identify power
as the result (POWER=.), and specify NTOTAL=24. Use the GROUPMEANS=,
STDDEV=, GROUPWEIGHTS=, ALPHA=, and CONTRAST= options as before.
Specify the PLOT statement with X=N to request a plot with sample size on the x-
axis. Use the MIN= and MAX= options in the PLOT statement to specify the sample
size range.
proc power plotonly;
onewayanova test=contrast
groupmeans = 35.6 | 33.7 | 30.2 | 29 28 | 25.9
stddev = 3.75
groupweights = (2 1 1 1 1)
alpha = 0.025
ntotal = 24
power = .
contrast = (4 -1 -1 -1 -1) (0
1
1 -1 -1)
(0
1 -1
0
0) (0
0
0
1 -1);
plot x=n min=24 max=480;
run;
Note that the value specified with the NTOTAL= option (24) is not used. It is
overridden in the plot by the MIN= and MAX= options in the PLOT statement,
and the PLOTONLY option in the PROC POWER statement disables non-graphical
results.
But the NTOTAL= option (along with a value) is still needed in the
ONEWAYANOVA statement as a placeholder, to identify the desired parameteriza-
tion for sample size.
See Output 56.1.3 for the plot.

3248
Chapter 56. The POWER Procedure (Experimental)
Output 56.1.3.
Plot of Power versus Sample Size for One-Way ANOVA Contrasts
Although Output 56.1.2 and Output 56.1.3 surface essentially the same computations
for practical power ranges, they each provide a different quick visual assessment.
Output 56.1.2 reveals the range of required sample sizes for powers of interest, and
Output 56.1.3 reveals the range of powers across achieved for sample sizes of interest.
Example 56.2. The Sawtooth Power Function in Proportion
Analyses
For many common statistical analyses, the power curve is monotonically increasing:
the more samples you take, the more power you achieve. However, in statistical
analyses of discrete data, such as tests of proportions, the power curve is often non-
monotonic. A small increase in sample size can result in a decrease in power, some-
times a substantial decrease. The explanation is that the actual significance level (in
other words, the achieved type I error rate) for discrete tests strays below the target
level and varies with sample size. The power loss from a decrease in the type I error
rate may outweigh the power gain from an increase in sample size. The example
discussed in this section demonstrates this “sawtooth” phenomenon. For additional
discussion on the topic, refer to Chernick and Liu (2002).
Suppose you have a new scheduling system for an airline, and you want to determine
how many flights you must observe to have at least an 80% chance of establishing an
improvement in the proportion of late arrivals on a specific travel route. You will use
a 1-sided exact binomial proportion test with a null proportion of 30%, the frequency
of late arrivals under the previous scheduling system, and a nominal significance level

Example 56.2. The Sawtooth Power Function in Proportion Analyses
3249
of α = 0.05. Well-supported predictions estimate the new late arrival rate to be about
20%, and you will base your sample size determination on this assumption.
Use the ONESAMPLEFREQ statement in the POWER procedure to compute
the smallest sample size required to achieve a power of at least 0.8.
Specify
TEST=BINOMIAL to define the statistical analysis as a test of a binomial propor-
tion. Indicate sample size as the result parameter by specifying the NTOTAL= option
with a missing value (.). Use the SIDES=1 option to specify a 1-sided test. Use the
ALPHA=, NULLPROPORTION=, and POWER= options to specify the significance
level of 0.05, null value of 0.3, and target power of 0.8 Specify your conjecture of 0.3
for the true proportion using the PROPORTION= option. The statements required to
perform this analysis are as follows.
proc power;
onesamplefreq test=binomial
sides
= 1
alpha
= 0.05
nullproportion = 0.3
proportion
= 0.2
ntotal
= .
power
= 0.8;
run;
Output 56.2.1.
Sample Size for Exact Binomial Test
The POWER Procedure
Exact Test for Binomial Proportion
Fixed Scenario Elements
Distribution
Exact
Method
Exact
Number of Sides
1
Null Proportion
0.3
Alpha
0.05
Binomial Proportion
0.2
Nominal Power
0.8
Computed N Total
Lower
Upper
Crit
Crit
Actual
N
Index
Val
Val
Alpha
Power
Total
1
27
.
0.0478
0.803626
119
The results, shown in Output 56.2.1, indicate that you need to observe N =119 flights
to have an 80% chance of rejecting the hypothesis of a late arrival proportion of 30%
or higher, if the true proportion is 20%. You may be tempted to round up the planned
sample size to 120, but a plot of power versus sample size for a window around
N =119 reveals why caution is needed.

3250
Chapter 56. The POWER Procedure (Experimental)
To produce a plot of power for sample sizes between 110 and 140, use PROC POWER
as before, but specify power as the result parameter instead of sample size. Use
the PLOTONLY option in the PROC POWER statement to disable non-graphical
output. Specify the PLOT statement with X=N to request a plot with sample size
on the x-axis. Use the MIN= and MAX= options in the PLOT statement to specify
the sample size range. To highlight the sample size result in Output 56.2.1, use the
YOPTS=(REF=) and XOPTS=(REF=) options to add reference lines. Set STEP=1 to
produce a point at each sample size. You may specify any valid sample size value with
the NTOTAL= option in the ONESAMPLEFREQ statement; it will be overridden by
the MIN= and MAX= options in the PLOT statement and remain unused because of
the PLOTONLY option in the PROC POWER statement.
The following statements produce the plot.
proc power plotonly;
ods output plotcontent=PlotData;
onesamplefreq test=binomial
sides
= 1
alpha
= 0.05
nullproportion = 0.3
proportion
= 0.2
ntotal
= 119
power
= .;
plot x=n min=112 max=137 step=1
yopts=(ref=.8) xopts=(ref=119);
run;
The ODS OUTPUT statement saves the plot content to a data set to be considered
later. Output 56.2.2 shows the plot.

Example 56.2. The Sawtooth Power Function in Proportion Analyses
3251
Output 56.2.2.
Plot of Power versus Sample Size for Exact Binomial Test
Note the sawtooth pattern in Output 56.2.2. The power decreases to 0.79 with N =120,
and further to 0.76 with N =122 before rising again to 0.81 with N =123. Not until
N =130 does the power stay above the 0.8 target. Thus, a more conservative sample
size recommendation of 130 might be appropriate, depending on the precise goals of
the sample size determination.
In addition to considering alternative sample sizes, you may also want to assess the
sensitivity of the power to inaccuracies in assumptions about the true proportion.
The following statements produce a plot including true proportion values of 0.18 and
0.22. They are identical to the previous statements except for the additional true pro-
portion values specified with the PROPORTION= option in the ONESAMPLEFREQ
statement, and the absence of the ODS OUTPUT statement.
proc power plotonly;
onesamplefreq test=binomial
sides
= 1
alpha
= 0.05
nullproportion = 0.3
proportion
= 0.18 0.2 0.22
ntotal
= 119
power
= .;
plot x=n min=112 max=137 step=1
yopts=(ref=.8) xopts=(ref=119);
run;

3252
Chapter 56. The POWER Procedure (Experimental)
Output 56.2.3 shows the plot.
Output 56.2.3.
Plot for Assessing Sensitivity to True Proportion Value
The plot reveals a dramatic sensitivity to the true proportion value. For N =119, the
power is about 0.92 if the true proportion is 0.22, and as low as 0.62 if the proportion
is 0.18. Note also that the power jumps occur at the same sample sizes in all three
curves; the curves are only shifted and stretched vertically. This is because spikes
and valleys in power curves are invariant to the true proportion value; they are due to
changes in the critical value of the test. A closer look at some ancillary output from
the analysis sheds light on this property of the sawtooth pattern.
The PlotData data set, created with the ODS OUTPUT statement and corresponding
to the plot in Output 56.2.2, contains parameter values for each point in the plot. The
parameters including underlying characteristics of the putative test. The following
statements print the critical value and actual significance level along with sample size
and power.
proc print data=PlotData;
var NTotal LowerCritVal ActualAlpha Power;
run;
Output 56.2.4 shows the plot data.

Example 56.2. The Sawtooth Power Function in Proportion Analyses
3253
Output 56.2.4.
Numerical Content of Plot
Lower
Actual
Obs
NTotal
CritVal
Alpha
Power
1
112
25
0.0446
0.771337
2
113
25
0.0395
0.756319
3
114
25
0.0349
0.740892
4
115
26
0.0490
0.795006
5
116
26
0.0435
0.781022
6
117
26
0.0386
0.766602
7
118
26
0.0341
0.751771
8
119
27
0.0478
0.803626
9
120
27
0.0425
0.790211
10
121
27
0.0377
0.776364
11
122
27
0.0334
0.762104
12
123
28
0.0465
0.811810
13
124
28
0.0414
0.798939
14
125
28
0.0368
0.785638
15
126
28
0.0327
0.771927
16
127
29
0.0453
0.819587
17
128
29
0.0404
0.807234
18
129
29
0.0359
0.794457
19
130
30
0.0493
0.838410
20
131
30
0.0441
0.826982
21
132
30
0.0394
0.815124
22
133
30
0.0351
0.802848
23
134
31
0.0480
0.844983
24
135
31
0.0429
0.834020
25
136
31
0.0384
0.822635
26
137
31
0.0342
0.810838
Note that whenever the critical value changes, the actual α jumps up to a value close
to the nominal α=0.05, and the power also jumps up. Then while the critical value
stays constant, the actual α and power slowly decrease. The critical value is inde-
pendent of the true proportion value. So, you can achieve a locally maximal power
by choosing a sample size corresponding to a spike on the sawtooth curve, and this
choice is locally optimal regardless of the unknown value of the true proportion.
Locally optimal sample sizes in this case include 115, 119, 123, 127, 130, and 134.
As a point of interest, the power does not always jump sharply and decrease gradually.
The shape of the sawtooth depends on the direction of the test and the location of the
null proportion relative to 0.5. For example, if the direction of the hypothesis in
this example is reversed (by swapping true and null proportion values) so that the
rejection region is in the upper tail, then the power curve exhibits sharp decreases and
gradual increases. The following statements are similar to those producing the plot
in Output 56.2.2 but with values of the PROPORTION= and NULLPROPORTION=
options swapped.
proc power plotonly;
onesamplefreq test=binomial
sides
= 1
alpha
= 0.05
nullproportion = 0.2

3254
Chapter 56. The POWER Procedure (Experimental)
proportion
= 0.3
ntotal
= 119
power
= .;
plot x=n min=110 max=140 step=1;
run;
The resulting plot is shown in Output 56.2.5.
Output 56.2.5.
Plot of Power versus Sample Size for Another 1-Sided Test
Finally, even more irregular power curve shapes can occur for 2-sided tests, since
changes in lower and upper critical values affect the power in different ways. The
following statements produce a plot of power versus sample size for the scenario of
a 2-sided test with high alpha and a true proportion close to the null value.
proc power plotonly;
onesamplefreq test=binomial
sides
= 2
alpha
= 0.2
nullproportion = 0.1
proportion
= 0.09
ntotal
= 10
power
= .;
plot x=n min=2 max=100 step=1;
run;

Example 56.3. Simple AB/BA Cross-Over Designs
3255
The resulting plot is shown in Output 56.2.6.
Output 56.2.6.
Plot of Power versus Sample Size for a 2-Sided Test
Due to the irregular shapes of power curves for proportion tests, the question “Which
sample size should I use?” is often insufficient. A sample size solution produced
directly in PROC POWER reveals the smallest possible sample size to achieve your
target power. But as the example in this section has demonstrated, it is helpful to
consult graphs for answers to questions such as the following.
• Which sample size will guarantee that all higher sample sizes also achieve my
target power?
• Given a candidate sample size, can I increase it slightly to achieve locally max-
imal power, or perhaps even decrease it and get higher power?
Example 56.3. Simple AB/BA Cross-Over Designs
Cross-over trials are experiments, especially common in clinical trials for medical
studies, in which each subject is given a sequence of different treatments. The reduc-
tion in variability from taking multiple measurements on a subject allows for more
precise treatment comparisons. The simplest such design is the AB/BA cross-over,
in which each subject receives each of two treatments in a randomized order.
Under certain simplifying assumptions, you can test the treatment difference in an
AB/BA cross-over trial using either a paired or two-sample t test (or equivalence test,

3256
Chapter 56. The POWER Procedure (Experimental)
depending on the hypothesis). This example will demonstrate when and how you can
use the PAIREDMEANS statement in PROC POWER to perform power analyses for
AB/BA cross-over designs.
Senn (1993, Chapter 3) discusses a study comparing the effects of two bronchodilator
medications in treatment of asthma, using an AB/BA cross-over design. Suppose you
want to plan a similar study comparing two new medications, “Drug A” and “Drug
B.” Half of the patients would be assigned to sequence AB, getting a dose of Drug A
in the first treatment period, a wash-out period of one week, and then a dose of Drug
B in the second treatment period. The other half would be assigned to sequence BA,
following the same schedule but with the drugs reversed. In each treatment period
you would administer the drugs in the morning and then measure peak expiratory
flow (PEF) at the end of the day, with higher PEF representing better lung function.
You conjecture that the mean and standard deviation of PEF are about µA = 310 and
σA = 40 for Drug A and µB = 330 and σB = 55 for Drug B, and that each pair of
measurements on the same subject will have a correlation of about 0.3. You want
to compute the power of both 1-sided and 2-sided tests of mean difference, with a
significance level of α = 0.01, for a sample size of 100 patients and also plot the
power for a range of 50 to 200 patients. Note that the allocation ratio of patients to
the two sequences is irrelevant in this analysis.
The choice of statistical test depends on which assumptions are reasonable. One
possibility is a t test. A paired or two-sample t test is valid when there is no carry-
over effect and no interactions between patients, treatments, and periods. See Senn
(1993, Chapter 3) for more details. The choice between a paired or a two-sample test
depends on what you assume about the period effect. If you assume no period effect,
then a paired t test is the appropriate analysis for the design, with the first member of
each pair being the Drug A measurement (regardless of which sequence the patient
belongs to). Otherwise the two-sample t test approach is called for, since this analysis
adjusts for the period effect using an extra degree of freedom.
Suppose you assume no period effect. Then you can use the PAIREDMEANS state-
ment in PROC POWER with the TEST=DIFF option to perform a sample size anal-
ysis for the paired t test. Indicate power as the result parameter by specifying the
POWER= option with a missing value (.). Specify the conjectured means and stan-
dard deviations for each drug using the PAIREDMEANS= and PAIREDSTDDEVS=
options and the correlation using the CORR= option. Specify both 1- and 2-sided
tests using the SIDES= option, the significance level using the ALPHA= option, and
the sample size (in terms of number of pairs) using the NPAIRS= option. Generate
a plot of power versus sample size by specifying the PLOT statement with X=N to
request a plot with sample size on the x-axis. (The result parameter, here power, is
always plotted on the other axis). Use the MIN= and MAX= options in the PLOT
statement to specify the sample size range (as numbers of pairs).
The following statements perform the sample size analysis.
proc power;
pairedmeans test=diff
pairedmeans
= (330 310)

Example 56.3. Simple AB/BA Cross-Over Designs
3257
pairedstddevs = (40 55)
corr
= 0.3
sides
= 1 2
alpha
= 0.01
npairs
= 100
power
= .;
plot x=n min=50 max=200;
run;
Default values for the NULLDIFF= and DIST= options specify a null mean differ-
ence of zero and the assumption of normally distributed data. The output is shown in
Output 56.3.1 and Output 56.3.2.
Output 56.3.1.
Power for Paired-t Analysis of Cross-Over Design
The POWER Procedure
Paired t Test for Mean Difference
Fixed Scenario Elements
Distribution
Normal
Method
Exact
Alpha
0.01
Mean 1
330
Mean 2
310
Standard Deviation 1
40
Standard Deviation 2
55
Correlation
0.3
Number of Pairs
100
Null Difference
0
Computed Power
Index
Sides
Power
1
1
0.865380
2
2
0.800835

3258
Chapter 56. The POWER Procedure (Experimental)
Output 56.3.2.
Plot of Power versus Sample Size for Paired-t Analysis of
Cross-Over Design
The Computed Power table in Output 56.3.1 shows that the power with 100 patients
is about 0.8 for the 2-sided test and 0.87 for the 1-sided test with the alternative of
larger Drug B mean. In Output 56.3.2, the line style identifies the number of sides
of the test. The plotting symbols identify locations of actual computed powers; the
curves are linear interpolations of these points. The plot demonstrates how much
higher the power is for the 1-sided test than the 2-sided test for the range of sample
sizes.
Finally, suppose that instead of detecting a difference between Drug A and Drug B,
you want to establish that they are similar, in particular, that the absolute mean PEF
difference is at most 35. You might consider this goal if, for example, one of the drugs
has fewer side effects and if a difference of 35 is clinically small. Instead of a standard
t test, you would conduct an equivalence test of the treatment mean difference for the
two drugs. You would test the hypothesis that the true difference is less than -35 or
more than 35 against the alternative that the mean difference is between -35 and 35,
using an additive model and a two one-sided t (“TOST”) analysis.
Assuming no period effect, you can use the PAIREDMEANS statement with the
TEST=EQUIV–ADD option to perform a sample size analysis for the paired equiv-
alence test. Indicate power as the result parameter by specifying the POWER= op-
tion with a missing value (.). Use the LOWER= and UPPER= options to specify the
equivalence bounds of -35 and 35. Use the PAIREDMEANS=, PAIREDSTDDEVS=,
CORR=, and ALPHA= options in the same way as in the t test at the beginning of
this example to specify the remaining parameters.

Example 56.4. Non-Inferiority Test with Lognormal Data
3259
The following statements perform the sample size analysis.
proc power;
pairedmeans test=equiv_add
lower
= -35
upper
= 35
pairedmeans
= (330 310)
pairedstddevs = (40 55)
corr
= 0.3
alpha
= 0.01
npairs
= 100
power
= .;
run;
The default option DIST=NORMAL specifies an assumption of normally distributed
data. The output is shown in Output 56.3.3.
Output 56.3.3.
Power for Paired Equivalence Test for Cross-Over Design
The POWER Procedure
Additive Equivalence Test for Paired Means
Fixed Scenario Elements
Distribution
Normal
Method
Exact
Lower Equivalence Bound
-35
Upper Equivalence Bound
35
Alpha
0.01
Reference Mean
330
Treatment Mean
310
Standard Deviation 1
40
Standard Deviation 2
55
Correlation
0.3
Number of Pairs
100
Computed Power
Index
Power
1
0.597601
The power for the paired equivalence test with 100 patients is about 0.6.
Example 56.4. Non-Inferiority Test with Lognormal Data
The typical goal in non-inferiority testing is to conclude that a new treatment or pro-
cess or product is not appreciably worse than some standard. This is accomplished by
convincingly rejecting a 1-sided null hypothesis that the new treatment is apprecia-
bly worse than the standard. When designing such studies, investigators must define
precisely what constitutes “appreciably worse.”

3260
Chapter 56. The POWER Procedure (Experimental)
You can use the POWER procedure for sample size analyses for a variety of non-
inferiority tests: you merely need to specify custom, 1-sided null hypotheses for com-
mon tests. This example illustrates the strategy (often called Blackwelder’s scheme,
Blackwelder 1982) by comparing the means of two independent lognormal samples,
a common situation. But the logic applies just as well to one-sample, two-sample, and
paired-sample problems involving normally distributed measures and proportions.
Suppose you are designing a study hoping to show that a new (less expensive) man-
ufacturing process does not raise a given pollutant level to any appreciable degree
compared to the current process. Quantifying “appreciable degree” as “10%,” you
seek to show that the mean pollutant level from the new process is less than 110%
of that from the current process. In standard hypothesis testing notation, you seek to
reject
µnew
H0:
≥ 1.10
µcurrent
in favor of
µnew
HA:
< 1.10
µcurrent
This is described graphically in Figure 56.7. Mean ratios below 100% are better
levels for the new process; a ratio of 100% indicates absolute equivalency; ratios of
100–110% are “tolerably” worse; and ratios exceeding 110% are appreciably worse.
not appreciably worse (HA)
appreciably worse (H0)
(better)
(tolerably worse)
100%
110%
µnew/µcurrent
Figure 56.7.
Hypotheses for the Pollutant Study
An appropriate test for this is to use the common two-group t test on log-transformed
data (any log base). The hypotheses become
H0 : log (µnew) − log (µcurrent) ≥ log(1.10)
HA : log (µnew) − log (µcurrent) < log(1.10)
Measurements of the pollutant level will be taken using laboratory models of the two
processes and will be treated as independent lognormal observations with a coeffi-
cient of variation (σ/µ) between 0.5 and 0.6 for both processes. You will end up with
300 measurements for the current process and 180 for the new one. It is important to
avoid a Type I error here, so you set this rate to 0.01. Your theoretical work suggests

Example 56.4. Non-Inferiority Test with Lognormal Data
3261
that the new process will actually reduce the pollutant by about 10% (to 90% of cur-
rent), but you need to compute and graph the power of the study if the new levels are
actually between 70% and 120% of current levels.
Implement the sample size analysis using the TWOSAMPLEMEANS statement in
PROC POWER with the TEST=RATIO option, Indicate power as the result param-
eter by specifying the POWER= option with a missing value (.). Specify a series
of scenarios for the mean ratio between 0.7 and 1.2 using the MEANRATIO= op-
tion. Use the NULLRATIO= option to specify the null mean ratio of 1.10. Specify
SIDES=L to indicate a 1-sided test with the alternative hypothesis stating that the
mean ratio is lower than the null value. Specify the significance level, scenarios for
the coefficient of variation, and the group sample sizes using the ALPHA=, CV=,
and GROUPNS= options. Generate a plot of power versus mean ratio by specifying
the PLOT statement with X=EFFECT to request a plot with mean ratio on the x-
axis. (The result parameter, here power, is always plotted on the other axis). Use the
STEP= option in the PLOT statement to specify an interval of 0.05 between computed
points in the plot.
The following statements perform the desired analysis.
proc power;
twosamplemeans test=ratio
meanratio = 0.7 to 1.2 by 0.1
nullratio = 1.10
sides
= L
alpha
= 0.01
cv
= 0.5 0.6
groupns
= (300 180)
power
= .;
plot x=effect step=0.05;
run;
Note the use of SIDES=L, which forces computations for cases that need a rejection
region that is opposite (here, the lower tail) to the one providing the most one-tailed
power. Such cases will show power that is less than the prescribed Type I error rate.
The default option DIST=LOGNORMAL specifies the assumption of lognormally
distributed data. The default MIN= and MAX= options in the plot statement spec-
ify an x-axis range identical to the effect size range in the TWOSAMPLEMEANS
statement (mean ratios between 0.7 and 1.2).
See the output in Output 56.4.1 and Output 56.4.2.

3262
Chapter 56. The POWER Procedure (Experimental)
Output 56.4.1.
Power for Non-Inferiority Test of Ratio
The POWER Procedure
Two-sample t Test for Ratio of Means
Fixed Scenario Elements
Distribution
Lognormal
Method
Exact
Number of Sides
L
Null Ratio
1.1
Alpha
0.01
Group 1 Sample Size
300
Group 2 Sample Size
180
Computed Power
Mean
Index
Ratio
CV
Power
1
0.7
0.5
>.999999
2
0.7
0.6
>.999999
3
0.8
0.5
>.999999
4
0.8
0.6
0.999911
5
0.9
0.5
0.984869
6
0.9
0.6
0.933343
7
1.0
0.5
0.423731
8
1.0
0.6
0.305574
9
1.1
0.5
0.010000
10
1.1
0.6
0.010000
11
1.2
0.5
0.000010
12
1.2
0.6
0.000034

Example 56.5. Customizing Plots
3263
Output 56.4.2.
Plot of Power versus Mean Ratio for Non-Inferiority Test
The Computed Power table in Output 56.4.1 shows that power exceeds 0.90 if the
true mean ratio is 90% or less, as surmised. But it is not acceptable (0.31–0.42) if
the processes happen to be truly equivalent. Note that the power is identical to the
alpha level (0.01) if the true mean ratio is 1.10 and below 0.01 if the true mean ratio is
appreciably worse (> 110%). In Output 56.4.2, the line style identifies the coefficient
of variation. The plotting symbols identify locations of actual computed powers; the
curves are linear interpolations of these points.
Example 56.5. Customizing Plots
The example in this section demonstrates various ways you can modify and enhance
plots:
• assigning analysis parameters to axes
• fine-tuning a sample size axis
• adding reference lines
• linking plot features to analysis parameters
• choosing key (legend) styles
• modifying symbol locations
The example plots are all based on a sample size analysis for a two-sample t test of
group mean difference. You start by computing the sample size required to achieve a

3264
Chapter 56. The POWER Procedure (Experimental)
power of 0.9 using a 2-sided test with α = 0.05, assuming the first mean is 12, the
second mean is either 15 or 18, and the standard deviation is either 7 or 9.
Use the TWOSAMPLEMEANS statement with the TEST=DIFF option to compute
the required sample sizes. Indicate total sample size as the result parameter by sup-
plying a missing value (.) with the NTOTAL= option. Use the GROUPMEANS=,
STDDEV=, and POWER= option to specify values of the other parameters. The
following statements perform the sample size computations.
proc power;
twosamplemeans test=diff
groupmeans
= 12 | 15 18
stddev
= 7 9
power
= 0.9
ntotal
= .;
run;
Default values for the NULLDIFF=, SIDES=, GROUPWEIGHTS=, and DIST= op-
tions specify a null mean difference of zero, 2-sided test, balanced design, and as-
sumption of normally distributed data.
Output 56.5.1 shows that the required sample size ranges from 60 to 382 depending
on the unknown standard deviation and second mean.
Output 56.5.1.
Computed Sample Sizes
The POWER Procedure
Two-sample t Test for Difference of Means
Fixed Scenario Elements
Distribution
Normal
Method
Exact
Group 1 Mean
12
Nominal Power
0.9
Number of Sides
2
Null Difference
0
Alpha
0.05
Group 1 Weight
1
Group 2 Weight
1
Computed N Total
Std
Actual
N
Index
Mean2
Dev
Power
Total
1
15
7
0.901523
232
2
15
9
0.901347
382
3
18
7
0.903932
60
4
18
9
0.904339
98

Example 56.5. Customizing Plots
3265
Assigning Analysis Parameters to Axes
Use the PLOT statement to produce plots for all power and sample size analyses
in PROC POWER. For the sample size analysis described at the beginning of this
example, suppose you want to plot the required sample size on the y-axis against a
range of powers between 0.5 and 0.95 on the x-axis. The X= and Y= options specify
which parameter to plot against the result, and which axis to assign to this parameter.
You can use either the X= or Y= option, but not both. Use the X=POWER option
in PLOT statement to request a plot with power on the x-axis. The result parameter,
here total sample size, is always plotted on the other axis. Use the MIN= and MAX=
options to specify the range of the axis indicated with either the X= or the Y= option.
Here, specify MIN=0.5 and MAX=0.95 to specify the power range. The following
statements produce the plot.
proc power plotonly;
twosamplemeans test=diff
groupmeans
= 12 | 15 18
stddev
= 7 9
power
= 0.9
ntotal
= .;
plot x=power min=0.5 max=0.95;
run;
Note that the value (0.9) of the POWER= option in the TWOSAMPLEMEANS state-
ment is only a placeholder when the PLOTONLY option is used and both the MIN=
and MAX= options are used, because the values of the MIN= and MAX= options
override the value of 0.9. But The POWER= option itself is still required in the
TWOSAMPLEMEANS statement, to provide a complete specification of the sample
size analysis.
The resulting plot is shown in Output 56.5.2.

3266
Chapter 56. The POWER Procedure (Experimental)
Output 56.5.2.
Plot of Sample Size versus Power
The line style identifies the group means scenario, and the plotting symbol identifies
the standard deviation scenario. The locations of plotting symbols indicate computed
sample sizes; the curves are linear interpolations of these points. By default, each
curve consists of approximately 20 computed points (sometimes slightly more or
less, depending on the analysis).
If you would rather plot power on the y-axis versus sample size on the x-axis, you
have two general strategies to choose from. One strategy is to use the Y= option
instead of the X= option in the PLOT statement:
plot y=power min=0.5 max=0.95;

Example 56.5. Customizing Plots
3267
Output 56.5.3.
Plot of Power versus Sample Size using First Strategy
Note that the resulting plot (Output 56.5.3) is essentially a mirror image of Output
56.5.2. The axis ranges are set such that each curve in Output 56.5.3 contains similar
values of Y instead of X. Each plotted point represents the computed value of the
x-axis at the input value of the y-axis.
A second strategy for plotting power versus sample size (when originally solving for
sample size) is to invert the analysis and base the plot on computed power for a given
range of sample sizes. This strategy works well for monotonic power curves (as is
the case for the t test and most other continuous analyses). It is advantageous in the
sense of preserving the traditional role of the y-axis as the computed parameter. A
common way to implement this strategy is in two steps: first determine the range of
sample sizes sufficient to cover at the desired power range for all curves (where each
“curve” represents a scenario for standard deviation and second group mean), and
then use this range for the x-axis of a plot.
To determine the required sample sizes for target powers of 0.5 and 0.95, change the
values in the POWER= option to reflect this range:
proc power;
twosamplemeans test=diff
groupmeans
= 12 | 15 18
stddev
= 7 9
power
= 0.5 0.95

3268
Chapter 56. The POWER Procedure (Experimental)
ntotal
= .;
run;
Output 56.5.4 reveals that a sample size range of 24 to 470 is approximately suffi-
cient to cover the desired power range of 0.5 to 0.95 for all curves (“approximately”
because the actual power at the rounded sample size of 24 is slightly higher than the
nominal power of 0.5).
Output 56.5.4.
Computed Sample Sizes
The POWER Procedure
Two-sample t Test for Difference of Means
Fixed Scenario Elements
Distribution
Normal
Method
Exact
Group 1 Mean
12
Number of Sides
2
Null Difference
0
Alpha
0.05
Group 1 Weight
1
Group 2 Weight
1
Computed N Total
Std
Nominal
Actual
N
Index
Mean2
Dev
Power
Power
Total
1
15
7
0.50
0.501837
86
2
15
7
0.95
0.950698
286
3
15
9
0.50
0.505015
142
4
15
9
0.95
0.950104
470
5
18
7
0.50
0.519008
24
6
18
7
0.95
0.953242
74
7
18
9
0.50
0.515944
38
8
18
9
0.95
0.951708
120
To plot power on the y-axis for sample sizes between 20 and 500, use the X=N option
in the PLOT statement with MIN=20 and MAX=500:
proc power plotonly;
twosamplemeans test=diff
groupmeans
= 12 | 15 18
stddev
= 7 9
power
= .
ntotal
= 200;
plot x=n min=20 max=500;
run;
Each curve in the resulting plot in Output 56.5.5 covers at least a power range of 0.5
to 0.95.

Example 56.5. Customizing Plots
3269
Output 56.5.5.
Plot of Power versus Sample Size Using Second Strategy
Finally, suppose you want to produce a plot of sample size versus effect size (the
“effect size” being the mean difference in this case) for a power of 0.9. You need
to re-parameterize the analysis by using the MEANDIFF= option instead of the
GROUPMEANS= option to produce a plot, since each plot axis must be represented
by a scalar parameter. Use the X=EFFECT option in the PLOT statement to assign
the mean difference to the x-axis. The following statements produce a plot of required
sample size to detect mean differences between 3 and 6.
proc power plotonly;
twosamplemeans test=diff
meandiff
= 3 6
stddev
= 7 9
power
= 0.9
ntotal
= .;
plot x=effect min=3 max=6;
run;
The resulting plot Output 56.5.6 shows how the required sample size decreases with
increasing mean difference.

3270
Chapter 56. The POWER Procedure (Experimental)
Output 56.5.6.
Plot of Sample Size versus Mean Difference
Fine-Tuning a Sample Size Axis
Consider the following plot request for a sample size analysis similar to the one in
Output 56.5.1 but with only a single scenario, and with unbalanced sample size allo-
cation of 2:1.
proc power plotonly;
ods output plotcontent=PlotData;
twosamplemeans test=diff
groupmeans
= 12 | 18
stddev
= 7
groupweights = 2 | 1
power
= .
ntotal
= 20;
plot x=n min=20 max=50 npoints=20;
run;
The MIN=, MAX=, and NPOINTS= options in the PLOT statement request a plot
with 20 points between 20 and 50. But the resulting plot (Output 56.5.7) appears to
have only 11 points, and they range from 18 to 48.

Example 56.5. Customizing Plots
3271
Output 56.5.7.
Plot with Overlapping Points
The underlying reason is the rounding of sample sizes.
If you do not use the
NFRACTIONAL option in the analysis statement (here, the TWOSAMPLEMEANS
statement), then the set of sample size points determined by the MIN=, MAX=,
NPOINTS=, and STEP= options in the PLOT statement may be rounded to satisfy
the allocation weights. In this case, they are rounded down to nearest multiples of 3
(the sum of the weights, 2 and 1), and many of the points overlap. To see the overlap,
you can print the NominalNTotal (unadjusted) and NTotal (rounded) variables in the
PlotContent ODS object (here saved to a data set called PlotData):
proc print data=PlotData;
var NominalNTotal NTotal;
run;
The output is shown in Output 56.5.8.

3272
Chapter 56. The POWER Procedure (Experimental)
Output 56.5.8.
Sample Sizes
Nominal
Obs
NTotal
NTotal
1
18.0
18
2
19.6
18
3
21.2
21
4
22.7
21
5
24.3
24
6
25.9
24
7
27.5
27
8
29.1
27
9
30.6
30
10
32.2
30
11
33.8
33
12
35.4
33
13
36.9
36
14
38.5
36
15
40.1
39
16
41.7
39
17
43.3
42
18
44.8
42
19
46.4
45
20
48.0
48
Besides overlapping of sample size points, another peculiarity that might occur with-
out the NFRACTIONAL option is unequal spacing, for example, in the plot in Output
56.5.9, created with the following statements.
proc power plotonly;
twosamplemeans test=diff
groupmeans
= 12 | 18
stddev
= 7
groupweights = 2 | 1
power
= .
ntotal
= 20;
plot x=n min=20 max=50 npoints=5;
run;

Example 56.5. Customizing Plots
3273
Output 56.5.9.
Plot with Unequally Spaced Points
If you want to guarantee evenly spaced, non-overlapping sample size points in your
plots, you can either (1) use the NFRACTIONAL option in the analysis statement
preceding the PLOT statement, or (2) use the STEP= option and provide values for
the MIN=, MAX=, and STEP= options in the PLOT statement that are multiples of
the sum of the allocation weights. Note that this sum is simply 1 for one-sample
and paired designs and 2 for balanced two-sample designs. So, any integer step
value works well for one-sample and paired designs, and any even step value works
well for balanced two-sample designs. Both of these strategies will avoid rounding
adjustments.
The following statements implement the first strategy to create the plot in Output
56.5.10, using the NFRACTIONAL option in the TWOSAMPLEMEANS statement.
proc power plotonly;
twosamplemeans test=diff
nfractional
groupmeans
= 12 | 18
stddev
= 7
groupweights = 2 | 1
power
= .
ntotal
= 20;
plot x=n min=20 max=50 npoints=20;
run;

3274
Chapter 56. The POWER Procedure (Experimental)
Output 56.5.10.
Plot with Fractional Sample Sizes
To implement the second strategy, use multiples of 3 for the STEP=, MIN=, and
MAX= options in the PLOT statement (because the sum of the allocation weights is
2 + 1 = 3). The following statements use STEP=3, MIN=18, and MAX=48 to create
a plot that looks identical to Output 56.5.7 but suffers no overlapping of points.
proc power plotonly;
twosamplemeans test=diff
groupmeans
= 12 | 18
stddev
= 7
groupweights = 2 | 1
power
= .
ntotal
= 20;
plot x=n min=18 max=48 step=3;
run;
Adding Reference Lines
Suppose you want to add reference lines to highlight power=0.8 and power=0.9 on
the plot in Output 56.5.5. You can add simple reference lines using the YOPTS=
option and REF= sub-option in the PLOT statement to produce Output 56.5.11, using
the following statements.

Example 56.5. Customizing Plots
3275
proc power plotonly;
twosamplemeans test=diff
groupmeans
= 12 | 15 18
stddev
= 7 9
power
= .
ntotal
= 100;
plot x=n min=20 max=500
yopts=(ref=0.8 0.9);
run;
Output 56.5.11.
Plot with Simple Reference Lines on Y-Axis
Or, you can specify CROSSREF=YES to add reference lines that intersect each curve
and cross over to the other axis:
plot x=n min=20 max=500
yopts=(ref=0.8 0.9 crossref=yes);
The resulting plot is shown in Output 56.5.12.

3276
Chapter 56. The POWER Procedure (Experimental)
Output 56.5.12.
Plot with CROSSREF=YES Style Reference Lines from Y-Axis
You can also add reference lines for the x-axis by using the XOPTS= option instead
of the YOPTS= option. For example, the following plot statement produces Output
56.5.13, which has crossing reference lines highlighting the sample size of 100.
plot x=n min=20 max=500
xopts=(ref=100 crossref=yes);

Example 56.5. Customizing Plots
3277
Output 56.5.13.
Plot with CROSSREF=YES Style Reference Lines from X-Axis
Linking Plot Features to Analysis Parameters
You can use the VARY option in the PLOT statement to specify which of the follow-
ing features you wish to associate with analysis parameters.
• line style
• plotting symbol
• color
• panel
You can specify mappings between each of these features and one or more analysis
parameters, or you can simply choose a subset of these features to use (and rely on
default settings to associate these features with multiple-valued analysis parameters).
Suppose you supplement the sample size analysis in Output 56.5.5 to include three
values of alpha, using the following statements.
proc power plotonly;
twosamplemeans test=diff
groupmeans
= 12 | 15 18
stddev
= 7 9
alpha
= 0.01 0.025 0.1
power
= .

3278
Chapter 56. The POWER Procedure (Experimental)
ntotal
= 100;
plot x=n min=20 max=500;
run;
The defaults for the VARY option in the PLOT statement specify line style varying
by the ALPHA= parameter, plotting symbol varying by the GROUPMEANS= pa-
rameter, panel varying by the STDDEV= parameter, and color remaining constant.
The resulting plot, consisting of two panels, is shown in Output 56.5.14 and Output
56.5.15.
Output 56.5.14.
Plot with Default VARY Settings: Panel 1 of 2

Example 56.5. Customizing Plots
3279
Output 56.5.15.
Plot with Default VARY Settings: Panel 2 of 2
Suppose you want to produce a plot with only one panel that varies color in addition
to line style and plotting symbol. Include the LINESTYLE, SYMBOL, and COLOR
keywords in the VARY option in the PLOT statement, as follows, to produce the plot
in Output 56.5.16.
plot x=n min=20 max=500
vary (linestyle, symbol, color);

3280
Chapter 56. The POWER Procedure (Experimental)
Output 56.5.16.
Plot with Varying Color Instead of Panel
Finally, suppose you want to specify which features are used and which analysis pa-
rameters they are linked to. The following PLOT statement produces a two-panel plot
(shown in Output 56.5.17 and Output 56.5.18) in which line style varies by standard
deviation, plotting symbol varies by both alpha and sides, and panel varies by means.
plot x=n min=20 max=500
vary (linestyle by stddev,
symbol by alpha sides,
panel by groupmeans);

Example 56.5. Customizing Plots
3281
Output 56.5.17.
Plot with Features Explicitly Linked to Parameters: Panel 1 of 2

3282
Chapter 56. The POWER Procedure (Experimental)
Output 56.5.18.
Plot with Features Explicitly Linked to Parameters: Panel 2 of 2
Choosing Key (Legend) Styles
The default style for the key (or “legend”) is one that displays the association between
levels of features and levels of analysis parameters, located below the x-axis. For
example, Output 56.5.5 demonstrates this style of key.
You can reproduce Output 56.5.5 with the same key but a different location, inside the
plotting region, using the POS=INSET option within the KEY=BYFEATURE option
in the PLOT statement. The following statements product the plot in Output 56.5.19.
proc power plotonly;
twosamplemeans test=diff
groupmeans
= 12 | 15 18
stddev
= 7 9
power
= .
ntotal
= 200;
plot x=n min=20 max=500
key = byfeature(pos=inset);
run;

Example 56.5. Customizing Plots
3283
Output 56.5.19.
Plot with a By-Feature Key Inside the Plotting Region
Alternatively, you can specify a key that identifies each individual curve separately
by number using the KEY=BYCURVE option in the PLOT statement:
plot x=n min=20 max=500
key = bycurve;
The resulting plot is shown in Output 56.5.20.

3284
Chapter 56. The POWER Procedure (Experimental)
Output 56.5.20.
Plot with a Numbered By-Curve Key
Use the NUMBERS=OFF option within the KEY=BYCURVE option to specify a
non-numbered key that identifies curves with samples of line styles, symbols, and
colors:
plot x=n min=20 max=500
key = bycurve(numbers=off pos=inset);
The POS=INSET sub-option places the key within the plotting region. The resulting
plot is shown in Output 56.5.21.

Example 56.5. Customizing Plots
3285
Output 56.5.21.
Plot with a Non-Numbered By-Curve Key
Finally, you can attach labels directly to curves with the KEY=ONCURVES option.
The following plot statement produces Output 56.5.22.
plot x=n min=20 max=500
key = oncurves;

3286
Chapter 56. The POWER Procedure (Experimental)
Output 56.5.22.
Plot with Directly Labeled Curves
Modifying Symbol Locations
The default locations for plotting symbols are the points computed directly from the
power and sample size algorithms. For example, Output 56.5.5 shows plotting sym-
bols corresponding to computed points. The curves connecting these points are inter-
polated (as indicated by the INTERPOL= option in the PLOT statement).
You can modify the locations of plotting symbols using the MARKERS= option in
the plot statement. The MARKERS=ANALYSIS option places plotting symbols at
locations corresponding to the input specified in the analysis statement preceding the
PLOT statement. You may prefer this as an alternative to using reference lines to
highlight specific points. For example, you can reproduce Output 56.5.5, but with
the plotting symbols located at the sample sizes shown in Output 56.5.1, using the
following statements.
proc power plotonly;
twosamplemeans test=diff
groupmeans
= 12 | 15 18
stddev
= 7 9
power
= .
ntotal
= 232 382 60 98;
plot x=n min=20 max=500
markers=analysis;
run;

Example 56.5. Customizing Plots
3287
The analysis statement here is the TWOSAMPLEMEANS statement.
The
MARKERS=ANALYSIS option in the PLOT statement causes the plotting
symbols to occur at sample sizes specified by the NTOTAL= option in the
TWOSAMPLEMEANS statement: 232, 382, 60, and 98. The resulting plot is shown
in Output 56.5.23.
Output 56.5.23.
Plot with MARKERS=ANALYSIS
You can also use the MARKERS=NICE option to align symbols with the tick marks
on one of the axes (the x-axis when the X= option is used, or the y-axis when the Y=
is used):
plot x=n min=20 max=500
markers=nice;
The plot created by this PLOT statement is shown in Output 56.5.24.

3288
Chapter 56. The POWER Procedure (Experimental)
Output 56.5.24.
Plot with MARKERS=NICE
Note that the plotting symbols are aligned with the tick marks on the x-axis because
the X= option is specified.
References
Beal, S.L. (1989), “Sample Size Determination for Confidence Intervals on the
Population Means and on the Difference between Two Population Means,”
Biometrics, 45, 969–977.
Blackwelder, W.C. (1982), “‘Proving the Null Hypothesis’ in Clinical Trials,”
Controlled Clinical Trials, 3, 345–353.
Castelloe, J.M. (2000), “Sample Size Computations and Power Analysis with the
SAS ® System,” Proceedings of the Twenty-Fifth Annual SAS Users Group
International Conference,
Paper 265-25, Cary, NC: SAS Institute Inc.
Castelloe, J.M. and O’Brien, R.G. (2001), “Power and Sample Size Determination
for Linear Models,” Proceedings of the Twenty-Sixth Annual SAS Users Group
International Conference,
Paper 240-26. Cary, NC: SAS Institute Inc.
Chernick, M.R. and Liu, C.Y. (2002), “The Saw-Toothed Behavior of Power Versus
Sample Size and Software Solutions: Single Binomial Proportion Using Exact
Methods,” The American Statistician, 56, 149–155.
Diletti, D., Hauschke, D., and Steinijans, V.W. (1991), “Sample Size Determination
for Bioequivalence Assessment by Means of Confidence Intervals,” International

References
3289
Journal of Clinical Pharmacology, Therapy and Toxicology, 29, 1–8.
DiSantostefano, R.L. and Muller, K.E. (1995), “A Comparison of Power
Approximations for Satterthwaite’s Test,” Communications in Statistics —
Simulation and Computation
, 24 (3), 583–593.
Hocking, R.R. (1985), The Analysis of Linear Models, Monterey, California:
Brooks/Cole Publishing Company.
Johnson, N.L. and Kotz, S. (1970), Distributions in Statistics: Continuous Univariate
Distributions — 1, New York: John Wiley & Sons.
Lenth, R.V. (2001), “Some Practical Guidelines for Effective Sample Size
Determination,” The American Statistician, 55, 187–193.
Maxwell,
S.E. (2000),
“Sample Size and Multiple Regression Analysis”,
Psychological Methods, 5, 434–458.
Moser, B.K., Stevens, G.R., and Watts, C.L. (1989), “The Two-Sample T Test Versus
Satterthwaite’s Approximate F Test,” Communications in Statistics A — Theory
and Methods
, 18, 3963–3975.
Muller, K.E. and Benignus, V.A. (1992), “Increasing Scientific Power with Statistical
Power,” Neurotoxicology and Teratology, 14, 211–219.
O’Brien, R.G. and Muller, K.E. (1993), “Unified Power Analysis for t-Tests Through
Multivariate Hypotheses,” in Applied Analysis of Variance in Behavioral Science,
ed. L.K. Edwards, New York: Marcel Dekker, Chapter 8, 297–344.
Owen, D.B. (1965), “A Special Case of a Bivariate Non-Central t-Distribution,”
Biometrika, 52, 437–446.
Phillips,
K.F. (1990),
“Power of the Two One-Sided Tests Procedure in
Bioequivalence,” Journal of Pharmacokinetics and Biopharmaceutics, 18,
137–144.
Satterthwaite, F.W. (1946), “An Approximate Distribution of Estimates of Variance
Components,” Biometrics Bulletin, 2, 110–114.
Schuirmann, D.J. (1987), “A Comparison of the Two One-Sided Tests Procedure and
the Power Approach for Assessing the Equivalence of Average Bioavailability,”
Journal of Pharmacokinetics and Biopharmaceutics, 15, 657–680.
Senn, S. (1993), Cross-over Trials in Clinical Research, New York: John Wiley &
Sons, Inc.

Document Outline