simtrials.surv {stoppingrule} | R Documentation |
Simulate trials with safety monitoring by survival data stopping rules
Description
Internal workhorse function used to simulate trials with safety monitoring by
survival data stopping rules. The provided stopping rule
is used for
monitoring of MC
simulated trials. For each trial, a random sample is
generated from a Weibull distribution with shape parameter s
to attain
a toxicity rate of p
. Enrollment times are simulated over an accrual
period of duration A
under a uniform (0,A
) distribution.
Usage
simtrials.surv(rule, p, MC, A, s = 1)
Arguments
rule |
A |
p |
The probability of a toxicity occurring in |
MC |
Number of Monte Carlo replicated datasets to simulate |
A |
Length of accrual period |
s |
Shape parameter for the Weibull distribution; default value is 1 (exponential distribution) |
Value
A matrix with MC
rows and 14 columns, one row per simulated
trial. Columns include the stopping rule type and design parameters,
the numbers of events and enrolled patients, the total follow-up time
in the cohort, the calendar time when the study ends, the reject/no reject
decision, and the last stage of monitoring reached when the study ends.
Examples
set.seed(13)
wt_rule = calc.rule.surv(n=46,p0=0.15,alpha=0.10,type="WT",tau=100,param=0.25)
sims = simtrials.surv(rule=wt_rule,p=0.15,MC=1000,A=1095)
c(mean(sims$stopped),mean(sims$n.Toxicity),mean(sims$n.Enrolled),mean(sims$Calendar.Time))
sims = simtrials.surv(rule=wt_rule,p=0.35,MC=1000,A=1095)
c(mean(sims$stopped),mean(sims$n.Toxicity),mean(sims$n.Enrolled),mean(sims$Calendar.Time))
gp_rule = calc.rule.surv(n=46,p0=0.15,alpha=0.10,type="GP",tau=100,param=11.5*c(-log(1-0.15),100))
sims = simtrials.surv(rule=gp_rule,p=0.15,MC=1000,A=1095)
c(mean(sims$stopped),mean(sims$n.Toxicity),mean(sims$n.Enrolled),mean(sims$Calendar.Time))
sims = simtrials.surv(rule=gp_rule,p=0.35,MC=1000,A=1095)
c(mean(sims$stopped),mean(sims$n.Toxicity),mean(sims$n.Enrolled),mean(sims$Calendar.Time))