###############################################
## Example 1. Single-agent Phase I Trial ##
###############################################
# Obtain operating characteristics
get.oc(target=0.3, p.true=c(0.05, 0.15, 0.3, 0.45, 0.6), ncohort=10,
cohortsize=3, ntrial=1000)
# Obtain dose escalation boundaries for trial conduct
get.boundary(target=0.3, ncohort=10, cohortsize=3)
# Select the MTD when the trial is completed
n<-c(3, 3, 15, 9, 0)
y<-c(0, 0, 4, 4, 0)
select.mtd(target=0.3, npts=n, ntox=y)
#########################################################
## Example 2. A 3x5 Drug-combination Phase I Trial ##
#########################################################
# Obtain operating characteristics
p.true = matrix(c(0.05,0.10,0.15,0.30,0.45, 0.10,0.15,0.30,0.45,0.55,
0.15,0.30,0.45,0.50,0.60), ncol=5, byrow=TRUE)
get.oc.comb(target=0.3, p.true, ncohort=40, cohortsize=1, ntrial=1000)
# Obtain dose escalation boundaries for trial conduct
get.boundary(target=0.3, ncohort=40, cohortsize=1)
# make the decision of dose escalation/deescalation during the course of trial conduct
# matrix n contains the number of patients treated at each dose combination
# matrix y contains the number of patients experienced toxicity at each dose combination
n<-matrix(c(3, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 0), ncol=5, byrow=TRUE)
y<-matrix(c(0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), ncol=5, byrow=TRUE)
conduct.comb(target=0.3, npts=n, ntox=y, dose.curr=c(2, 2))
# Select the MTD when the combination trial is completed
n<-matrix(c(3, 5, 0, 0, 0, 7, 6, 15, 0, 0, 0, 0, 4, 0, 0), ncol=5, byrow=TRUE)
y<-matrix(c(0, 1, 0, 0, 0, 1, 1, 4, 0, 0, 0, 0, 2, 0, 0), ncol=5, byrow=TRUE)
select.mtd.comb(target=0.3, npts=n, ntox=y)
Run the code above in your browser using DataLab