Type: | Package |
Title: | Comprehensive Tools for Running Model-Assisted Phase I/II Trial Simulations |
Version: | 0.3.1 |
Author: | Angela Cao [aut, cre], Haolun Shi [ctb] |
Maintainer: | Angela Cao <cao.t.angela@gmail.com> |
Description: | Provides a comprehensive set of tools to simulate, evaluate, and compare model-assisted designs for early-phase (Phase I/II) clinical trials, including: - BOIN12 (Bayesian optimal interval phase 1/11 trial design; Lin et al. (2020) <doi:10.1200/PO.20.00257>), - BOIN-ET (Takeda, K., Taguri, M., & Morita, S. (2018) <doi:10.1002/pst.1864>), - EffTox (Thall, P. F., & Cook, J. D. (2004) <doi:10.1111/j.0006-341X.2004.00218.x>), - Ji3+3 (Joint i3+3 design; Lin, X., & Ji, Y. (2020) <doi:10.1080/10543406.2020.1818250>), - PRINTE (probability intervals of toxicity and efficacy design; Lin, X., & Ji, Y. (2021) <doi:10.1177/0962280220977009>), - STEIN (simple toxicity and efficacy interval design; Lin, R., & Yin, G. (2017) <doi:10.1002/sim.7428>), - TEPI (toxicity and efficacy probability interval design; Li, D. H., Whitmore, J. B., Guo, W., & Ji, Y. (2017) <doi:10.1158/1078-0432.CCR-16-1125>), - uTPI (utility-based toxicity Probability interval design; Shi, H., Lin, R., & Lin, X. (2024) <doi:10.1002/sim.8922>). Includes flexible simulation parameters that allow researchers to efficiently compute operating characteristics under various fixed and random trial scenarios and export the results. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
Imports: | trialr, Iso |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
RoxygenNote: | 7.3.2.9000 |
NeedsCompilation: | no |
Packaged: | 2025-08-27 21:35:29 UTC; angela |
Repository: | CRAN |
Date/Publication: | 2025-09-02 06:30:02 UTC |
Decision map plot
Description
This function creates a decision plot containing customizable decision zones.
Usage
decision_plot(
filename,
filetype = c("png", "pdf", "svg"),
xlab = "Toxicity Probability",
ylab = "Efficacy Probability",
x_breaks = c(0, 1),
y_breaks = c(0, 1),
x_labels = c(0, 1),
y_labels = c(0, 1),
zones = list(),
legend_info = list(labels = NULL, colors = NULL),
title = NULL,
title_pos = c(0.05, 1.1),
legend_pos = c(0.3, 1.2),
grid_lines = TRUE,
plot_size = c(7, 7)
)
Arguments
filename |
File path. |
filetype |
File type. |
xlab |
x-axis label. (Default is "Toxicity Probability") |
ylab |
y-axis label. (Default is "Efficacy Probability") |
x_breaks |
Numeric vector for x-axis major ticks. (Default is 'c(0, 1') |
y_breaks |
Numeric vector for y-axis major ticks. (Default is 'c(0, 1') |
x_labels |
Labels corresponding to |
y_labels |
Labels corresponding to |
zones |
A list of rectangular zones to draw, where each rectangle is a list with elements |
legend_info |
A list with two elements: |
title |
Title of plot. (Default is 'NULL') |
title_pos |
A numeric vector (x, y) indicating the position of the title text. |
legend_pos |
A numeric vector (x, y) indicating the position of the legend. |
grid_lines |
Whether to include background grid lines. (Default is TRUE.) |
plot_size |
A numeric vector indicating width and height. (Default is c(7, 7)). |
Value
No return value, called for side effects.
Examples
zones <- list(list(xmin = 0.0, xmax = 0.2, ymin = 0, ymax = 1.0, color = "#a8eea8"),
list(xmin = .2, xmax = .3, ymin = 0, ymax = 0.6, color = "#a8eea8"),
list(xmin = .2, xmax = .3, ymin = .6, ymax = 1, color = "#a8d5ee"))
tmpfile <- tempfile(fileext = ".png")
decision_plot(tmpfile, filetype = "png", zones = zones, title = "Decision Zones")
Compute operating characteristics using BOIN12
Description
oc_boin12()
uses the BOIN12 design to compute operating charateristics of a user-specificed trial scenario.
This design places significance on optimizing utility and the toxicity–efficacy trade-off.
Usage
oc_boin12(
ndose,
target_t,
lower_e,
ncohort = 10,
cohortsize = 3,
startdose = 1,
OBD = 0,
psafe = 0.95,
pfutility = 0.95,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
ncohort |
Integer. Number of cohorts. (Default is |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
OBD |
Integer. True index of the Optimal Biological Dose (OBD) for the trial scenario. (Default is 0)
|
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list of the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
Value
A list containing operating characteristics such as:
- bd.sel
OBD selection percentage
- od.sel
Favorable dose selection percentage
- bd.pts
Average percentage of patients at the OBD
- od.pts
Average percentage of patients at the favorable doses
- earlystop
Percentage of early stopped trials
- overdose
Overdose patients percentage
- poorall
Poor allocation percentage
- ov.sel
Overdose selection percentage
Examples
oc_boin12(
ndose = 5,
target_t = 0.3,
lower_e = 0.4,
ntrial = 10,
)
Compute operating characteristics using BOINET
Description
oc_boinet()
uses the BOINET design to compute operating charateristics of a user-specificed trial scenario.
This design uses target toxicity and efficacy rates jointly to form the cutoff intervals within a decision map.
Usage
oc_boinet(
ndose,
target_t,
lower_e,
ncohort = 10,
cohortsize = 3,
startdose = 1,
OBD = 0,
psafe = 0.95,
pfutility = 0.95,
ntrial = 10000,
utilitytype = 1,
prob = NULL
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
ncohort |
Integer. Number of cohorts. (Default is |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
OBD |
Integer. True index of the Optimal Biological Dose (OBD) for the trial scenario. (Default is 0)
|
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list with the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
Value
A list containing operating characteristics such as:
- bd.sel
OBD selection percentage
- od.sel
Favorable dose selection percentage
- bd.pts
Average percentage of patients at the OBD
- od.pts
Average percentage of patients at the favorable doses
- earlystop
Percentage of early stopped trials
- overdose
Overdose patients percentage
- poorall
Poor allocation percentage
- ov.sel
Overdose selection percentage
Examples
oc_boinet(
ndose = 5,
target_t = 0.3,
lower_e = 0.4,
ntrial = 10,
)
Compute operating characteristics using EffTox
Description
oc_efftox()
uses the EffTox design to compute operating charateristics of a user-specificed trial scenario.
This design uses toxicity–efficacy trade-off contours.
Usage
oc_efftox(
ndose,
target_t,
lower_e,
ncohort = 10,
startdose = 1,
OBD = 0,
ntrial = 10000,
utilitytype = 1,
prob = NULL
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
ncohort |
Integer. Number of cohorts. (Default is |
startdose |
Integer. Starting dose level. (Default is |
OBD |
Integer. True index of the Optimal Biological Dose (OBD) for the trial scenario. (Default is 0)
|
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list of the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
Value
A list containing operating characteristics such as:
- bd.sel
OBD selection percentage
- od.sel
Favorable dose selection percentage
- bd.pts
Average percentage of patients at the OBD
- od.pts
Average percentage of patients at the favorable doses
- earlystop
Percentage of early stopped trials
- overdose
Overdose patients percentage
- poorall
Poor allocation percentage
- ov.sel
Overdose selection percentage
Examples
oc_efftox(
ndose = 2,
target_t = 0.3,
lower_e = 0.4,
ntrial = 1,
)
Compute operating characteristics using Ji3+3
Description
oc_ji3p3()
uses the Ji3+3 design to compute operating charateristics of a user-specificed trial scenario.
This design compares observed efficacy and toxicity with predefined target rates.
Usage
oc_ji3p3(
ndose,
target_t,
target_e,
lower_e = 0.2,
ncohort = 10,
cohortsize = 3,
startdose = 1,
OBD = 0,
eps1 = 0.05,
eps2 = 0.05,
psafe = 0.95,
pfutility = 0.95,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
target_e |
Numeric. Target efficacy probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
ncohort |
Integer. Number of cohorts. (Default is |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
OBD |
Integer. True index of the Optimal Biological Dose (OBD) for the trial scenario. (Default is 0)
|
eps1 |
Numerical. Width of the subrectangle. |
eps2 |
Numerical. Width of the subreactangle. |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list of the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
Value
A list containing operating characteristics such as:
- bd.sel
OBD selection percentage
- od.sel
Favorable dose selection percentage
- bd.pts
Average percentage of patients at the OBD
- od.pts
Average percentage of patients at the favorable doses
- earlystop
Percentage of early stopped trials
- overdose
Overdose patients percentage
- poorall
Poor allocation percentage
- ov.sel
Overdose selection percentage
Examples
oc_ji3p3(
ndose = 5,
target_t = 0.3,
target_e = 0.35,
lower_e = 0.4,
ntrial = 10,
)
Compute operating characteristics using PRINTE
Description
oc_pite()
uses the PRINTE design to compute operating charateristics of a user-specificed trial scenario.
This design maps toxicity and efficacy intervals onto a decision table, forming 16 equal-area regions.
Usage
oc_pite(
ndose,
target_t,
target_e,
lower_e,
ncohort = 10,
cohortsize = 3,
startdose = 1,
OBD = 0,
eps1 = 0.05,
eps2 = 0.05,
psafe = 0.95,
pfutility = 0.95,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
target_e |
Numeric. Target efficacy probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
ncohort |
Integer. Number of cohorts. (Default is |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
OBD |
Integer. True index of the Optimal Biological Dose (OBD) for the trial scenario. (Default is 0)
|
eps1 |
Numerical. Width of the subrectangle. (Default is '0.05') |
eps2 |
Numerical. Width of the subreactangle. (Default is '0.05') |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list with the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
Value
A list containing operating characteristics such as:
- bd.sel
OBD selection percentage
- od.sel
Favorable dose selection percentage
- bd.pts
Average percentage of patients at the OBD
- od.pts
Average percentage of patients at the favorable doses
- earlystop
Percentage of early stopped trials
- overdose
Overdose patients percentage
- poorall
Poor allocation percentage
- ov.sel
Overdose selection percentage
Examples
oc_pite(
ndose = 5,
target_t = 0.3,
target_e = 0.35,
lower_e = 0.4,
ntrial = 10,
)
Compute operating characteristics using STEIN
Description
oc_stein()
uses the STEIN design to compute operating charateristics of a user-specificed trial scenario.
This design uses target toxicity and efficacy rates separately to form the cutoff intervals within a decision map.
Usage
oc_stein(
ndose,
target_t,
lower_e,
ncohort = 10,
cohortsize = 3,
startdose = 1,
OBD = 0,
psi1 = 0.2,
psi2 = 0.6,
psafe = 0.95,
pfutility = 0.9,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
ncohort |
Integer. Number of cohorts. (Default is |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
OBD |
Integer. True index of the Optimal Biological Dose (OBD) for the trial scenario. (Default is 0)
|
psi1 |
Numerical. Highest inefficacious efficacy probability. |
psi2 |
Numerical. Lowest highly-promising efficacy probability. |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list of the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
Value
A list containing operating characteristics such as:
- bd.sel
OBD selection percentage
- od.sel
Favorable dose selection percentage
- bd.pts
Average percentage of patients at the OBD
- od.pts
Average percentage of patients at the favorable doses
- earlystop
Percentage of early stopped trials
- overdose
Overdose patients percentage
- poorall
Poor allocation percentage
- ov.sel
Overdose selection percentage
Examples
oc_stein(
ndose = 5,
target_t = 0.3,
lower_e = 0.4,
ntrial = 10,
)
Compute operating characteristics using TEPI
Description
oc_tepi()
uses the TEPI design to compute operating charateristics of a user-specificed trial scenario.
This design maps toxicity and efficacy intervals onto a decision table, forming 16 regions.
Usage
oc_tepi(
ndose,
target_t,
lower_e,
ncohort = 10,
cohortsize = 3,
startdose = 1,
OBD = 0,
effint_l = c(0, lower_e, lower_e + 0.2, lower_e + 0.4),
effint_u = c(lower_e, lower_e + 0.2, lower_e + 0.4, 1),
toxint_l = c(0, 0.15, target_t, target_t + 0.05),
toxint_u = c(0.15, target_t, target_t + 0.05, 1),
psafe = 0.95,
pfutility = 0.95,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
ncohort |
Integer. Number of cohorts. (Default is |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
OBD |
Integer. True index of the Optimal Biological Dose (OBD) for the trial scenario. (Default is 0)
|
effint_l |
Lower efficacy bounds for dose assignment decision table. (Default is |
effint_u |
Lower efficacy bounds for dose assignment decision table. (Default is |
toxint_l |
Lower toxicity bounds for dose assignment decision table. (Default is |
toxint_u |
Lower toxicity bounds for dose assignment decision table. (Default is |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list of the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
Value
A list containing operating characteristics such as:
- bd.sel
OBD selection percentage
- od.sel
Favorable dose selection percentage
- bd.pts
Average percentage of patients at the OBD
- od.pts
Average percentage of patients at the favorable doses
- earlystop
Percentage of early stopped trials
- overdose
Overdose patients percentage
- poorall
Poor allocation percentage
- ov.sel
Overdose selection percentage
Examples
oc_tepi(
ndose = 5,
target_t = 0.3,
lower_e = 0.4,
ntrial = 10,
)
Compute operating characteristics using uTPI
Description
oc_utpi()
uses the uTPI design to compute operating charateristics of a user-specificed trial scenario.
This design places significance on optimizing utility using a quasi-binomial likelihood approach.
Usage
oc_utpi(
ndose,
target_t,
lower_e,
ncohort = 10,
cohortsize = 3,
startdose = 1,
OBD = 0,
psafe = 0.95,
pfutility = 0.9,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
ncohort |
Integer. Number of cohorts. (Default is |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
OBD |
Integer. True index of the Optimal Biological Dose (OBD) for the trial scenario. (Default is 0)
|
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list with the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
Value
A list containing operating characteristics such as:
- bd.sel
OBD selection percentage
- od.sel
Favorable dose selection percentage
- bd.pts
Average percentage of patients at the OBD
- od.pts
Average percentage of patients at the favorable doses
- earlystop
Percentage of early stopped trials
- overdose
Overdose patients percentage
- poorall
Poor allocation percentage
- ov.sel
Overdose selection percentage
Examples
oc_utpi(
ndose = 5,
target_t = 0.3,
lower_e = 0.4,
ntrial = 10,
)
Simulate operating characteristics using BOIN12.
Description
This function runs simulations of the BOIN12 design by evaluating operating characteristics over a range of cohort sizes. For each dose level within the user-specified range, it performs multiple trials and saves the results to a corresponding file.
Usage
simulate_boin12(
ndose,
ssizerange,
target_t,
lower_e,
cohortsize = 3,
startdose = 1,
psafe = 0.95,
pfutility = 0.9,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL,
save_dir = tempdir(),
save_folder = "boin12_simulations",
save_file = "boin12_simulation.csv"
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
ssizerange |
Integer vector. Range of number of cohorts to simulate. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list with the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
save_dir |
Directory to save output folders. Default is |
save_folder |
Folder name. (Default is "boin12_simulations") |
save_file |
File name. (Default is "boin12_simulation.csv") |
Value
No return value, called for side effects
Examples
prob <- list(
pE = c(0.4, 0.5, 0.6),
pT = c(0.1, 0.2, 0.3),
obd = 2,
mtd = 2
)
simulate_boin12(
ndose = 3,
ssizerange = c(3, 5),
target_t = 0.3,
lower_e = 0.2,
ntrial = 10,
prob = prob,
)
Simulate operating characteristics using BOINET
Description
This function runs simulations of the BOINET design by evaluating operating characteristics over a range of cohort sizes. For each dose level within the user-specified range, it performs multiple trials and saves the results to a corresponding file.
Usage
simulate_boinet(
ndose,
ssizerange,
target_t,
lower_e,
cohortsize = 3,
startdose = 1,
psafe = 0.95,
pfutility = 0.9,
ntrial = 10000,
utilitytype = 1,
prob = NULL,
save_dir = tempdir(),
save_folder = "boinet_simulations",
save_file = "boinet_simulation.csv"
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
ssizerange |
Integer vector. Range of number of cohorts to simulate. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list of the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
save_dir |
Directory to save output folders. Default is |
save_folder |
Folder name. (Default is "boin12_simulations") |
save_file |
File name. (Default is "boin12_simulation.csv") |
Value
No return value, called for side effects
Examples
prob <- list(
pE = c(0.4, 0.5, 0.6, 0.6, 0.6),
pT = c(0.1, 0.2, 0.3, 0.4, 0.4),
obd = 3,
mtd = 2
)
simulate_boinet(
ndose = 5,
ssizerange = 1:2,
target_t = 0.3,
lower_e = 0.4,
ntrial = 10,
prob = prob,
)
Simulate operating characteristics using EffTox
Description
This function runs simulations of the EffTox design by evaluating operating characteristics over a range of cohort sizes. For each dose level within the user-specified range, it performs multiple trials and saves the results to a corresponding file.
Usage
simulate_efftox(
ndose,
ssizerange,
target_t,
lower_e,
startdose = 1,
ntrial = 10000,
utilitytype = 1,
prob = NULL,
save_dir = tempdir(),
save_folder = "efftox_simulations",
save_file = "efftox_simulation.csv"
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
ssizerange |
Integer vector. Range of number of cohorts to simulate. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
startdose |
Integer. Starting dose level. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list of the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
save_dir |
Directory to save output folders. Default is |
save_folder |
Folder name. (Default is "boin12_simulations") |
save_file |
File name. (Default is "boin12_simulation.csv") |
Value
No return value, called for side effects
Examples
prob <- list(
pE = c(0.4, 0.5),
pT = c(0.1, 0.2),
obd = 2,
mtd = 2
)
simulate_efftox(
ndose = 2,
ssizerange = 1,
target_t = 0.3,
lower_e = 0.4,
ntrial = 2,
prob = prob,
)
Simulate operating characteristics using Ji3+3
Description
This function runs simulations of the Ji3+3 design by evaluating operating characteristics over a range of cohort sizes. For each dose level within the user-specified range, it performs multiple trials and saves the results to a corresponding file.
Usage
simulate_ji3p3(
ndose,
ssizerange,
target_t,
target_e,
lower_e,
cohortsize = 3,
startdose = 1,
eps1 = 0.05,
eps2 = 0.05,
psafe = 0.95,
pfutility = 0.9,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL,
save_dir = tempdir(),
save_folder = "ji3p3_simulations",
save_file = "ji3p3_simulation.csv"
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
ssizerange |
Integer vector. Range of number of cohorts to simulate. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
target_e |
Numeric. Target efficacy probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
eps1 |
Numerical. Width of the subrectangle. (Default is '0.05') |
eps2 |
Numerical. Width of the subreactangle. (Default is '0.05') |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list of the following named elements: Use this parameter to provide fixed probability vectors as a list with the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
save_dir |
Directory to save output folders. Default is |
save_folder |
Folder name. (Default is "boin12_simulations") |
save_file |
File name. (Default is "boin12_simulation.csv") |
Value
No return value, called for side effects
Examples
prob <- list(
pE = c(0.4, 0.5, 0.6, 0.6, 0.6),
pT = c(0.1, 0.2, 0.3, 0.4, 0.4),
obd = 3,
mtd = 2
)
simulate_ji3p3(
ndose = 5,
ssizerange = 1:2,
target_t = 0.3,
target_e = 0.5,
lower_e = 0.4,
ntrial = 10,
prob = prob,
)
Simulate operating characteristics using PRINTE
Description
This function runs simulations of the PRINTE design by evaluating operating characteristics over a range of cohort sizes. For each dose level within the user-specified range, it performs multiple trials and saves the results to a corresponding file.
Usage
simulate_pite(
ndose,
ssizerange,
target_t,
target_e,
lower_e,
cohortsize = 3,
startdose = 1,
eps1 = 0.05,
eps2 = 0.05,
psafe = 0.95,
pfutility = 0.9,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL,
save_dir = tempdir(),
save_folder = "pite_simulations",
save_file = "pite_simulation.csv"
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
ssizerange |
Integer vector. Range of number of cohorts to simulate. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
target_e |
Numeric. Target efficacy probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
eps1 |
Numerical. Width of the subrectangle. |
eps2 |
Numerical. Width of the subreactangle. |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list with the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
save_dir |
Directory to save output folders. Default is |
save_folder |
Folder name. (Default is "boin12_simulations") |
save_file |
File name. (Default is "boin12_simulation.csv") |
Value
No return value, called for side effects
Examples
prob <- list(
pE = c(0.4, 0.5, 0.6, 0.6, 0.6),
pT = c(0.1, 0.2, 0.3, 0.4, 0.4),
obd = 3,
mtd = 2
)
simulate_pite(
ndose = 5,
ssizerange = 1:2,
target_t = 0.3,
target_e = 0.5,
lower_e = 0.4,
ntrial = 10,
prob = prob,
)
Simulate operating characteristics using STEIN
Description
This function runs simulations of the STEIN design by evaluating operating characteristics over a range of cohort sizes. For each dose level within the user-specified range, it performs multiple trials and saves the results to a corresponding file.
Usage
simulate_stein(
ndose,
ssizerange,
target_t,
lower_e,
cohortsize = 3,
startdose = 1,
psi1 = 0.2,
psi2 = 0.6,
psafe = 0.95,
pfutility = 0.9,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL,
save_dir = tempdir(),
save_folder = "stein_simulations",
save_file = "stein_simulation.csv"
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
ssizerange |
Integer vector. Range of number of cohorts to simulate. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
psi1 |
Numerical. Highest inefficacious efficacy probability. |
psi2 |
Numerical. Lowest highly-promising efficacy probability. |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list with the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
save_dir |
Directory to save output folders. Default is |
save_folder |
Folder name. (Default is "boin12_simulations") |
save_file |
File name. (Default is "boin12_simulation.csv") |
Value
No return value, called for side effects
Examples
simulate_stein(
ndose = 5,
ssizerange = 1:2,
target_t = 0.3,
lower_e = 0.4,
ntrial = 10,
)
Simulate operating characteristics using TEPI
Description
This function runs simulations of the TEPI design by evaluating operating characteristics over a range of cohort sizes. For each dose level within the user-specified range, it performs multiple trials and saves the results to a corresponding file.
Usage
simulate_tepi(
ndose,
ssizerange,
target_t,
lower_e,
cohortsize = 3,
startdose = 1,
effint_l = c(0, lower_e, lower_e + 0.2, lower_e + 0.4),
effint_u = c(lower_e, lower_e + 0.2, lower_e + 0.4, 1),
toxint_l = c(0, 0.15, target_t, target_t + 0.05),
toxint_u = c(0.15, target_t, target_t + 0.05, 1),
psafe = 0.95,
pfutility = 0.9,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL,
save_dir = tempdir(),
save_folder = "tepi_simulations",
save_file = "tepi2_simulation.csv"
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
ssizerange |
Integer vector. Range of number of cohorts to simulate. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
effint_l |
Lower efficacy bounds for dose assignment decision table. (Default is |
effint_u |
Lower efficacy bounds for dose assignment decision table. (Default is |
toxint_l |
Lower toxicity bounds for dose assignment decision table. (Default is |
toxint_u |
Lower toxicity bounds for dose assignment decision table. (Default is |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list with the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
save_dir |
Directory to save output folders. Default is |
save_folder |
Folder name. (Default is "boin12_simulations") |
save_file |
File name. (Default is "boin12_simulation.csv") |
Value
No return value, called for side effects
Examples
simulate_tepi(
ndose = 5,
ssizerange = 1:2,
target_t = 0.3,
lower_e = 0.4,
ntrial = 10,
)
Simulate operating characteristics using uTPI
Description
This function runs simulations of the uTPI design by evaluating operating characteristics over a range of cohort sizes. For each dose level within the user-specified range, it performs multiple trials and saves the results to a corresponding file.
Usage
simulate_utpi(
ndose,
ssizerange,
target_t,
lower_e,
cohortsize = 3,
startdose = 1,
psafe = 0.95,
pfutility = 0.9,
ntrial = 10000,
utilitytype = 1,
u1,
u2,
prob = NULL,
save_dir = tempdir(),
save_folder = "utpi_simulations",
save_file = "utpi_simulation.csv"
)
Arguments
ndose |
Integer. Number of dose levels. (Required) |
ssizerange |
Integer vector. Range of number of cohorts to simulate. (Required) |
target_t |
Numeric. Target toxicity probability. (Required) |
lower_e |
Numeric. Minimum acceptable efficacy probability. (Required) |
cohortsize |
Integer. Size of a cohort. (Default is |
startdose |
Integer. Starting dose level. (Default is |
psafe |
Numeric. Early stopping cutoff for toxicity. (Default is |
pfutility |
Numeric. Early stopping cutoff for efficacy. (Default is |
ntrial |
Integer. Number of random trial replications. (Default is |
utilitytype |
Integer. Type of utility structure. (Default is
|
u1 |
Numeric. Utility parameter w_11. (0-100) |
u2 |
Numeric. Utility parameter w_00. (0-100) |
prob |
Fixed probability vectors. If not specified, a random scenario is used by default. Use this parameter to provide fixed probability vectors as a list with the following named elements:
For example: prob <- list( pE = c(0.4, 0.5, 0.6, 0.6, 0.6), pT = c(0.1, 0.2, 0.3, 0.4, 0.4), obd = 3, mtd = 2 ) |
save_dir |
Directory to save output folders. Default is |
save_folder |
Folder name. (Default is "boin12_simulations") |
save_file |
File name. (Default is "boin12_simulation.csv") |
Value
No return value, called for side effects
Examples
simulate_utpi(
ndose = 5,
ssizerange = 1:2,
target_t = 0.3,
lower_e = 0.4,
ntrial = 10,
)