# \donttest{
### Single-agent trial ###
## Summarize the object returned by get.oc.kb()
oc.single <- get.oc.kb(target=0.3, p.true=c(0.05, 0.15, 0.3, 0.45, 0.6),
ncohort=10, cohortsize=3, ntrial=1000)
summary_kb(oc.single)
## Summarize the object returned by select.mtd.kb()
n <- c(3, 3, 15, 9, 0)
y <- c(0, 0, 4, 4, 0)
sel.single <- select.mtd.kb(target=0.3, npts=n, ntox=y)
summary_kb(sel.single)
## Summarize the object returned by select.mtd.comb.kb()
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.comb <- select.mtd.comb.kb(target=0.25, npts=n, ntox=y)
summary_kb(sel.comb)
## Summarize the object returned by next.comb.kb()
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.kb(target=0.25, npts=n, ntox=y, dose.curr=c(1, 1))
summary_kb(nxt.comb)
## get.oc.obd
toxicity.low <- 0.15
toxicity.moderate <- 0.25
toxicity.high <- 0.35
efficacy.low <- 0.25
efficacy.moderate <- 0.45
efficacy.high <- 0.65
target.toxicity<-0.20
target.efficacy<-0.40
p.true <-c(0.08,0.20,0.60,0.80)
q.true <- c(0.25,0.40,0.25,0.50)
oc.obd.kb <- get.oc.obd.kb(toxicity.low = toxicity.low,
toxicity.moderate= toxicity.moderate,
toxicity.high = toxicity.high,
efficacy.low = efficacy.low,
efficacy.moderate = efficacy.moderate,
efficacy.high = efficacy.high,
target.toxicity=target.toxicity,
target.efficacy= target.efficacy,
p.true= p.true, q.true= q.true)
summary_kb(oc.obd.kb)
## OBD selection
target.toxicity<-0.3
target.efficacy<-0.4
npts <- c(3,6,12,3,3)
ntox <- c(1,2,4,2,3)
neff <- c(0,0,5,1,1)
obd <- select.obd.kb (target.toxicity=target.toxicity,
target.efficacy= target.efficacy, npts = npts,
ntox = ntox, neff = neff)
summary_kb(obd)
# }
Run the code above in your browser using DataLab