help stpower logrank dialog: stpower logrank
-------------------------------------------------------------------------------
Title
[ST] stpower logrank -- Sample size, power, and effect size for the
log-rank test
Syntax
Sample-size determination
stpower logrank [surv1 [surv2]] [, options]
Power determination
stpower logrank [surv1 [surv2]], n(numlist) [options]
Effect-size determination
stpower logrank [surv1], n(numlist) {power(numlist) | beta(numlist)}
[options]
where
surv1 is the survival probability in the control group at the end of
the study t*;
surv2 is the survival probability in the experimental group at the
end of the study t*.
surv1 and surv2 may each be specified either as one number or as a
list of values (see numlist) enclosed in parentheses.
options description
-------------------------------------------------------------------------
Main
* 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 or
effect size
* hratio(numlist) hazard ratio (effect size) of the
experimental to the control group;
default is hratio(0.5)
onesided one-sided test; default is two sided
* p1(numlist) 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
schoenfeld use the formula based on the log
hazard-ratio in calculations; default is
to use the formula based on the hazard
ratio
parallel treat number lists in starred options as
parallel (do not enumerate all possible
combinations of values) when multiple
values per option are specified
Censoring
simpson(# # # | matname) survival probabilities in the control group
at three specific time points to compute
the probability of an event (failure),
using Simpson's rule under uniform
accrual
st1(varname_s varname_t) variables varname_s, containing survival
probabilities in the control group, and
varname_t, containing respective time
points, to compute the probability of an
event (failure), using numerical
integration under uniform accrual
wdprob(#) proportion of subjects anticipated to
withdraw from the study; default is
wdprob(0)
Reporting
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
e total number of events (failures)
hr hazard ratio
loghr log of the hazard ratio
s1 survival probability in the control group
s2 survival probability in the experimental
group
p1 proportion of subjects in the control group
nratio ratio of sample sizes, experimental to
control
w proportion of withdrawals
-------------------------------------------------------------------------
By default, the following colnames are displayed:
power, n, n1, n2, e, and alpha are always displayed;
hr is displayed, unless the schoenfeld option is specified, in which
case loghr is displayed;
s1 and s2 is displayed if survival probabilities are specified; and
w is displayd if withdrawal proportion (wdprob() option) is
specified.
Menu
Statistics > Survival analysis > Power and sample size > Log-rank test
Description
stpower logrank estimates required sample size, power, and effect size
for survival analysis comparing survivor functions in two groups by using
the log-rank test. It also reports the number of events (failures)
required to be observed in a study. This command supports two methods to
obtain the estimates, those according to Freedman (1982) and Schoenfeld
(1981). The command provides options to take into account unequal
allocation of subjects between the two groups and possible withdrawal of
subjects from the study (loss to follow-up). Optionally, the estimates
can be adjusted for uniform accrual of subjects into the study. Also the
minimal effect size (minimal detectable value of the hazard ratio or the
log hazard-ratio) may be obtained for given power and sample size.
You can use stpower logrank to
o calculate required number of events and sample size when you know
power and effect size (expressed as a hazard ratio) for
uncensored and censored survival data,
o calculate power when you know sample size (number of events) and
effect size (expressed as a hazard ratio) for uncensored and
censored survival data, and
o calculate effect size (hazard ratio or log hazard-ratio if the
schoenfeld option is specified) when you know sample size (number
of events) and power for uncensored and censored survival data.
stpower logrank's input parameters, surv1 and surv2, are the values of
survival probabilities in the control group (or the less favorable of the
two groups), s1, and in the experimental group, s2, at the end of the
study t*.
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 number of subjects in the study to be used to
compute the power of the test or the minimal effect size (minimal
detectable value of the hazard ratio or log hazard-ratio) if power()
or beta() is also specified.
hratio(numlist) specifies the hazard ratio (effect size) 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 the
log-rank test, with a certain power specified in power(). If both
arguments surv1 and surv2 are specified, hratio() is not allowed and
the hazard ratio is instead computed as ln(surv2)/ln(surv1).
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.
schoenfeld requests calculations using the formula based on the log
hazard ratio, according to Schoenfeld (1981). The default is to use
the formula based on the hazard ratio, according to Freedman (1982).
parallel reports results sequentially (in parallel) over the list of
numbers supplied to options allowing numlist. By default, the
results are computed over all combinations of the number lists in the
following order of nesting: alpha(); p1() or nratio(); list of
arguments surv1 and surv2; hratio(); power() or beta(); and n().
This option requires that options with multiple values each contain
the same number of elements.
+-----------+
----+ Censoring +--------------------------------------------------------
simpson(# # # | matname) specifies survival probabilities in the control
group at three specific time points, to compute the probability of an
event (failure) using Simpson's rule, under the assumption of uniform
accrual. Either the actual values or the 1x3 matrix, matname,
containing these values can be specified. By default, the
probability of an event is approximated as an average of the failure
probabilities 1-s1 and 1-s2. simpson() may not be combined with
st1() and may not be used if surv1 or surv2 are specified.
st1(varname_s varname_t) specifies variables varname_s, containing
survival probabilities in the control group, and varname_t,
containing respective time points, to compute the probability of an
event (failure) using numerical integration, under the assumption of
uniform accrual; see [R] dydx. The minimum and the maximum values of
varname_t must be the length of the follow-up period and the duration
of the study, respectively. By default, the probability of an event
is approximated as an average of the failure probabilities 1-s1 and
1-s2. st1() may not be combined with simpson() and may not be used
if surv1 or surv2 are specified.
wdprob(#) specifies the proportion of subjects anticipated to withdraw
from the study. The default is wdprob(0). wdprob() may not be
combined with n().
+-----------+
----+ Reporting +--------------------------------------------------------
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 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 available with stpower logrank 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 logrank
Consider the following two types of a survival study. A type I study is
the study in which all subjects fail by the end of the study (uncensored
data). A type II study is the study which terminates after a fixed
period of time and not all subjects experience an event (failure) by the
end of that period (censored data).
By default, to obtain the estimate of the required sample size for
uncensored data (type I study), stpower logrank uses power(0.8) (or,
equivalently, beta(0.2)) and alpha(0.05) for the power (or the
probability of a type II error) and the probability of a type I error
(significance level) of the test. The default effect size, a difference
between the two treatments, corresponds to the value of 0.5 of the hazard
ratio of the experimental group to the control group. It may be changed
by using option hratio().
Under the administrative censoring (type II study), in addition to the
above, the estimates of survival probabilities in two groups are
necessary for the computations. The survival probability in the control
group, s1, must be specified as argument surv1. The survival probability
in the experimental group, s2, may be directly supplied as argument surv2
or computed using surv1 and the hazard ratio specified in hratio(). If
both arguments surv1 and surv2 are specified, the hazard ratio is
computed using these values of survival probabilities and option hratio()
is not allowed. In the presence of an accrual period, options simpson()
or st1() may be used to adjust estimates for uniform accrual. Refer to
section Including information about subject accrual in [ST] stpower
logrank for details.
Two-sided tests, equal allocation of subjects between the two groups, and
no withdrawal of subjects from the study are assumed. Use options
onesided, p1() or nratio(), and wdprob() to request one-sided tests,
unequal allocation, and to specify a proportion of withdrawals.
If power determination is desired, option n() must be specified. If both
n() and power() (or beta()) are specified, the minimal effect size
(minimal value of the hazard ratio or log hazard ratio) which can be
detected by the log-rank test with requested power and fixed sample size
is computed.
Optionally, the 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 logrank
stpower logrank supports two methods, those of Freedman (1982) and
Schoenfeld (1981), to obtain the estimates of the number of events or
power (see also Marubini and Valsecchi 1997, 127, 134 and Collett 2003,
301, 306). The latter is used if option schoenfeld is specified. The
final estimates of the sample size are based on the approximation of the
probability of an event due to Freedman (1982), the default, or, for
uniform accrual, due to Schoenfeld (1983) (also see Collett 2003) if
option simpson() is specified. Thus the power is independent of the
sample size for a fixed number of events (Freedman 1982). See Methods
and formulas in [ST] stpower logrank for the formulas underlying these
methods.
In the presence of censoring, the probability of an event needs to be
estimated to obtain the estimate of the sample size. By default, it is
approximated as suggested by Freedman (1982) using the estimates of the
survival probabilities in two groups at the end of the study. See
Examples below and Computing sample size in the presence of censoring in
[ST] stpower logrank.
In the presence of uniform accrual over a period [0,R], the information
about subject follow up, f, may be taken into account by specifying
simpson() or st1() if the estimates of the survivor function over the
period [f,T], where the duration of a study is T = R + f, are available
(Schoenfeld 1983, Collett 2003). Only three estimates of the survivor
function at times f, f+R/2, and T are required in simpson(). If more
points are available, st1() may be used instead. See Including
information about subject accrual in [ST] stpower logrank for details.
Examples
Compute number of failures required to detect a hazard ratio of 0.5 using
a 5% two-sided log-rank test with 80% power
. stpower logrank
Same as above, but use Schoenfeld method
. stpower logrank, schoenfeld
Compute sample size required in the presence of censoring to detect a
change in survival from 50% to 60% at the end of the study using a 5%
one-sided log-rank test with a power of 80%
. stpower logrank 0.5 0.6, onesided
Same as above command, but assuming a 10% probability of withdrawal
. stpower logrank 0.5 0.6, onesided wdprob(0.1)
Obtain power for a range of hazard ratios and two sample sizes
. stpower logrank, hratio(0.1(0.2)0.9) n(50 100)
Saved results
stpower logrank saves the following in r():
Scalars
r(E) total number of events (failures)
r(power) power of test
r(alpha) significance level of test
r(hratio) hazard ratio
r(onesided) type of test (0 if two-sided test, 1 if one-sided test)
r(s1) survival probability in the control group (if specified)
r(s2) survival probability in the experimental group (if
specified)
r(p1) proportion of subjects in the control group
r(w) proportion of withdrawals (if specified)
r(Pr_E) probability of an event (failure) (when computed)
Macros
r(method) type of method (Freedman or Schoenfeld)
Matrices
r(N) 1x3 matrix of required sample sizes
References
Collett, D. 2003. Modelling Survival Data in Medical Research. 2nd ed.
London: Chapman & Hall/CRC.
Freedman, L. S. 1982. Tables of the number of patients required in
clinical trials using the logrank test. Statistics in Medicine 1:
121-129.
Schoenfeld, D. A. 1981. The asymptotic properties of nonparametric tests
for comparing survival distributions. Biometrika 68: 316-319.
------. 1983. Sample-size formula for the proportional-hazards
regression model. Biometrics 39: 499-503.
Also see
Manual: [ST] stpower logrank
Help: [ST] stpower, [ST] stpower cox, [ST] stpower exponential, [R]
sampsi, [ST] sts test, [ST] stcox, [ST] glossary