Learn R Programming

simFastBOIN (version 1.3.2)

select_mtd: MTD Selection for Multiple Trials

Description

Select maximum tolerated dose (MTD) for multiple trials based on isotonic regression estimates and dose elimination status. This function follows the BOIN package's MTD selection algorithm.

Usage

select_mtd(iso_est_mat, n_pts_mat, eliminated_mat, target,
             boundMTD = FALSE, lambda_d = NULL, min_mtd_sample = 1)

Value

Data frame with n_trials rows and three columns:

trial

Integer. Trial ID (1 to n_trials)

mtd

Integer. Selected MTD dose number, or NA if no valid dose

reason

Character. Reason for trial completion or termination

Arguments

iso_est_mat

Numeric matrix of size n_trials x n_doses. Isotonic regression estimates of toxicity rates from isotonic_regression.

n_pts_mat

Numeric matrix of size n_trials x n_doses. Number of patients treated at each dose level for each trial.

eliminated_mat

Logical matrix of size n_trials x n_doses. Whether each dose has been eliminated in each trial.

target

Numeric. Target toxicity probability.

boundMTD

Logical. If TRUE, impose constraint that selected MTD's isotonic estimate must be <= lambda_d. Default is FALSE.

lambda_d

Numeric. De-escalation boundary. Required if boundMTD = TRUE.

min_mtd_sample

Numeric. Minimum number of patients required for a dose to be considered for MTD selection. Default is 1.

Details

For each trial, the function performs the following steps:

  1. Check if lowest dose (dose 1) is eliminated first

  2. Identify admissible set: doses with patients AND not eliminated

  3. Extract isotonic estimates for admissible doses

  4. Select dose with estimate closest to target toxicity rate

  5. Apply tiebreaker by adding small dose-index increments

  6. If boundMTD = TRUE, ensure selected dose satisfies constraint

The dose with isotonic estimate closest to the target is selected as MTD. Ties are broken by small perturbation (1e-10 * dose_index) preferring lower dose indices when estimates are equally close to target.

If the lowest dose (dose 1) is eliminated, NO MTD is selected regardless of other doses' status. This follows BOIN standard: "stop the trial if the lowest dose is eliminated due to toxicity, and no dose should be selected as the MTD."

Examples

Run this code
target <- 0.30
n_pts_mat <- matrix(c(3, 6, 9, 3, 6, 9), nrow = 2, byrow = TRUE)
n_tox_mat <- matrix(c(0, 1, 3, 0, 1, 2), nrow = 2, byrow = TRUE)
eliminated_mat <- matrix(FALSE, nrow = 2, ncol = 3)

iso_est_mat <- isotonic_regression(n_pts_mat, n_tox_mat)
mtd_results <- select_mtd(iso_est_mat, n_pts_mat, eliminated_mat, target)
print(mtd_results)

Run the code above in your browser using DataLab