condpowcure | R Documentation |
Performs a simulation to calculate conditional power of a logrank test in a group sequential experiment with failure times generated from a cure rate model.
condpowcure(
time,
status,
rx,
nsamp = 500,
crit.val = 1.96,
control = 0,
control.cure,
control.rate,
test.cure,
test.rate,
inf.time = 1,
total.inf,
add.acc = 0,
add.acc.period,
p.con = 0.5
)
time |
Failure/censoring times in the current data |
status |
failure indicator for current data (1=failure, 0=censored) |
rx |
treatment variable in current data |
nsamp |
number of samples to generate in the simulation |
crit.val |
critical values to be used at future analyses |
control |
the code of |
control.cure |
the cure fraction in the control group |
control.rate |
the failure rate in the conditional exponential distribution for non-cured subjects in the control group |
test.cure |
the cure fraction in the experimental treatment group |
test.rate |
the failure rate in the conditional exponential distribution for non-cured subjects in the experimental treatment group |
inf.time |
information times of future analyses |
total.inf |
Number of failures at full information |
add.acc |
Additional number of cases that will be accrued |
add.acc.period |
Duration of time over which the |
p.con |
The proportion randomized to the control group |
Adds add.acc
cases and generates additional follow-up for subjects
already entered but censored in the current data. Failure times are
generated from exponential cure rate models, with fractions
control.cure
and test.cure
that will never fail and
exponential distributions for the failure times of those who will eventually
fail.
Additional interim analyses are performed when inf.time * total.inf
failures are observed. The critical values used for rejecting
the null at these additional interim analyses are specified in
crit.value
. The number of additional analyses is the length of
inf.time
and crit.value
. The information of the current data
should not be included. Full information (inf.time = 1
) must be
explicitly included. Information times should be in increasing order.
After generating the additional data, the function performs the interim
analyses, and determines whether the upper boundary is crossed. This is
repeated nsamp
times, giving an estimate of the probability of
eventually rejecting the null under the specified distributions, conditional
on the current data. Low conditional power under the target alternative for
the study might be justification for stopping early.
It is very important that consistent time units be used for all arguments and for the current data.
Returns the proportion of samples where the upper boundary was crossed, and its simulation standard error. Also prints the value of the logrank statistic for the current data.
Jennison and Turnbull (1990). Statistical Science 5:299-317.
Betensky (1997). Biometrics, 53:794-806.
condpow
; sequse
; acondpow
## current data
set.seed(3)
ft <- c(ifelse(runif(100) < 0.6, rexp(100), 100), ifelse(runif(100) < 0.55,
rexp(100) / 0.95, 100))
ct <- runif(200) * 4
fi <- ifelse(ct < ft, 0, 1)
ft <- pmin(ft, ct)
rx <- c(rep(0, 100), rep(1, 100))
## currently at 0.375 information -- assume no prior interim analyses
critv <- sequse(c(0.375, 0.7, 1))[-1]
condpowcure(ft, fi, rx, nsamp = 10, crit.val = critv, control.cure = 0.4,
control.rate = 1, test.cure = 0.6, test.rate = 0.75,
inf.time = c(0.7, 1), total.inf = 200, add.acc = 200, add.acc.period = 1)
## Not run:
## use larger nsamp in practice:
condpowcure(ft, fi, rx, nsamp = 1000, crit.val = critv, control.cure = 0.4,
control.rate = 1, test.cure = 0.6, test.rate = 0.75,
inf.time = c(0.7, 1), total.inf = 200, add.acc = 200, add.acc.period = 1)
## Observed Z = 1.43
## [1] 0.958
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.