crmPack updates

Daniel Sabanés Bové

November 25, 2026

What is crmPack?

  • Specialized R package for dose escalation trials
  • Initial CRAN release in 2016, publication by @sabanes2019
  • Start of SLA phase in October 2025!
  • Higher flexibility compared to other software, thanks to its modular design
  • Easy extensibility and adoption of new designs
  • Produces visual and numeric outputs for easy interpretation
  • Facilitates simulations to assess the performance under various scenarios

Overview of recent crmPack releases 📦

  • 2.0 in December 2025: major breaking revamp of the package
  • 2.1 in January 2026: Backfill cohort simulations
  • 2.2 in July 2026: combination of two drugs, hierarchical designs with several parallel and/or historical arms
  • 2.3 in October 2026: improved plots, bug fixes
  • And of course the new website: crmPack.org!

Backfill cohort simulations

Why simulate backfill?

  • Enroll additional patients at previously tested lower doses while escalation continues [@Barnett2023].
  • Gather more safety or response data at doses of interest.
  • Evaluate how backfill affects enrollment, dose allocation and dose recommendations. Backfill DLTs are included in the dose-toxicity model.
  • Worked examples in the Backfill cohorts vignette.

Backfill rules in crmPack

Component What it controls
cohort_size Capacity of each backfill cohort
max_size Total backfill enrollment across the trial
opening When a lower-dose cohort can enroll
recruitment How many backfill patients can enroll per cycle
priority Which open cohort fills first

Design() defaults to OpeningNone(). After each escalation cohort, the simulator updates the queue, fills available slots in priority order, then fits the model and applies dose and stopping rules.

Backfill simulation is supported for standard Design objects. Note that examine() omits backfill because it would be too complicated quickly.

Simple backfill

Open eligible lower-dose cohorts after one completed escalation cohort.

backfill_simple <- Backfill(
    cohort_size = CohortSizeConst(3),
    max_size = 12,
    opening = OpeningMinCohorts(min_cohorts = 1),
    recruitment = RecruitmentUnlimited(),
    priority = "lowest"
)
design_simple_backfill <- design_no_backfill
design_simple_backfill@backfill <- backfill_simple

Response-gated backfill

Open after at least three escalation cohorts and a response at the candidate dose or below.

backfill_complex <- Backfill(
    cohort_size = CohortSizeRandom(min_size = 1, max_size = 6),
    opening = OpeningMinCohorts(min_cohorts = 3) &
      OpeningMinResponses(
        min_responses = 1,
        include_lower_doses = TRUE
    ),
    recruitment = RecruitmentRatio(ratio = 1 / 2),
    priority = "highest",
    max_size = 20
)
design_complex_backfill <- design_no_backfill
design_complex_backfill@backfill <- backfill_complex

Assumed toxicity and response

The simple and response-gated designs use the same dose-toxicity scenario.

Simulate the two designs

Ten trials per design with short MCMC runs for illustration.

Simulate the two designs (cont’d)

sims_complex <- simulate(
    design_complex_backfill,
    truth = myTruth,
    truthResponse = mytruthResponse,
    nsim = 10,
    seed = 819,
    mcmcOptions = mcmcOptions,
    parallel = FALSE,
    firstSeparate = FALSE
)

Simple backfill in one trial

Hollow symbols mark backfilled patients.

plot(sims_simple@data[[3]], mark_backfill = TRUE)

Response-gated backfill in one trial

Blue squares mark observed responses.

plot(sims_complex@data[[5]], mark_backfill = TRUE, mark_response = TRUE)

Backfill enrollment across trials

Count backfilled patients in each trial using the patient-level backfilled flag.

get_backfill_counts <- function(sims) {
    sapply(sims@data, \(d) sum(d@backfilled))
}
backfill_counts_simple <- get_backfill_counts(sims_simple)
backfill_counts_complex <- get_backfill_counts(sims_complex)
table(backfill_counts_simple)
backfill_counts_simple
 9 12 
 1  9 
table(backfill_counts_complex)
backfill_counts_complex
 0  2  3  6 10 
 6  1  1  1  1 

Review simulation results

summary(sims_simple, truth = myTruth) reports backfill counts and dose allocation across simulations:

Summary of 10 simulations

Target toxicity interval was 20, 35 %
Target dose interval corresponding to this was 13, 16.8 
Intervals are corresponding to 10 and 90 % quantiles

