Title

artsurv -- ART (Survival Outcomes) - Sample Size and Power

Syntax

artsurv
[using filename[.dta]]
[,
options
]

alpha(#) significance level for testing treatment effect(s)

aratios(aratio_list) allocation ratio(s)

crover(#[#...#]) treatment cross-over(s)

detail report more detailed results

distant(#) calculations under distant alternative hypothesis

doses(dose_list) doses for linear trend test

edf0(slist0) baseline survival function

fp(#) suppress banner heading

hratio(hrlist) hazard ratios

index(#) index for Harrington-Fleming weights

ldf(llist [, llist ...]) distribution function of time to loss-to-follow-up

lg(#[#...#]) specifies groups subject to loss to follow-up

median(#) median survival time in group 1

method(methodname) type of logrank test used

n(#) total sample size

ngroups(#) number of treatment groups in trial

ni(#) non-inferiority trial

nperiod(#) number of time-periods

onesided(#) use one-sided significance level

power(#) power of trial

pwehr(hrlist) hazard ratio function post withdrawal from allocated treatment

recrt(rlist) duration and rate of recruitment

replace allows filename to be replaced if it exists

trend(#) specifies a linear trend test

tunit(#) time units

wdf(wlist [, wlist ...]) distribution function of time to withdrawal from allocated treatment

lg(#[#...#]) specifies groups subject to withdrawal from allocated treatment

Description

artsurv calculates sample size and power for comparative studies with
time-to-event outcomes at the end of follow-up.
The survival probabilities and hazard ratios calculated by artsurv for
each time-period in the trial may optionally be stored in a new Stata file
called filename for plotting, etc; see Remarks for further details.
artsurv has the following flexible features:

1. Any number of groups between 2 and 6.

2. Global or linear trend tests with arbitrary dose levels.

3. Logrank test - unweighted or weighted (Tarone-Ware or Harrington-Fleming with
any index).

4. Time-dependent rates of event, loss to follow-up and withdrawal from
allocated treatment (treatment change).

5. Staggered entry

Options

alpha(#) specifies the significance level. By default two-sided
significance levels are assumed. The default # is 0.05.

aratios(aratio_list) specifies the allocation ratio(s).
Suppose aratio_list has r items, #1,...,#r. The allocation
ratio for group k is #k, k = 1,...,r. If r is less than ngroups()
then the allocation ratio for group r+1, r+2, ... is taken as #r.
If aratios() is not specified, the default allocation ratios are all
1, i.e. equal group sizes are assumed.

crover(#[#...#]) (only applies when wg() is specified)
is the target group number when crossing over. crover(#1 #2...#r)
means that the kth group withdrawing from allocated treatment (specified by
wg()) crosses over to receive the allocated treatment of group #k,
k=1,...r. The default is that when individuals in group 1 change treatment,
they receive the treatment assigned to those in group 2. Individuals in group
k (k > 1) cross over to receive the treatment assigned to group 1.

detail(#) with # = 1 requests more detailed output,
including hazard ratios per group and period, expected proportion of failure,
withdrawal from allocated treatment and loss to follow-up by the end of
the study. Default# is 0, meaning shorter output.

distant(#) specifies calculations for the logrank test under
distant or local alternative hypotheses. Default # is 0, meaning
local alternatives. Distnat alternatives are specified by distant(1).

doses(dose_list) specifies doses for a dose-response (linear trend)
test. doses(#1 #2...#r) assigns doses for groups 1,...,r.
If r is less than ngroups(), the dose is assumed equal to #r
for groups r+1, r+2, ... . The default is dose(1 2 ... ngroups()),
which applies only when trend(1) is specified and dose()
is not specified.

edf0(slist0) is required and gives the baseline survival function.
This need not be one of the distributions to be compared unless
the hazard ratio is set to 1 (see hratio())
for one of the groups (usually group 1) at all periods.
The format is edf0(slist0), where
string slist0 is #1[#2 ...#r,#1 #2 ...#r].
Thus, edf0(p1 p2 ...pr,t1 t2 ...tr) gives the
value pi for the survival function for the event time at the
end of time period ti, i=1,...,r. Note that the times t1 t2 ...tr,
which are integer period numbers, may be entered as a numlist
(see numlist). For example, times 1 2 3 4 5 6 may be
validly abbreviated to 1(1)6.

Instantaneous event rates are assumed
constant within time periods (time-to-event is piecewise exponential).
If r < nperiod(), the instantaneous event rates in periods r+1,...,nperiod()
are taken to be the same as in period r. If only one value of edf0
is specified, this is taken to be the value at the end of the study and
the instantaneous event rate is constant thoughout follow-up. Thus if the
number of periods nperiod() = 6 then edf0(0.5) is
equivalent to edf0(0.5,6) and gives 50% survival
at the end of period nperiod() and an exponential distribution
for the baseline failure time. edf0(0.8 0.6,1 5)
gives expected survival probability 0.8 at the end of the
first period and 0.6 at the end of the fifth period. The instantaneous
event rate during the first period is -log(0.8)=0.223. The instantaneous
event rate during periods 2,3,4 and 5 is -log((0.6)/(0.8))/4 = 0.072
which is also the default rate during period 6. This gives survival
probability of 0.45 at the end of period 6. See also the fp()
option to specify failure probabilities instead of survival probabilities.
There is no default; either edf0() or median() must be given.

fp(#) specifies whether survival probabilities or
cumulative failure probabilities
have been supplied in edf0(). The default # is 0, meaning
survival probabilities. fp(1) specifies failure probabilities.

nohead suppresses the banner heading on the output. Lessens irritation
when running several sample size calculations successively.

hratio(hrlist) is required adn specifies the event hazard-ratio
functions. The format is hratio(hrlist), where the string
hrlist is #1_1[#1_2 ...#1_r1],#2_1[#2_2 ...#2_r2],...,#k_1[#k_2 ...#k_rk].
The event hazard ratio of group i (relative to the baseline distribution specified in
edf0()) is #i_j during period j, j=1,...ri; i=1,...k, If ri < nperiod() then
the hazard ratio function during periods ri+1,...nperiod() is assumed to be
#i_ri. If k < ngroups(), the hazard ratio functions for groups k+1,...,
ngroups are assumed equal to the geometric mean of the hazard ratio
functions for groups 1,...k.

index(#) is the index I for Harrington-Fleming weights. Default # is 1.

ldf(llist[;llist;... llist]) is required when lg(),
groups with loss to follow-up, is specified. ldf() specifies the distribution
function of time to loss-to-follow-up. The format is
ldf(llist[;llist;... llist]),
where each llist specifies a cumulative distribution function for time to loss to
follow-up, one for each group specified by lg() and in the same order.
Each llist has the same form as a distribution function
as slist0 in edf0(), but llist is to be interpreted as a cumulative
distribution, not a survival distribution. For example, if nperiod() = 6, then
lg(1 3) ldf(0.2;.05 0.15,2 5)
specifies that:

(i) Groups 1 and 3 are subject to loss to follow-up.

(ii) The cumulative probability of loss to follow-up is .2 by the end
of the last period in group1, .05 at the end of the period 2 and
.15 at the end of period 5 in group 3.

(iii) Individuals in the other groups are not subject to loss to
follow-up.

lg(#[#...#]) specifies the groups subject to loss to follow-up.
ldf() must then be specified giving the cumulative distribution functions
of time to loss to follow-up in the same order.

median(#) specifies # to be the median survival in group 1.
Use of this option over-rides the edf0() option. There is no default value.

method(methodname) - methodname is
l or t or h or b or u, where

l = unweighted logrank (default test),

t = Tarone-Ware test (logrank with weights proportional to the square
root of the total number at risk at event times,

h = Harrington-Fleming (logrank with weights proportional to S**I,
where S is the estimated pooled survival function at event times
and I is the index for Harrington-Fleming weights (see option
index()),

b = Binomial test conditional on the proportion of failures at the end
of the study, using Peto's approximation to the log odds ratio,

u = unconditional binomial test.

n(#) specifies that total sample size is calculated if n = 0.
Otherwise power is calculated given total sample size = n. The default # is 0.

ngroups(#) specifies the number of comparative groups. The default # is 2.

ni(#) specifies whether the trial is of a superiority or a
non-inferiority design. The default # is 0, meaning a superiority design.
ni(1) specifies a non-inferiority design.

nperiod(#) is the number of time periods within which all instantaneous
rates are constant. The default # is 1.

onesided(#) - # = 1 specifies that alpha()
relates to a one-sided significance test. The default # is 0,
meaning a two-sided test.

power(#) specifies the study power. The default # is 0.8 if n() = 0.

pwehr(hrlist) specifies the hazard ratio function post withdrawal
from allocated treatment. The format is pwehr(hrlist), where
hrlist gives the hazard ratio functions (relative to the baseline event time
distribution) after treatment change for the groups specified by wg and
in the same order. The format and interpretation of hrlist is the same as that
of hratio() except that the hazard ratio functions for the remaining groups,
subject to treatment change (given in wg) but not assigned to a hazard ratio
function by pwehr(), is taken to be the same as the last hazard ratio
function specified by pwehr(). When both pwehr() and crover() are
specified, crover() is ignored.

recrt(rlist) specifies the duration and rate of recruitment.
Its format is recrt([duration [recrpr0]],[w1 w2...wk],[s1 s2...sk]),
where

duration = the number of periods for the completion of recruitment.
The default duration is the number of periods specified by nperiod(#).

recrpr0 = the proportion recruited (instantaneously) at the start
of the study. The default is recrpr0 = 0.

w1...wk are the relative proportions recruited in periods 1 to k.
The default specifies equal proportions.

s1...sk specify the shape of recruitment time distribution within
periods. si = 0 for uniform entry during period i, and
si = L>0 for negative exponential with rate L. The default
is uniform entry time within each period.

If recrt() is not specified, recruitment is assumed completed at the begining
of the study, i.e. duration of recruitment = 0; this is equivalent to specifying
recrt(0, 0, 0).

trend(#) specifies a linear trend test. With the default
(# = 0), the trend assumed is linear on the dose levels 1, 2, 3 ....
With # = 1, doses are specified by using the doses() option.

replace allows filename to be replaced if it exists.

tunit(#) specifies the time-units of the periods. This option has
no effect whatsoever on the computation of the power and sample size. It
is used to label the output and serves as an aide-memoire. The value of #
must be between 1 and 7, with 1 = years, 2 = 6 months, 3 = quarters, 4 = months,
5 = weeks, 6 = days, 7 = unspecified. Default # is 1 (years).

wdf(wlist[;wlist;... wlist]) is required when
wg(), groups with treatment change (withdrawal from allocated treatment),
is specified. wdf() specifies the distribution function of time to withdrawal.
The format is the same as that of ldf().

wg(#[#...#]) specifies the groups subject to withdrawal from allocated
treatment. wdf() must then be specified giving the cumulative distribution
functions of time to withdrawal from allocated treatment in the same order as in
wg().

Remarks

The file optionally saved by artsurv contains variables called period, and
surv1, ... hr1, ..., with one variable for each group. For example, surv1
contains the survival probabilities at the end of each period in group 1. The file
includes values of 1 for the survival probabilities and missing for the hazard ratios
at "period 0" i.e. the beginning of the trial, to facilitate plotting. The file
contains enough information to allow you to transpose it into "long" format from the
default "wide" format (see reshape for more on these data formats). Using
the dataset and typing
reshape long will convert the data to the alternate format, and typing
reshape wide will convert it back again.

Examples

. artsurv, method(l) edf0(0.5) hr(1,0.75) np(3) recrt(0 0, 1, 0 ) distant(0) detail(0) onesided(0) ni(0) tunit(1)

(compares two exponential distributions using the logrank test)

. artsurv, method(l) edf0(0.5) hr(1,0.75,0.5) np(3) ng(3) recrt(2 0,1,0) distant(0) detail(0) onesided(0) ni(0) tunit(1)

. artsurv, method(l) edf0(0.9 0.7 0.5, 1(1)3) hr(1,0.75,0.5) np(3) ng(3) recrt(2 0,1,0) trend(1) distant(0) detail(0) onesided(0) ni(0) tunit(1)

. artsurv, method(l) edf0(0.8 0.5, 1 3) hr(1,0.6 0.6 0.75) np(3) recrt(2 0,1,0) distant(0) detail(0) onesided(0) ni(0) tunit(1)

(treatment effect changes over time)

. artsurv using myres, method(l) edf0(0.8 0.5, 1 3) hr(1,0.6 0.6 0.75) np(3) recrt(2 0,1,0) distant(0) detail(0) onesided(0) ni(0) tunit(1)

(saves survival probabilities and hazard ratios in 3 periods to myres.dta)

. artsurv, method(l) edf0(0.5) hr(1,0.75) np(3) lg(1 2) ldf(.1;.1) recrt(2 0,1,0) distant(0) detail(0) onesided(0) ni(0) tunit(1)

(10% lost to follow-up by end of study)

. artsurv, method(l) edf0(0.5) hr(1,0.75) np(3) lg(1 2) ldf(.1;.1) wg(1 2) wdf(.3;.1) recrt(2 0,1,0) distant(0) detail(0) onesided(0) ni(0) tunit(1)

(30% of group 1 and 10% of group 2 crossover by end of study)

Authors

Abdel Babiker, MRC Clinical Trials Unit at UCL

Ab Babiker

Friederike Maria-Sophie Barthel, formerly MRC Clinical Trials Unit

Sophie Barthel

Babak Choodari-Oskooei, MRC Clinical Trials Unit at UCL

Babak Oskooei

Patrick Royston, MRC Clinical Trials Unit at UCL

Patrick Royston

Reference

Barthel, F. M.-S., Babiker, A., Royston, P., and M. K. B. Parmar. 2006.
Evaluation of sample size and power for multi-arm survival trials
allowing for non-uniform accrual, non-proportional hazards, loss to
follow-up and cross-over. Statistics in Medicine 25: 2521-2542.

Also see

Manual: [R] sampsi, [R] stpower

Online: help for artmenu, artbin, artpep, artsurvdlg, artbindlg