## Dose-escalation cancer trial example as described in Neuenschwander et al 2008.
## Pre-defined doses
dose<-c(1,2.5,5,10,15,20,25,30,40,50,75,100,150,200,250)
## Pre-specified probabilities of toxicity
## [dose levels 11-15 not specified in the paper, and are for illustration only]
p.tox0<-c(0.010,0.015,0.020,0.025,0.030,0.040,0.050,0.100,0.170,0.300,0.400,0.500,0.650
,0.800,0.900)
## Data from the first 5 cohorts of 18 patients
tox<-c(0,0,0,0,0,0,2,0,0,0,0,0,0,0,0)
notox<-c(3,4,5,4,0,0,0,0,0,0,0,0,0,0,0)
## Target toxicity level
target.tox<-0.30
## A 1-parameter power model is used, with standardised doses calculated using
## the plug-in prior median
## Prior for alpha is lognormal with mean 0 (on log scale)
## and standard deviation 1.34 (on log scale)
## The recommended dose for the next cohort if posterior mean is used
Power.LN.bcrm<-bcrm(N=18,tox=tox,notox=notox,p.tox0=p.tox0,dose=dose,ff="power"
,prior.alpha=list(3,0,1.34^2),target.tox=target.tox,constrain=FALSE
,sdose.calculate="median",pointest="mean")
print(Power.LN.bcrm)
plot(Power.LN.bcrm)
## Simulate 10 replicate trials of size 36 (cohort size 3) using this design
## with constraint (i.e. no dose-skipping) and starting at lowest dose
## True probabilities of toxicity are set to pre-specified probabilities (p.tox0)
Power.LN.bcrm.sim<-bcrm(N=36,p.tox0=p.tox0,dose=dose,ff="power"
,prior.alpha=list(3,0,1.34^2),target.tox=target.tox,constrain=TRUE
,sdose.calculate="median",pointest="mean",start=1,simulate=TRUE,nsims=10,truep=p.tox0)
print(Power.LN.bcrm.sim)Run the code above in your browser using DataLab