Number of patients overall : mean 37 (33, 42) 
Number of patients treated above target tox interval : mean 7 (3, 9) 
Proportions of DLTs in the trials : mean 16 % (12 %, 20 %) 
Mean toxicity risks for the patients on active : mean 19 % (16 %, 22 %) 
Doses selected as MTD : mean 18 (15, 20) 
True toxicity at doses selected : mean 40 % (28 %, 48 %) 
Proportion of trials selecting target MTD: 40 %
Dose most often selected as MTD: 20 
Observed toxicity rate at dose most often selected: 50 %
Number of backfill patients : mean 12 (12, 12) 
Doses for backfill patients: 3: 25.6%, 5: 25.6%, 10: 35.9%, 15: 12.8% 
Fitted toxicity rate at dose most often selected : mean 31 % (25 %, 39 %) 
Overdose probability at selected dose : mean 11 % (5 %, 20 %) 
Stop reason triggered:
 ≥ 3 cohorts dosed :  100 %
 P(0.2 ≤ prob(DLE | NBD) ≤ 0.35) ≥ 0.5 :  100 %
 ≥ 10 patients dosed in 30 % dose range around NBD :  90 %
 ≥ 40 patients dosed :  30 %
 Stopped because of missing dose :  0 %

Combination designs

A model for two drugs

In the model of @Neuenschwander2015, two single-agent models give the DLT probabilities \(p_1(x_1)\) and \(p_2(x_2)\). Under independent toxicity, the probability of at least one DLT is

\[ p_0(x_1,x_2)=1-[1-p_1(x_1)][1-p_2(x_2)]. \]

With the additional interaction term, the model becomes

\[ \operatorname{logit}(p(x_1,x_2)) = \operatorname{logit}(p_0(x_1,x_2)) + \eta\frac{x_1}{x_1^*}\frac{x_2}{x_2^*}. \]

Positive \(\eta\) raises DLT odds relative to independence, and negative \(\eta\) lowers them.

For details see the Combination designs vignette and Satrajit’s slides on the Bayesian combination model

Specify the combination model

TwoDrugsCombo() pairs the two single-agent models with a prior on the interaction.

combo_model <- TwoDrugsCombo(
  single_models = list(
    drug1 = LogisticLogNormal(
      mean = c(-0.85, 1), ref_dose = 10,
      cov = matrix(c(2, -0.5, -0.5, 2), nrow = 2)
    ),
    drug2 = LogisticLogNormal(
      mean = c(-0.7, 0.8), ref_dose = 20,
      cov = matrix(c(2, -0.3, -0.3, 2), nrow = 2)
    )
  ),
  gamma = 0,
  tau = 1
)

Choose allowed dose transitions

Use one-drug-at-a-time escalation and cap increases at 200% for each drug.

my_increments <- IncrementsMin(
  increments_list = list(
    IncrementsComboOneDrugOnly(),
    IncrementsComboCartesian(
      drug1 = IncrementsRelative(intervals = c(0), increments = c(2)),
      drug2 = IncrementsRelative(intervals = c(0), increments = c(2))
    )
  )
)

Assemble the combination design

Both drugs range from 10 to 50 in steps of 5. Start at (10, 20) with cohorts of three and a 20-patient stopping threshold.

my_next_best <- NextBestNCRM(
  target = c(0.2, 0.35),
  overdose = c(0.35, 1),
  max_overdose_prob = 0.25
)

my_stopping <- StoppingMinPatients(nPatients = 20)

empty_data <- DataCombo(
  doseGrid = list(
    drug1 = seq(from = 10, to = 50, by = 5),
    drug2 = seq(from = 10, to = 50, by = 5)
  )
)
design_combo <- DesignCombo(
  model = combo_model,
  nextBest = my_next_best,
  stopping = my_stopping,
  increments = my_increments,
  cohort_size = CohortSizeConst(3L),
  data = empty_data,
  startingDose = c(drug1 = 10, drug2 = 20)
)

Simulate a single combination arm

Simulate 20 trials. The assumed DLT probability includes a dose-by-dose interaction.

true_tox_combo <- function(dose) {
  plogis(-4 + 0.08 * dose[1] + 0.06 * dose[2] + 0.001 * dose[1] * dose[2])
}

sims_combo <- simulate(
  design_combo,
  truth = true_tox_combo,
  nsim = 20,
  seed = 819,
  mcmcOptions = mcmc_options,
  parallel = FALSE
)

Dose-pair trajectories

Larger circles indicate more patients on average. Thicker arrows indicate more frequent transitions.

Borrow across monotherapy and combination arms

  • Each monotherapy arm borrows with the corresponding single-agent component of the combination arm.
  • Arm-specific parameters in an exchangeable pool share a hierarchical prior. For logistic log-normal models, slope pooling is on the log-slope scale.
  • The interaction has its own pool. Multiple combination arms can have distinct interactions and borrow through that pool.

Borrow specifications

parameter_pools <- list(
  drug1_intercept = list(
    mono_drug1 = "alpha0",
    combo = "alpha0[1]"
  ),
  drug1_slope = list(
    mono_drug1 = "alpha1",
    combo = "alpha1[1]"
  ),
  drug2_intercept = list(
    mono_drug2 = "alpha0",
    combo = "alpha0[2]"
  ),
  drug2_slope = list(
    mono_drug2 = "alpha1",
    combo = "alpha1[2]"
  ),
  interaction = list(
    combo = "eta"
  )
)

