help stpower exponential dialog: stpower exponential
-------------------------------------------------------------------------------
Title
[ST] stpower exponential -- Sample size and power for the exponential
test
Syntax
Sample-size determination
Specifying hazard rates
stpower exponential [h1 [h2]] [, options]
Specifying survival probabilities
stpower exponential s1 [s2] , t(#) [options]
Power determination
Specifying hazard rates
stpower exponential [h1 [h2]] , n(numlist) [options]
Specifying survival probabilities
stpower exponential [s1 [s2]] , t(#) n(numlist) [options]
where
h1 is the hazard rate in the control group;
h2 is the hazard rate in the experimental group;
s1 is the survival probability in the control group at reference
(base) time t; and
s2 is the survival probability in the experimental group at reference
(base) time t.
h1, h2 and s1, s2 may each be specified either as one number or as a
list of values (see numlist) enclosed in parenthesis.
options description
-------------------------------------------------------------------------
Main
t(#) reference time t for survival probabilities
s1 and s2
* alpha(numlist) significance level; default is alpha(0.05)
* power(numlist) power; default is power(0.8)
* beta(numlist) probability of type II error; default is
beta(0.2)
* n(numlist) sample size; required to compute power
* hratio(numlist) hazard ratio of the experimental group to
the control group, h2/h1 or
ln(s2)/ln(s1); default is hratio(0.5)
onesided one-sided test; default is two sided
* p1(numlist) the proportion of subjects in the control
group; default is p1(0.5), meaning equal
group sizes
* nratio(numlist) ratio of sample sizes, N2/N1; default is
nratio(1), meaning equal group sizes
loghazard power or sample-size computation for the
test of the difference between log
hazards; default is the test of the
difference between hazards
unconditional power or sample-size computation using the
unconditional approach
parallel treat number lists in starred options as
parallel (do not enumerate all possible
combinations of values) when multiple
values per option are specified
Accrual/Follow-up
fperiod(#) length of the follow-up period; if not
specified the study is assumed to
continue until all subjects experience an
event (fail)
aperiod(#) length of the accrual period; default is
aperiod(0), meaning no accrual
aprob(#) proportion of subjects accrued by time t*
under truncated exponential accrual;
default is aprob(0.5)
aptime(#) proportion of the accrual period,
t*/aperiod(), by which proportion of
subjects in aprob() is accrued; default
is aptime(0.5)
atime(#) reference accrual time t* by which the
proportion of subjects in aprob() is
accrued; default value is 0.5*aperiod()
ashape(#) shape of the truncated exponential accrual
distribution; default is ashape(0),
meaning uniform accrual
lossprob(# #) proportion of subjects lost to follow-up by
time losstime() in the control and the
experimental groups; default is
lossprob(0 0), meaning no losses to
follow-up
losstime(#) (reference) time by which the proportion of
subjects specified in lossprob() is lost
to follow-up; default is losstime(1)
losshaz(# #) loss hazard rates in the control and the
experimental groups; default is losshaz(0
0), meaning no losses to follow-up
Reporting
detail more detailed output
table display results in a table with default
columns
columns(colnames) display results in a table with specified
colnames columns
notitle suppress table title
nolegend suppress table legend
colwidth(# [# ...]) column widths; default is colwidth(9)
separator(#) draw a horizontal separator line every #
lines; default is separator(0), meaning
no separator lines
saving(filename[, replace]) save the table data to filename; use
replace to overwrite existing filename
+ noheader suppress table header; seldom used
+ continue draw a continuation border in the table
output; seldom used
-------------------------------------------------------------------------
* Starred options may be specified either as one number or as a list of
values (see numlist).
+ noheader and continue are not shown in the dialog box.
colnames description
-------------------------------------------------------------------------
alpha significance level
power power
beta type II error probability
n total number of subjects
n1 number of subjects in the control group
n2 number of subjects in the experimental
group
hr hazard ratio
loghr log of the hazard ratio (difference between
log hazards)
diff difference between hazards
h1 hazard rate in the control group
h2 hazard rate in the experimental group
s1 survival probability in the control group
s2 survival probability in the experimental
group
t reference survival time
p1 proportion of subjects in the control group
nratio ratio of sample sizes, experimental to
control
fperiod follow-up period
aperiod accrual period
aprob % of subjects accrued by time atime (or by
aptime % of accrual period)
aptime % of an accrual period by which aprob % of
subjects are accrued
atime reference accrual time
ashape shape of the accrual distribution
lpr1 proportion of subjects lost to follow-up in
the control group
lpr2 proportion of subjects lost to follow-up in
the experimental group
losstime reference loss to follow-up time
lh1 loss hazard in the control group
lh2 loss hazard in the experimental group
eo total expected number of events (failures)
under the null
eo1 number of events in the control group under
the null
eo2 number of events in the experimental group
under the null
ea total expected number of events (failures)
under the alternative
ea1 number of events in the control group under
the alternative
ea2 number of events in the experimental group
under the alternative
lo total expected number of losses to
follow-up under the null
lo1 number of losses in the control group under
the null
lo2 number of losses in the experimental group
under the null
la total expected number of losses to
follow-up under the alternative
la1 number of losses in the control group under
the alternative
la2 number of losses in the experimental group
under the alternative
-------------------------------------------------------------------------
By default, the following colnames are displayed:
power, n, n1, n2, and alpha are always displayed;
h1 and h2 are displayed if hazard rates are specified, or s1 and s2
if survival probabilities are specified;
diff if hazard difference test is specified, or loghr if log-hazard
difference test is specified;
aperiod if accrual period (aperiod()) is specified;
fperiod if follow-up period (fperiod()) is specified; and
lh1 and lh2 if losshaz() or lpr1 and lpr2 if lossprob() is specified.
Menu
Statistics > Survival analysis > Power and sample size > Exponential test
Description
stpower exponential estimates required sample size and power for survival
analysis comparing two exponential survivor functions by using parametric
tests for the difference between hazards or, optionally, for the
difference between log hazards. It accommodates unequal allocation
between the two groups, flexible accrual of subjects into the study, and
group-specific losses to follow-up. The accrual distribution may be
chosen to be uniform over the fixed accrual period, R, or truncated
exponential over the period [0,R]. Losses to follow-up are assumed to be
exponentially distributed. Also the computations may be carried out
using the conditional or the unconditional approach.
You can use stpower exponential to
o calculate expected number of events and required sample size when
you know power and effect size (supplied as hazard rates,
survival probabilities, or hazard ratio) for studies with or
without follow-up and accrual periods allowing for different
accrual patterns and in the presence of losses to follow-up and
o calculate power when you know sample size and effect size (supplied
as hazard rates, survival probabilities, or hazard ratio) for
studies with or without follow-up and accrual periods allowing
for different accrual patterns and in the presence of losses to
follow-up.
If the t() option is specified, the command's input parameters are the
values of survival probabilities in the control (or the less favorable)
group, S1(t), and in the experimental group, S2(t), at a fixed time, t
(reference survival time), specified in t(), given as s1 and s2,
respectively. Otherwise, the input parameters are assumed to be the
values of the hazard rates in the control group, lambda1, and in the
experimental group, lambda2, given as h1 and h2, respectively. If
survival probabilities are specified, they are converted to hazard rates
by using the formula for the exponential survivor function and the value
of time t in t().
Options
+------+
----+ Main +-------------------------------------------------------------
t(#) specifies a fixed time t (reference survival time) such that the
proportions of subjects in the control and experimental groups still
alive past this time point are as specified in s1 and s2. If this
option is specified, the input parameters, s1 and s2 are the survival
probabilities S1(t) and S2(t). Otherwise, the input parameters are
assumed to be hazard rates, lambda1 and lambda2, given as h1 and h2
respectively.
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 number of subjects in the study to be used to
compute the power of the test. By default, the sample-size
calculation is assumed. This option may not be combined with beta()
or power().
hratio(numlist) specifies the hazard ratio of the experimental group to
the control group. The default is hratio(0.5). This value defines
the clinically significant improvement of the experimental procedure
over the control desired to be detected by a test, with a certain
power specified in power(). If h1 and h2 (or s1 and s2) are given,
hratio() is not allowed and the hazard ratio is computed as h2/h1 (or
ln(s2)/ln(s1)).
onesided indicates a one-sided test. The default is two sided.
p1(numlist) specifies the proportion of subjects in the control group.
The default is p1(0.5), meaning equal allocation of subjects to the
control and the experimental groups. Only one of p1() or nratio()
may be specified.
nratio(numlist) specifies the sample-size ratio of the experimental group
relative to the control group, N2/N1. The default is nratio(1),
meaning equal allocation between the two groups. Only one of
nratio() or p1() may be specified.
loghazard requests sample-size or power computation for the test of the
difference between log hazards (or the test of the log of the hazard
ratio). This option implies uniform accrual. By default, the test
of the difference between hazards is assumed.
unconditional requests that the unconditional approach be used for
sample-size or power computation; see The conditional versus
unconditional approaches and Methods and formulas in [ST] stpower
exponential for details.
parallel reports results sequentially (in parallel) over the list of
numbers supplied to options allowing numlist. By default, results
are computed over all combinations of the number lists in the
following order of nesting: alpha(); p1() or nratio(); list of hazard
rates h1 and h2 or survival probabilities s1 and s2; hratio();
power() or beta(); and n(). This option requires that options with
multiple values each contain the same number of elements.
+-------------------+
----+ Accrual/Follow-up +------------------------------------------------
fperiod(#) specifies the follow-up period of the study, f. By default it
is assumed that subjects are followed up until the last subject
experiences an event (fails). The (minimal) follow-up period is
defined as the length of the time period after the recruitment of the
last subject to the study until the end of the study. If T is the
duration of a study and R is the length of an accrual period, then
the follow-up period is f = T - R.
aperiod(#) specifies the accrual period, R, during which subjects are to
be recruited into the study. The default is aperiod(0), meaning no
accrual.
aprob(#) specifies the proportion of subjects expected to be accrued by
time t* according to the truncated exponential distribution. The
default is aprob(0.5). This option is useful when the shape
parameter is unknown but the proportion of accrued subjects at a
certain time is known. aprob() is often used in conjunction with
aptime() or atime(). This option may not be specified with ashape()
or loghazard and requires specifying a nonzero accrual period in
aperiod().
aptime(#) specifies the proportion of the accrual period, t*/R, by which
the proportion of subjects specified in aprob() is expected to be
accrued according to the truncated exponential distribution. The
default is aptime(0.5). This option may not be combined with
atime(), ashape(), or loghazard and requires specifying a nonzero
accrual period in aperiod().
atime(#) specifies the time point t*, reference accrual time, by which
the proportion of subjects specified in aprob() is expected to be
accrued according to the truncated exponential distribution. The
default value is 0.5*R. This option may not be combined with
aptime(), ashape(), or loghazard and requires specifying a nonzero
accrual period in aperiod(). The value in atime() may not exceed the
value in aperiod().
ashape(#) specifies the shape, gamma, of the truncated exponential
accrual distribution. The default is ashape(0), meaning uniform
accrual. This option is not allowed in conjunction with loghazard
and requires specifying a nonzero accrual period in aperiod().
lossprob(# #) specifies the proportion of subjects lost to follow-up by
time losstime() in the control and the experimental groups,
respectively. The default is lossprob(0 0), meaning no losses to
follow-up. This option requires specifying aperiod() or fperiod()
and may not be combined with losshaz().
losstime(#) specifies the time at which the proportion of subjects
specified in lossprob() is lost to follow-up, also referred to as the
reference loss to follow-up time. The default is losstime(1). This
option requires specifying lossprob().
losshaz(# #) specifies exponential hazard rates of losses to follow-up,
eta1 and eta2, in the control and the experimental groups,
respectively. The default is losshaz(0 0), meaning no losses to
follow-up. This option requires specifying aperiod() or fperiod()
and may not be combined with lossprob().
+-----------+
----+ Reporting +--------------------------------------------------------
detail displays more detailed output; the expected number of events
(failures) and losses to follow-up under the null and alternative
hypotheses are displayed. This option is not appropriate with
tabular output.
table displays results in a tabular format and is implied if any number
list contains more than one element. This option is useful if you
are producing results one case at a time and wish to construct your
own custom table by using a forvalues loop.
columns(colnames) specifies results in a table with specified colnames
columns. The order of the columns in the output table is the same as
the order of colnames specified in columns(). Column names in
columns() must be space-separated.
notitle prevents the table title from displaying.
nolegend prevents the table legend from displaying and column headers
from being marked.
colwidth(# [# ...]) specifies column widths. The default is 9 for all
columns. The number of specified values may not exceed the number of
columns in the table. A missing value (.) may be specified for any
column to indicate the default width (9). If fewer widths are
specified than the number of columns in the table, the last width
specified is used for the remaining columns.
separator(#) specifies how often separator lines should be drawn between
rows of the table. The default is separator(0), meaning that no
separator lines should be displayed.
saving(filename[, replace]) creates a Stata data file (.dta file)
containing the table values with variable names corresponding to the
displayed colnames. replace indicates that filename be overwritten,
if it exists. saving() is only appropriate with tabular output.
The following options are avilable with stpower exponential but are not
shown in the dialog box:
noheader prevents the table header from displaying. This option is
useful when the command is issued repeatedly, such as within a loop.
noheader implies notitle.
continue draws a continuation border at the bottom of the table. This
option is useful when the command is issued repeatedly within a loop.
Short introduction to stpower exponential
By default, stpower exponential computes the required sample size for the
test of the difference between two hazard rates using power(0.8) (or,
equivalently, beta(0.2)). The default setting for power or,
alternatively, the probability of a type II error may be changed by using
power() or beta(), respectively. If power determination is desired,
sample size n() must be specified. If the test for the log of the hazard
ratio (for the difference between log hazards) is desired, option
loghazard must be specified.
The default probability of a type I error of a test is 0.05 but may be
changed by using option alpha(). One-sided tests may be requested by
using onesided. The default equal-group allocation may be changed by
specifying p1() or nratio().
If neither the length of a follow-up period, f, nor the length of an
accrual period, R, is specified in options fperiod() or aperiod(),
respectively, the study is assumed to continue until all subjects
experience an event (failure), regardless of how much time is required.
If either of the two options are supplied, a fixed-duration study of a
length T = R + f is assumed.
If an accrual period of length R is specified in option aperiod(),
uniform accrual over the period [0,R] is assumed. The accrual
distribution may be changed to truncated exponential when the shape
parameter is specified in ashape(). The combination of options aprob()
and aptime() (or atime()) may be used in place of option ashape() to
request the desired shape of the truncated exponential accrual.
In order to take into account exponential losses to follow-up, options
losshaz() or lossprob() and losstime() may be used. See Nonuniform
accrual and exponential losses to follow-up in [ST] stpower exponential
for details.
Optionally, results may be displayed in a table using table or columns()
as demonstrated in Examples below and in [ST] stpower. For examples on
how to plot a power curve, see Examples below, [ST] stpower, and example
7 in [ST] stpower logrank.
Remarks on methods used in stpower exponential
By default, stpower exponential computes the sample size required to
achieve a specified power to detect a difference between hazard rates
using the method of Lachin (1981). If loghazard is specified, the sample
size required to detect a log of the hazard ratio with specified power is
reported using the formula derived by George and Desu (1974). In the
presence of an accrual period, the methods of Lachin and Foulkes (1986)
or, for uniform accrual only, Rubinstein, Gail, and Santner (1981) (if
loghazard and unconditional are specified), are utilized. For details,
see [ST] stpower exponential.
Examples
In the following examples, we assume that both the control and
experimental groups' survivor functions are exponential. We know from
previous studies that the yearly hazard rate for members of the control
group is 0.3, and we are interested in detecting a hazard rate of 0.2 in
the expermental group (a hazard ratio of 0.667).
Compute required sample sizes for a two-sided 5% test based on the
log-hazard difference with 80% power
. stpower exponential 0.3 0.2, loghazard
Same as above command, but display results in a table
. stpower exponential 0.3 0.2, loghazard table
Compute required number of subjects assuming a 5-year follow-up period,
using a one-sided 5% test
. stpower exponential 0.3 0.2, fperiod(5) onesided
Compute required sample size with 2-year accrual period and 3-year
follow-up period
. stpower exponential 0.3 0.2, aperiod(2) fperiod(3)
Compute power corresponding to a sample size of 300 assuming an
exponential accrual distribution with a shape parameter of -2 (implying
slower accrual at the beginning of the period and fast accrual toward the
end)
. stpower exponential 0.3 0.2, n(300) aperiod(2) ashape(-2)
Obtain power for a range of hazard ratios and two sample sizes
{p_end}
. stpower exponential 0.3, hratio(0.1(0.2)0.9) n(50 100)
Saved results
stpower exponential saves the following in r():
Scalars
r(power) power of test
r(alpha) significance level of test
r(hratio) hazard ratio
r(onesided) 1 if one-sided test, 0 otherwise
r(h1) hazard in the control group
r(h2) hazard in the experimental group
r(t) reference survival time (if t() is specified)
r(p1) proportion of subjects in the control group
r(fperiod) length of the follow-up period (if specified)
r(aperiod) length of the accrual period (if specified)
r(ashape) shape parameter (if aperiod() is specified)
r(lh1) loss hazard in the control group
r(lh2) loss hazard in the experimental group
r(lt) reference loss to follow-up time (if losstime() is
specified)
Macros
r(method) type of method (hazard difference or log-hazard
difference)
r(accrual) type of entry distribution (uniform or exponential)
(if requested)
r(type) type of approach (conditional or unconditional)
Matrices
r(N) 1x3 matrix of required sample sizes
r(Pr) 1x4 matrix of probabilities of an event (when
computed)
r(Ea) 1x3 matrix of expected number of events under the
alternative (when computed)
r(Eo) 1x3 matrix of expected number of events under the
null (when computed)
r(La) 1x3 matrix of expected number of losses under the
alternative (when computed)
r(Lo) 1x3 matrix of expected number of losses under the
null (when computed)
References
George, S. L., and M. M. Desu. 1974. Planning the size and duration of a
clinical trial studying the time to some critical event. Journal of
Chronic Diseases 27: 15-24.
Lachin, J. M. 1981. Introduction to sample size determination and power
analysis for clinical trials. Controlled Clinical Trials 2: 93-113.
Lachin, J. M., and M. A. Foulkes. 1986. Evaluation of sample size and
power for analysis of survival with allowance for nonuniform patient
entry, losses to follow-up, noncompliance, and stratification.
Biometrics 42: 507-519.
Rubinstein, L. V., M. H. Gail, and T. J. Santner. 1981. Planning the
duration of a comparative clinical trial with loss to follow-up and a
period of continued observation. Journal of Chronic Diseases 34:
469-479.
Also see
Manual: [ST] stpower exponential
Help: [ST] stpower, [ST] stpower logrank, [ST] stpower cox, [R]
sampsi, [ST] streg, [ST] glossary