4 power — Power and sample-size analysis for hypothesis tests
Options
Main
alpha(numlist) sets the significance level of the test. The default is alpha(0.05).
power(numlist) sets the power of the test. The default is power(0.8). If beta() is specified, this
value is set to be 1 − beta(). Only one of power() or beta() may be specified.
beta(numlist) sets the probability of a type II error of the test. The default is beta(0.2). If power()
is specified, this value is set to be 1 −power(). Only one of beta() or power() may be specified.
n(numlist) specifies the total number of subjects in the study to be used for power or effect-size
determination. If n() is specified, the power is computed. If n() and power() or beta() are
specified, the minimum effect size that is likely to be detected in a study is computed.
n1(numlist) specifies the number of subjects in the control group to be used for power or effect-size
determination.
n2(numlist) specifies the number of subjects in the experimental group to be used for power or
effect-size determination.
nratio(numlist) specifies the sample-size ratio of the experimental group relative to the control
group, N2/N1, for two-sample tests. The default is nratio(1), meaning equal allocation between
the two groups.
compute(N1 | N2) requests that the power command compute one of the group sample sizes given
the other one, instead of the total sample size, for two-sample tests. To compute the control-group
sample size, you must specify compute(N1) and the experimental-group sample size in n2().
Alternatively, to compute the experimental-group sample size, you must specify compute(N2)
and the control-group sample size in n1().
nfractional specifies that fractional sample sizes be allowed. When this option is specified, fractional
sample sizes are used in the intermediate computations and are also displayed in the output.
Also see the description and the use of options n(), n1(), n2(), nratio(), and compute() for
two-sample tests in [PSS-4] Unbalanced designs.
direction(upper | lower) specifies the direction of the effect for effect-size determination. For most
methods, the default is direction(upper), which means that the postulated value of the parameter
is larger than the hypothesized value. For survival methods, the default is direction(lower),
which means that the postulated value is smaller than the hypothesized value.
onesided indicates a one-sided test. The default is two sided.
parallel requests that computations be performed in parallel over the lists of numbers specified for
at least two study parameters as command arguments, starred options allowing numlist, or both.
That is, when parallel is specified, the first computation uses the first value from each list of
numbers, the second computation uses the second value, and so on. If the specified number lists
are of different sizes, the last value in each of the shorter lists will be used in the remaining
computations. By default, results are computed over all combinations of the number lists.
For example, let a
1
and a
2
be the list of values for one study parameter, and let b
1
and b
2
be the list of values for another study parameter. By default, power will compute results for all
possible combinations of the two values in the two study parameters: (a
1
, b
1
), (a
1
, b
2
), (a
2
, b
1
),
and (a
2
, b
2
). If parallel is specified, power will compute results for only two combinations:
(a
1
, b
1
) and (a
2
, b
2
).