#################################################################### ################ Example Code for BOIN package ######################### #################################################################### ################# install and load BOIN package ################## if (!require("BOIN")) { install.packages("BOIN") library("BOIN") } #################################################################### ####################### Examples in Section 3 ########################### #################################################################### ####################### Single-agent trials ######################## # Step 1: Obtain dose escalation and de-escalation boundaries bound <- get.boundary(target = 0.3, ncohort = 10, cohortsize = 3) summary(bound) plot(bound) # generate the flowchart of the BOIN design # a stricter stopping rule for extra safety bound2 <- get.boundary(target = 0.3, ncohort = 10, cohortsize = 3, extrasafe = TRUE) summary(bound2) # Step 2: Simulate operating characteristics oc.single <- get.oc(target = 0.3, p.true = c(0.05, 0.15, 0.3, 0.45, 0.6), ncohort = 10, cohortsize = 3, ntrial = 1000) summary(oc.single) plot(oc.single) # this will plot the flowhart of the BOIN design, selection percentage, patient allocation, and observed toxicity # Step 3: Select the MTD n <- c(3, 3, 15, 9, 0) y <- c(0, 0, 4, 4, 0) sel.single <- select.mtd(target = 0.3, ntox = y, npts = n) summary(sel.single) plot(sel.single) # plot estimate of DLT rate ###### Drug-combination trials aiming to find a single MTD ######### # Step 1: Determine dose escalation and de-escalation set.seed(4) n <- matrix(c(3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ncol = 4, byrow = TRUE) y <- matrix(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ncol = 4, byrow = TRUE) nxt.comb <- next.comb(target = 0.25, npts = n, ntox = y, dose.curr = c(1, 1)) summary(nxt.comb) ##### the recommended dose combination for the next cohort of patients is ( 1 , 2 ) n <- matrix(c(3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ncol = 4, byrow = TRUE) y <- matrix(c(0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ncol = 4, byrow = TRUE) nxt.comb2 <- next.comb(target = 0.25, npts = n, ntox = y, dose.curr = c(1, 2)) summary(nxt.comb2) # Step 2: Simulate operating characteristics p.true <- matrix(c(0.02, 0.04, 0.08, 0.14, 0.08, 0.25, 0.42, 0.48, 0.25, 0.45, 0.50, 0.60), ncol = 4, byrow = TRUE) oc.comb <- get.oc.comb(target = 0.25, p.true = p.true, ncohort = 16, cohortsize = 3, ntrial = 1000) summary(oc.comb) plot(oc.comb) # plot figure illustrating dose escalation and de-escalation, the percentage of correct selection, number of patients treated, and number of toxicity observed # Step 3: Select a MTD n <- matrix(c(6, 3, 0, 0, 6, 24, 9, 0, 0, 0, 0, 0), ncol = 4, byrow = TRUE) y <- matrix(c(0, 0, 0, 0, 1, 5, 4, 0, 0, 0, 0, 0), ncol = 4, byrow = TRUE) sel.mtd.comb <- select.mtd.comb(target = 0.25, npts = n, ntox = y) summary(sel.mtd.comb) plot(sel.mtd.comb) # plot the estimated DLT rate ##### Drug-combination trials aiming to find the MTD contour ######## # Step 1: Obtain dose escalation and de-escalation boundaries and determine subtrials n <- matrix(c(6, 0, 0, 0, 6, 0, 0, 0, 9, 12, 0, 0), ncol = 4, byrow = TRUE) y <- matrix(c(0, 0, 0, 0, 1, 0, 0, 0, 2, 3, 0, 0), ncol = 4, byrow = TRUE) nxt.trial <- next.subtrial(target = 0.3, npts = n, ntox = y) summary(nxt.trial) # Step 2: Simulate operating characteristics p.true <- matrix(c(0.01, 0.03, 0.10, 0.20, 0.30, 0.03, 0.05, 0.15, 0.30, 0.60, 0.08, 0.10, 0.30, 0.60, 0.75), nrow = 3, ncol = 5, byrow = TRUE) oc.comb2 <- get.oc.comb(target = 0.3, p.true, ncohort = c(10, 5, 5), cohortsize = 3, n.earlystop = 12, startdose = c(1, 1), ntrial = 1000, mtd.contour = TRUE) summary(oc.comb2) plot(oc.comb2) #plot the figure illustrating waterfall design, the percentage of correct selection, patient allocation, and observed toxicity #Step 3: Select the MTD contour n <- matrix(c(6, 9, 24, 0, 6, 24, 9, 0, 12, 18, 0, 0), ncol = 4, byrow = TRUE) y <- matrix(c(0, 1, 5, 0, 1, 5, 4, 0, 1, 5, 0, 0), ncol = 4, byrow = TRUE) sel.comb2 <- select.mtd.comb(target = 0.3, npts = n, ntox = y, mtd.contour = TRUE) summary(sel.comb2) plot(sel.comb2) # plot estimated DLT rate #################################################################### ################## Trial Examples in Section 4 ############################# #################################################################### ################### Single-agent phase I trial ##################### # dose escalation and de-escalation boundaries bound <- get.boundary(target = 0.3, ncohort = 10, cohortsize = 3) summary(bound) plot(bound) # Select the MTD n <- c(3, 6, 18, 3, 0) y <- c(0, 1, 5, 3, 0) sel.single <- select.mtd(target = 0.3, ntox = y, npts = n) summary(sel.single) ########## Drug-combination trial to find a single MTD ############# # determine the dose for the second cohort of patients set.seed(4) n <- matrix(c(3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3, ncol = 5, byrow = TRUE) y <- matrix(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3, ncol = 5, byrow = TRUE) nxt.comb <- next.comb(target = 0.3, npts = n, ntox = y, dose.curr = c(1, 1)) summary(nxt.comb) # determine the dose for the third cohort of patients n <- matrix(c(3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3, ncol = 5, byrow = TRUE) y <- matrix(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3, ncol = 5, byrow = TRUE) nxt.comb2 <- next.comb(target = 0.3, npts = n, ntox = y, dose.curr = c(1, 2)) summary(nxt.comb2) # at the end of the trial, select the MTD n <- matrix(c(3, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 12, 6, 0), nrow = 3, ncol = 5, byrow = TRUE) y <- matrix(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0), nrow = 3, ncol = 5, byrow = TRUE) sel.comb <- select.mtd.comb(target = 0.3, npts = n, ntox = y) summary(sel.comb) ########## Drug-combination trial to find the MTD contour ########### # the first subtrial n <- matrix(c(6, 0, 0, 0, 0, 6, 0, 0, 0, 0, 9, 12, 0, 0, 0), ncol = 5, byrow = TRUE) y <- matrix(c(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 3, 0, 0, 0), ncol = 5, byrow = TRUE) nxt.trial <- next.subtrial(target = .25, npts = n, ntox = y) summary(nxt.trial) # the second subtrial n <- matrix(c(6, 0, 0, 0, 0, 6, 0, 3, 12, 0, 9, 12, 0, 0, 0), ncol = 5, byrow = TRUE) y <- matrix(c(0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 1, 3, 0, 0, 0), ncol = 5, byrow = TRUE) nxt.trial2 <- next.subtrial(target = .25, npts = n, ntox = y) summary(nxt.trial2) # select MTD contour n <- matrix(c(6, 0, 0, 6, 12, 6, 0, 3, 12, 0, 9, 12, 0, 0, 0), ncol = 5, byrow = TRUE) y <- matrix(c(0, 0, 0, 1, 3, 1, 0, 0, 3, 0, 1, 3, 0, 0, 0), ncol = 5, byrow = TRUE) sel.comb2 <- select.mtd.comb(target = 0.25, npts = n, ntox = y, mtd.contour = TRUE) summary(sel.comb2) plot(sel.comb2)