View source: R/simulate_one_trial.R
simulate_one_trial | R Documentation |
Simulate One Trial Using an Obtained Optimal Dose Escalation Rule
simulate_one_trial(escalation_rule, prob_true, seed = NULL)
escalation_rule |
An object of class EscalationRule specifying an obtained optimal dose escalation rule. |
prob_true |
A numeric vector specifying the true DLT probabilities. |
seed |
An integer value. Random seed for data generation in this trial. |
A data frame which contains the cohort ID, the assigned dose, the number of assigned patients, the number of DLTs, and the recommended action including down, stay, up, MTD_1, ..., MTD_J, no_MTD, and fail to determine MTD.
library(RLescalation)
## Not run:
escalation_rule <- learn_escalation_rule(
J = 6, target = 0.25, epsilon = 0.04, delta = 0.1,
N_total = 36, N_cohort = 3, seed = 123,
rl_config = rl_config_set(iter = 1000)
)
## End(Not run)
prob_true <- c(0.03, 0.13, 0.17, 0.19, 0.26, 0.31)
# Simulate one trial using the obtained `escalation_rule`
## Not run:
sim_one <- simulate_one_trial(escalation_rule, prob_true, seed = 123)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.