sim_empiric_dec: A function to simulate a dose expansion cohort trial design

View source: R/sim_empiric_dec.R

sim_empiric_decR Documentation

A function to simulate a dose expansion cohort trial design

Description

A general purpose simulator for dose expansion cohorts (DECs). It is intended to be called from twostage_simulator rather than by the user directly.

Usage

sim_empiric_dec(
  n_sim,
  true_tox_curve,
  stage_label = 1,
  sim_specific_start_id = NULL,
  sim_specific_dose_start = NULL,
  max_n_per_dec,
  module_rule = "local",
  thresh_decrease = 1/3,
  first_patient_look = 0,
  seed = sample(.Machine$integer.max, 1)
)

Arguments

n_sim

How many simulated trials to conduct? (positive integer)

true_tox_curve

A positive numeric vector that contains the true generating dose-toxicity curve to simulate the data from. This also gives the number of dose levels.

stage_label

A numeric value that can be arbitrary but is intended to take on integer values equal to either 1 or 2, corresponding to the stage of the trial.

sim_specific_start_id

A positive integer vector that contains the starting subject id for each simulated trial. If provided, it must be as long as n_sim.

sim_specific_dose_start

A positive integer vector that contains the starting dose level for each simulated trial. If provided, it must be as long as n_sim and take on values between 0 (indicating that no patients should be enrolled) to length(true_tox_curve).

max_n_per_dec

A positive integer giving the maximum enrollment for each DEC, if no stopping for toxicity occurs.

module_rule

Currently the only valid choice for this is the string "local", corresponding to a local stopping rule: if the empiric proportion of DLTs at the current dose level ever exceeds thresh_decrease, then de-escalate.

thresh_decrease

A numeric value between 0 and 1. This is the maximum tolerance for the observed proportion of DLTs at any given dose level. If this threshold is ever exceeded, the DEC will de-escalate if possible or stop the trial entirely if not.

first_patient_look

An integer greater than or equal to 0 and less than or equal to max_n_per_dec. At a given dose level, at what point should the module_rule start taking action? This is an ad-hoc way to prevent a scenario such as "The first patient experienced a DLT, therefore because all patients at this dose level have experienced a DLT, we should de-escalate."

seed

A positive integer seed for use prior to starting the simulations.

Value

A named list with entries:

all_results

A matrix giving the individual patient outcomes from all simulated trials.

estMTD

A vector as long as the number of simulated trials giving an integer value corresponding to the estimated MTD from each trial; a value of 0 indicates that all dose levels were estimated to be unsafe.

enrollment

A vector as long as the number of simulated trials giving the total enrollment for that trial.

seed

The seed that was used by the function.

References

\insertRef

boonstra2020seamlesssim


elizabethchase/seamlesssim documentation built on Aug. 10, 2022, 2:55 a.m.