dlt_rate: Evaluation of the DLT rate

Description Usage Arguments Value Examples

View source: R/operating_characteristics.R

Description

Calculate the DLT rate for each trial, the average DLT rate, the percent of trials which have DLT rate > target_rate + margin, the percent of trials which have DLT rate < target_rate - margin and the percent of trials which have target_rate - margin < DLT rate < target_rate + margin.

Usage

1
2
dlt_rate(dlt_matrix, trial = FALSE, target_rate = NULL,
  margin = NULL, digits = 2)

Arguments

dlt_matrix

a matrix of the number of DLT for each step of the trial (column) and for each trial (row).

trial

a logical value indicating if the DLT rate for each trial should be returned.

target_rate

a numerical value of the target rate of DLT.

margin

a numerical value of the acceptable distance from the target_rate.

digits

a numerical value indicating the number of digits.

Value

trial a numerical vector of the DLT rate for each trial.

average a numerical value of the average of DLT rate considering a batch of trials.

upper the percent of trials which the DLT rate > target_rate + margin if margin != NULL and target_rate != NULL.

lower the percent of trials which the DLT rate < target_rate - margin if margin != NULL and target_rate != NULL.

interval the percent of trials which the target_rate - margin < DLT rate < target_rate + margin if margin != NULL and target_rate != NULL.

Examples

 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
## Not run: 
DLT <- 0
dose <- 30
step_zero <- ewoc_d1classic(DLT ~ dose, type = 'discrete',
                           theta = 0.33, alpha = 0.25,
                           min_dose = 0, max_dose = 100,
                           dose_set = seq(0, 100, 20),
                           rho_prior = matrix(1, ncol = 2, nrow = 1),
                           mtd_prior = matrix(1, ncol = 2, nrow = 1),
                           rounding = "nearest")
stop_rule_sim(step_zero)
response_sim <- response_d1classic(rho = 0.05, mtd = 20, theta = 0.33,
                                  min_dose = 10, max_dose = 50)
sim <- ewoc_simulation(step_zero = step_zero,
                       n_sim = 1, sample_size = 2,
                       alpha_strategy = "increasing",
                       response_sim = response_sim,
                       stop_rule_sim = stop_rule_sim,
                       ncores = 2)
dlt_rate(sim$dlt_sim)

## End(Not run)

## Not run: 
DLT <- 0
dose <- 30
step_zero <- ewoc_d1classic(DLT ~ dose, type = 'discrete',
                           theta = 0.33, alpha = 0.25,
                           min_dose = 0, max_dose = 100,
                           dose_set = seq(0, 100, 20),
                           rho_prior = matrix(1, ncol = 2, nrow = 1),
                           mtd_prior = matrix(1, ncol = 2, nrow = 1),
                           rounding = "nearest")
stop_rule_sim(step_zero)
response_sim <- response_d1classic(rho = 0.05, mtd = 20, theta = 0.33,
                                  min_dose = 10, max_dose = 50)
sim <- ewoc_simulation(step_zero = step_zero,
                       n_sim = 2, sample_size = 30,
                       alpha_strategy = "increasing",
                       response_sim = response_sim,
                       stop_rule_sim = stop_rule_sim,
                       ncores = 2)
dlt_rate(sim$dlt_sim)

## End(Not run)

dnzmarcio/ewoc documentation built on July 13, 2019, 10:05 a.m.