pool_correlations <- list(
  drug1 = c("drug1_intercept", "drug1_slope"),
  drug2 = c("drug2_intercept", "drug2_slope")
)

pool_priors <- list(
  drug1_intercept = list(
    mu = c(mean = qlogis(0.25), sd = 2.5),
    tau = c(meanlog = log(0.5), sdlog = log(2) / 1.96)
  ),
  drug1_slope = list(
    mu = c(mean = 0, sd = 0.7),
    tau = c(meanlog = log(0.25), sdlog = log(2) / 1.96)
  ),
  drug2_intercept = list(
    mu = c(mean = qlogis(0.25), sd = 2.5),
    tau = c(meanlog = log(0.75), sdlog = log(2) / 1.96)
  ),
  drug2_slope = list(
    mu = c(mean = 0, sd = 1),
    tau = c(meanlog = log(0.25), sdlog = log(2) / 1.96)
  ),
  interaction = list(
    mu = c(mean = 0, sd = 1.121),
    tau = c(meanlog = log(0.125), sdlog = log(2) / 1.96)
  )
)

Build the hierarchical design

Wrap each component design in a named DesignArm() and use those names in the exchangeable pools.

design_mono_drug1 <- Design(
  model = combo_model@single_models$drug1,
  nextBest = my_next_best,
  stopping = StoppingMinPatients(nPatients = 20) | StoppingMissingDose(),
  increments = IncrementsRelative(intervals = c(0), increments = c(2)),
  cohort_size = CohortSizeConst(3L),
  data = Data(
    doseGrid = seq(from = 10, to = 50, by = 5)
  ),
  startingDose = 10
)

design_mono_drug2 <- Design(
  model = combo_model@single_models$drug2,
  nextBest = my_next_best,
  stopping = StoppingMinPatients(nPatients = 20) | StoppingMissingDose(),
  increments = IncrementsRelative(intervals = c(0), increments = c(2)),
  cohort_size = CohortSizeConst(3L),
  data = Data(
    doseGrid = seq(from = 10, to = 50, by = 5)
  ),
  startingDose = 20
)

design_arm_mono_drug1 <- DesignArm(
  name = "mono_drug1",
  design = design_mono_drug1
)
design_arm_mono_drug2 <- DesignArm(
  name = "mono_drug2",
  design = design_mono_drug2
)
design_arm_combo <- DesignArm(
  name = "combo",
  design = design_combo
)

Build the hierarchical design (cont’d)

Finally we can assemble the hierarchical design using the individual arm designs and the specified parameter pools, correlations, and priors:

hierarchical_design <- HierarchicalDesign(
  design_arm_mono_drug1,
  design_arm_mono_drug2,
  design_arm_combo,
  exchangeable_parameters = parameter_pools,
  pool_correlations = pool_correlations,
  pool_priors = pool_priors
)

Run the simulations

truth_mono_drug1 <- function(dose) plogis(-4 + 0.08 * dose)
truth_mono_drug2 <- function(dose) plogis(-4 + 0.06 * dose)
truth_combo <- function(dose) plogis(-4 + 0.08 * dose[1] + 0.06 * dose[2] + 0.001 * dose[1] * dose[2])

hierarchical_sims <- simulate(
  hierarchical_design,
  truth = list(
    mono_drug1 = truth_mono_drug1,
    mono_drug2 = truth_mono_drug2,
    combo = truth_combo
  ),
  truthResponse = list(
    # Just for demo purposes we choose the same functions for efficacy.
    mono_drug1 = truth_mono_drug1,
    mono_drug2 = truth_mono_drug2,
    combo = truth_combo
  ),
  nsim = 20,
  seed = 819,
  mcmcOptions = mcmc_options,
  parallel = FALSE
)

Inspect one arm of the simulation

Extract an arm to review its dose trajectories and allocation across trials.

arm_mono_drug1_sims <- get_arm_simulations(hierarchical_sims, "mono_drug1")
plot(arm_mono_drug1_sims)

Customize the arms

  • HistoricalArm() supplies existing data to the hierarchical model without opening enrollment.
  • open_when delays an arm until a condition is met, such as a monotherapy arm reaching dose 20.
  • borrow = FALSE uses an arm-specific fit for that arm’s dose and stopping decisions. The arm still contributes to the hierarchical model.
  • scenario() evaluates next-dose and stopping decisions for fixed data supplied through HierarchicalData().

Upcoming

What is next for crmPack?

  • Reporting functionality
  • More plot enhancements
  • Validation documentation
  • Roadmap for 2027 includes:
    • Recommendation class and plot methods
    • Models with covariates
    • Time-to-Event (TITE) CRM additions
    • Computational performance improvements

References