### Scenario 1 in Yuan et al. (2007) and Pan et al. (2014)
target <- 0.47
score <- c(0, 0.5, 1, 1.5)
cohortsize <- 3
ncohort <- 10
ntrial <- 10
ptox <- matrix(nrow = 4, ncol = 6)
ptox[1,] <- c(0.83, 0.75, 0.62, 0.51, 0.34, 0.19)
ptox[2,] <- c(0.12, 0.15, 0.18, 0.19, 0.16, 0.11)
ptox[3,] <- c(0.04, 0.07, 0.11, 0.14, 0.15, 0.11)
ptox[4,] <- c(0.01, 0.03, 0.09, 0.16, 0.35, 0.59)
### specify one skeleton (Quasi-CRM design)
p1 <- c(0.11, 0.25, 0.40, 0.55, 0.75, 0.85)
get_oc_RQ_CRM(ptox = ptox, skeletons = p1, target = target,
score = score, cohortsize = cohortsize,
ncohort = ncohort, ntrial = ntrial)
###########################################
### specify three skeletons (Quasi-CRM design)
p1 <- c(0.11, 0.25, 0.40, 0.55, 0.75, 0.85)
p2 <- c(0.05, 0.10, 0.15, 0.25, 0.40, 0.65)
p3 <- c(0.20, 0.40, 0.60, 0.75, 0.85, 0.95)
skeletons <- rbind(p1, p2, p3)
get_oc_RQ_CRM(ptox = ptox, skeletons = skeletons, target = target,
score = score, cohortsize = cohortsize,
ncohort = ncohort, ntrial = ntrial)
Run the code above in your browser using DataLab