-
Notifications
You must be signed in to change notification settings - Fork 4
/
boin.R
48 lines (48 loc) · 2.13 KB
/
boin.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#' @name Boin-class
#' @title The BOIN design as a Cumulative-Cohort Design (CCD) subclass
#'
#' @details
#' TODO: Provide references, and note clearly the choice of defaults.
#' Also provide citations to BOIN paper(s).
#' @importFrom R6 R6Class
#' @importFrom BOIN get.boundary select.mtd
#' @export
Boin <- R6Class("Boin",
inherit = Ccd,
public = list(
#' @details
#' Create a new `Boin` object.
#'
#' @param target Target toxicity rate
#' @param cohort_max Upper bound on dose-wise enrollment
#' @param enroll_max Upper bound on total enrollment
#' @return A Boin object.
#'
#' @examples
#' # TODO
initialize = function(target, cohort_max, enroll_max) {
private$target <- target
bdy <- get.boundary(target = target
,ncohort = enroll_max
,cohortsize = 1 # TODO: Allow larger cohorts?
,n.earlystop = cohort_max
,extrasafe = FALSE
,offset = 0.05
)$boundary_tab
super$initialize(escalate = bdy[2,]
,deescalate = bdy[3,]
,eliminate = bdy[4,]
,cohort_max = cohort_max
,enroll_max = enroll_max
)
} #</initialize>
## TODO: Obtain the *final* BOIN dose recommendations
## via BOIN:select.mtd(). Note that this seems to
## require a general design making a distinction
## between dose-escalation decisions OT1H, and
## FINAL dose recommendations OTOH.
), # </public>
private = list(
target = NA
)
)