View source: R/simtrials.surv.R
simtrials.surv | R Documentation |
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.
simtrials.surv(rule, p, MC, A, s = 1)
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) |
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.
## Not run:
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))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.