power pairedmeans — Power analysis for a two-sample paired-means test 7
The random sample is typically drawn from an infinite population. When the sample is drawn
from a population of a fixed size, sampling variability must be adjusted for a finite population size.
The power pairedmeans command provides power and sample-size analysis for the comparison
of two correlated means using a paired t test or a paired z test.
Using power pairedmeans
power pairedmeans computes sample size, power, or target mean difference for a two-sample
paired-means test. All computations are performed for a two-sided hypothesis test where, by default,
the significance level is set to 0.05. You may change the significance level by specifying the alpha()
option. You can specify the onesided option to request a one-sided test.
By default, all computations are based on a paired t test, which assumes an unknown standard
deviation of the differences. For a known standard deviation, you can specify the knownsd option to
request a paired z test.
For all computations, you must specify either the standard deviation of the differences in the
sddiff() option or the correlation between the paired observations in the corr() option. If you
specify the corr() option, then individual standard deviations of the pretreatment and posttreatment
groups may also be specified in the respective sd1() and sd2() options. By default, their values
are set to 1. When the two standard deviations are equal, you may specify the common standard
deviation in the sd() option instead of specifying them individually.
To compute sample size, you must specify the pretreatment and posttreatment means under the
alternative hypothesis, m
a1
and m
a2
, respectively, and, optionally, the power of the test in the
power() option. The default power is set to 0.8.
To compute power, you must specify the sample size in the n() option and the pretreatment and
posttreatment means under the alternative hypothesis, m
a1
and m
a2
, respectively.
Instead of the alternative means m
a1
and m
a2
, you can specify the difference m
a2
− m
a1
between
the alternative posttreatment mean and the alternative pretreatment mean in the altdiff() option
when computing sample size or power.
By default, the difference between the posttreatment mean and the pretreatment mean under the
null hypothesis is set to zero. You may specify other values in the nulldiff() option.
To compute effect size, the standardized difference between the alternative and null mean differences,
and target mean difference, you must specify the sample size in the n() option, the power in the
power() option, and, optionally, the direction of the effect. The direction is upper by default,
direction(upper), which means that the target mean difference is assumed to be larger than the
specified null value. This is also equivalent to the assumption of a positive effect size. You can change
the direction to be lower, which means that the target mean difference is assumed to be smaller than
the specified null value, by specifying the direction(lower) option. This is equivalent to assuming
a negative effect size.
By default, the computed sample size is rounded up. You can specify the nfractional option
to see the corresponding fractional sample size; see Fractional sample sizes in [PSS-4] Unbalanced
designs for an example. The nfractional option is allowed only for sample-size determination.
Some of power pairedmeans’s computations require iteration. For example, when the standard
deviation of the differences is unknown, computations use a noncentral Student’s t distribution. Its
degrees of freedom depends on the sample size, and the noncentrality parameter depends on the
sample size and effect size. Therefore, the sample-size and effect-size determinations require iteration.
The default initial values of the estimated parameters are obtained by using a closed-form normal