target <- 3.344
ncohort <- 10
cohortsize <- 3
ntrial <- 1000
rate <- 1.1
weight <- rate * rbind(c(0,1,1.5,5,6), c(0,2.5,6,rep(0,2)), c(0,2,3,6,0),
c(0,1.5,2,0,0), c(0,0.5,1,0,0))
pmat <- list()
pmat[[1]] <- rbind(c(0.5,0.5,rep(0,3)),
c(1,rep(0,4)),
c(1,rep(0,4)),
c(1,rep(0,4)),
c(0.5,0,0.5,0,0))
pmat[[2]] <- rbind(c(0.5,0,0.5,0,0),
c(1,rep(0,4)),
c(0.5,0.5,0,0,0),
c(0.5,0.5,rep(0,3)),
c(0.46,0,0.54,rep(0,2)))
pmat[[3]] <- rbind(c(0.5,0,0.5,0,0),
c(0.4,0.6,0,0,0),
c(0.25,0.75,0,0,0),
c(0.5,0.5,0,0,0),
c(1,0,0,0,0))
pmat[[4]] <- rbind(c(0.5,0,0.5,0,0),
c(0.4,0.6,0,0,0),
c(0.25,0.75,0,0,0),
c(0.5,0.5,0,0,0),
c(0.5,0,0.5,0,0))
pmat[[5]] <- rbind(c(0.5,0,0.5,0,0),
c(0,1,0,0,0),
c(0.25,0.75,0,0,0),
c(0.5,0.5,0,0,0),
c(0.5,0,0.5,0,0))
pmat[[6]] <- rbind(c(0,0.5,0.5,0,0),
c(0,1,0,0,0),
c(0,1,0,0,0),
c(0.5,0.5,0,0,0),
c(0.5,0,0.5,0,0))
pmat[[7]] <- rbind(c(0,0.5,0.5,0,0),
c(0,1,0,0,0),
c(0,1,0,0,0),
c(0,0.5,0.5,0,0),
c(0.5,0,0.5,0,0))
pmat[[8]] <- rbind(c(0,0.5,0.5,0,0),
c(0,1,0,0,0),
c(0,0,1,0,0),
c(0,0.5,0.5,0,0),
c(0.5,0,0.5,0,0))
pmat[[9]] <- rbind(c(0,0,1,0,0),
c(0,1,0,0,0),
c(0,0,1,0,0),
c(0,0,1,0,0),
c(0,0,1,0,0))
pmat[[10]] <- rbind(c(0,0,1,0,0),
c(0,1,0,0,0),
c(1/3,0,0,2/3,0),
c(0,0,1,0,0),
c(0,0,1,0,0))
get_oc_gBOIN_TB(target = target, pmat = pmat, weight = weight,
ncohort = ncohort, cohortsize = cohortsize,
ntrial = ntrial)
Run the code above in your browser using DataLab