Title: | Phase I/II CRM Based Drug Combination Design |
---|---|
Description: | Implements the adaptive designs for integrated phase I/II trials of drug combinations via continual reassessment method (CRM) to evaluate toxicity and efficacy simultaneously for each enrolled patient cohort based on Bayesian inference. It supports patients assignment guidance in a single trial using current enrolled data, as well as conducting extensive simulation studies to evaluate operating characteristics before the trial starts. It includes various link functions such as empiric, one-parameter logistic, two-parameter logistic, and hyperbolic tangent, as well as considering multiple prior distributions of the parameters like normal distribution, gamma distribution and exponential distribution to accommodate diverse clinical scenarios. Method using Bayesian framework with empiric link function is described in: Wages and Conaway (2014) <doi:10.1002/sim.6097>. |
Authors: | Junying Wang [cre, aut], Song Wu [aut], Jie Yang [aut] |
Maintainer: | Junying Wang <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.8 |
Built: | 2024-11-04 03:32:28 UTC |
Source: | CRAN |
Step 1: convert dose combinations into matrix
doseComb_to_mat(doseComb, type)
doseComb_to_mat(doseComb, type)
doseComb |
Either a numeric matrix or a numeric vector or a numeric list. |
type |
A string. condition 1: detailed dose combinations are directly given in matrix -> type = "comb" dose combinations dose A dose B condition 2: directly given the number of levels for the two doses in vector -> type = "matrix" Step 2: get the 6 orderings |
outMat -> Either a list or a matrix. Note: each array refers to the index of drug combinations orderings)
Wages NA, Conaway MR. Specifications of a continual reassessment method design for phase I trials of combined drugs. Pharmaceutical statistics. 2013 Jul;12(4):217-24. doi:10.1002/pst.1575
Estimate efficacy using Bayesian inference for each enrolled patient or cohort of patients given the current accumulated data and toxicity estimation.
efficacy_est(Dat, AR, I, K, K_prob, efficacy_skeleton, Nphase, model, para_prior, theta_mean, theta_sd, theta_intcpt_lgst1, theta_shape, theta_inverse_scale, alphaT_mean, alphaT_sd, alphaT_shape, alphaT_inverse_scale, seed=NULL, seed_rand=NULL, seed_max=NULL)
efficacy_est(Dat, AR, I, K, K_prob, efficacy_skeleton, Nphase, model, para_prior, theta_mean, theta_sd, theta_intcpt_lgst1, theta_shape, theta_inverse_scale, alphaT_mean, alphaT_sd, alphaT_shape, alphaT_inverse_scale, seed=NULL, seed_rand=NULL, seed_max=NULL)
Dat |
A data frame for current data with three columns (DoseLevel, DLT and ORR). |
AR |
A vector for acceptable set. |
I |
Number of dose combinations. |
K |
Number of efficacy orderings. |
K_prob |
A vector of length |
efficacy_skeleton |
A list of vector with length |
Nphase |
Number of patients for determination of randomization phase (current number of patients less than Nphase) or maximization phase (current number of patients larger than or equal to Nphase). |
model |
A character string to specify the model used, must be one of "empiric", "tanh", "logistic" or "logistic2". |
para_prior |
A character string to specify the prior distribution used for parameters, must be one of "normal" or "gamma" (when model is either "empiric" or "logistic" or "logistic2") or "exponential" (when model is "tanh"). |
theta_mean |
The mean of parameter used when prior="exponential" or "normal", otherwise need to specify NULL. |
theta_sd |
The standard deviation of parameter used when prior="normal", otherwise need to specify NULL. |
theta_intcpt_lgst1 |
A constant value of intercept from a one-parameter logistic model only used when model="logistic" (suggested value is 3), otherwise need to specify NULL. |
theta_shape |
The shape parameter used when prior="gamma", otherwise need to specify NULL. |
theta_inverse_scale |
The scale parameter used when prior="gamma", otherwise need to specify NULL. |
alphaT_mean |
The mean of intercept parameter of two-parameter logistic model only used when model="logistic2" and prior="normal", otherwise need to specify NULL. |
alphaT_sd |
The standard deviation of intercept parameter of two-parameter logistic model only used when model="logistic2" and prior="normal", otherwise need to specify NULL. |
alphaT_shape |
The shape parameter of intercept parameter from a two-parameter logistic model only used when model="logistic2" and prior="gamma", otherwise need to specify NULL. |
alphaT_inverse_scale |
The scale parameter of intercept parameter from a two-parameter logistic model only used when model="logistic2" and prior="gamma", otherwise need to specify NULL. |
seed |
An integer for the seed to generate random numbers used for equal ordering prior probabilities, default is NULL. |
seed_rand |
An integer for the seed to generate random numbers used in randomization phase, default is NULL. |
seed_max |
An integer for the seed to generate random numbers used in maximization phase, default is NULL. |
The efficacy estimation is based on Bayesian framework by calculating the likelihood function under each orderings, and select the ordering with maximum posterior probability. Then, estimated parameters can be obtained, which will be used for efficacy estimation based on the corresponding link function (specified in statement).
A list is returned containing the following components:
di |
Number of dose level for next enrolled patient or cohort of patients |
K_prob |
A vector for posterier density of efficacy orderings and will be used as prior information for next enrolled patient or cohort of patients. |
Wages, N. A., & Conaway, M. R. (2014). Phase I/II adaptive design for drug combination oncology trials. Statistics in medicine, 33(12), 1990-2003. doi:10.1002/sim.6097
priorSkeletons
, get_ordering
, toxicity_est
, randomization_phase
, maximization_phase
### follow same steps as the example in function toxicity_est() # Generate a data including 3 columns: DoseLevel, DLT, ORR (DLT and ORR are binary outcomes) currDat <- data.frame(sample(1:9, 6, replace=TRUE), rbinom(6, 1, 0.2), rbinom(6, 1, 0.5)) names(currDat) <- c("DoseLevel", "DLT", "ORR") # Generate toxicity and efficacy skeleton DLT_skeleton_p <- priorSkeletons(updelta = 0.045, target = 0.3, npos= 5, ndose = 9, model = "logistic", prior = "normal", beta_mean = 0, a0 = 3) eff_skeleton_p <- priorSkeletons(updelta = 0.045, target = 0.5, npos= 5, ndose = 9, model = "logistic", prior = "normal", beta_mean = 0, a0 = 3) # Obtain 6 complete orderings for toxicity skeleton and efficacy skeleton orderings <- get_ordering(doseComb_forMat=c(3,3), type_forMat="matrix") DLT_skeleton_l <- lapply(orderings, function(or){DLT_skeleton_p[or]}) eff_skeleton_l <- lapply(orderings, function(or){eff_skeleton_p[or]}) # estimate toxicity tox <- toxicity_est(Dat=currDat, I=9, M=6, M_prob=rep(1/6, 6), DLT_skeleton=DLT_skeleton_l, DLT_thresh=0.33, model="logistic", para_prior="normal", beta_mean=0, beta_sd=1, intcpt_lgst1=3, beta_shape=NULL, beta_inverse_scale=NULL, alpha_mean=NULL, alpha_sd=NULL, alpha_shape=NULL, alpha_inverse_scale=NULL, seed=42) ### efficacy estimation eff <- efficacy_est(Dat=currDat, AR=tox$AR, I=9, K=6, K_prob=rep(1/6, 6), efficacy_skeleton=eff_skeleton_l, Nphas=20, model="logistic", para_prior="normal", theta_mean=0, theta_sd=1, theta_intcpt_lgst1=3, theta_shape=NULL, theta_inverse_scale=NULL, alphaT_mean=NULL, alphaT_sd=NULL, alphaT_shape=NULL, alphaT_inverse_scale=NULL, seed=1, seed_rand=2, seed_max=3)
### follow same steps as the example in function toxicity_est() # Generate a data including 3 columns: DoseLevel, DLT, ORR (DLT and ORR are binary outcomes) currDat <- data.frame(sample(1:9, 6, replace=TRUE), rbinom(6, 1, 0.2), rbinom(6, 1, 0.5)) names(currDat) <- c("DoseLevel", "DLT", "ORR") # Generate toxicity and efficacy skeleton DLT_skeleton_p <- priorSkeletons(updelta = 0.045, target = 0.3, npos= 5, ndose = 9, model = "logistic", prior = "normal", beta_mean = 0, a0 = 3) eff_skeleton_p <- priorSkeletons(updelta = 0.045, target = 0.5, npos= 5, ndose = 9, model = "logistic", prior = "normal", beta_mean = 0, a0 = 3) # Obtain 6 complete orderings for toxicity skeleton and efficacy skeleton orderings <- get_ordering(doseComb_forMat=c(3,3), type_forMat="matrix") DLT_skeleton_l <- lapply(orderings, function(or){DLT_skeleton_p[or]}) eff_skeleton_l <- lapply(orderings, function(or){eff_skeleton_p[or]}) # estimate toxicity tox <- toxicity_est(Dat=currDat, I=9, M=6, M_prob=rep(1/6, 6), DLT_skeleton=DLT_skeleton_l, DLT_thresh=0.33, model="logistic", para_prior="normal", beta_mean=0, beta_sd=1, intcpt_lgst1=3, beta_shape=NULL, beta_inverse_scale=NULL, alpha_mean=NULL, alpha_sd=NULL, alpha_shape=NULL, alpha_inverse_scale=NULL, seed=42) ### efficacy estimation eff <- efficacy_est(Dat=currDat, AR=tox$AR, I=9, K=6, K_prob=rep(1/6, 6), efficacy_skeleton=eff_skeleton_l, Nphas=20, model="logistic", para_prior="normal", theta_mean=0, theta_sd=1, theta_intcpt_lgst1=3, theta_shape=NULL, theta_inverse_scale=NULL, alphaT_mean=NULL, alphaT_sd=NULL, alphaT_shape=NULL, alphaT_inverse_scale=NULL, seed=1, seed_rand=2, seed_max=3)
empiric model with gamma prior
empiric_GammaPriorLikelihood(beta, beta_shape, beta_inverse_scale, x, y)
empiric_GammaPriorLikelihood(beta, beta_shape, beta_inverse_scale, x, y)
beta |
parameter. |
beta_shape |
A number. |
beta_inverse_scale |
A number. |
x |
A numeric vector. |
y |
A numeric vector. |
l -> likelihood function
empiric model with normal prior
empiric_NormalPriorLikelihood(beta, beta_mean, beta_sd, x, y)
empiric_NormalPriorLikelihood(beta, beta_mean, beta_sd, x, y)
beta |
parameter. |
beta_mean |
A number. |
beta_sd |
A number. |
x |
A numeric vector. |
y |
A numeric vector. |
l -> likelihood function
This function is used to generate the plot of patient enrollment with toxicity (red) and efficacy (green) outcomes of a single trial.
enroll_patient_plot(data)
enroll_patient_plot(data)
data |
A data frame with 3 columns DoseLevel, DLT for toxicity outcome, and ORR for efficacy outcome. |
Returns a ggplot object.
# input the scenario with pre-defined true toxicity and efficacy probabilities scenario <- matrix(c(0.02, 0.05, 0.04, 0.10, 0.08, 0.15, 0.12, 0.32, 0.06, 0.10, 0.10, 0.15, 0.14, 0.25, 0.20, 0.35, 0.12, 0.18, 0.16, 0.22, 0.22, 0.35, 0.25, 0.40, 0.20, 0.24, 0.24, 0.35, 0.35, 0.45, 0.40, 0.50), ncol=2, byrow = TRUE) # generate skeletons DLT_skeleton <- priorSkeletons(updelta=0.025, target=0.3, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) Efficacy_skeleton <- priorSkeletons(updelta=0.025, target=0.5, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) # simulate 1 trial under the same model and prior distribution simRes <- SIM_phase_I_II(nsim=1, Nmax=40, DoseComb=scenario, input_doseComb_forMat=c(4,4), input_type_forMat="matrix", input_Nphase=20, input_DLT_skeleton=DLT_skeleton, input_efficacy_skeleton=Efficacy_skeleton, input_DLT_thresh=0.3, input_efficacy_thresh=0.3, input_cohortsize=1, input_corr=0, input_early_stopping_safety_thresh=0.33, input_early_stopping_futility_thresh=0.2, input_model="empiric", input_para_prior="normal", input_beta_mean=0, input_beta_sd=1, input_theta_mean=0, input_theta_sd=1) enroll_patient_plot(simRes$datALL[[1]])
# input the scenario with pre-defined true toxicity and efficacy probabilities scenario <- matrix(c(0.02, 0.05, 0.04, 0.10, 0.08, 0.15, 0.12, 0.32, 0.06, 0.10, 0.10, 0.15, 0.14, 0.25, 0.20, 0.35, 0.12, 0.18, 0.16, 0.22, 0.22, 0.35, 0.25, 0.40, 0.20, 0.24, 0.24, 0.35, 0.35, 0.45, 0.40, 0.50), ncol=2, byrow = TRUE) # generate skeletons DLT_skeleton <- priorSkeletons(updelta=0.025, target=0.3, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) Efficacy_skeleton <- priorSkeletons(updelta=0.025, target=0.5, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) # simulate 1 trial under the same model and prior distribution simRes <- SIM_phase_I_II(nsim=1, Nmax=40, DoseComb=scenario, input_doseComb_forMat=c(4,4), input_type_forMat="matrix", input_Nphase=20, input_DLT_skeleton=DLT_skeleton, input_efficacy_skeleton=Efficacy_skeleton, input_DLT_thresh=0.3, input_efficacy_thresh=0.3, input_cohortsize=1, input_corr=0, input_early_stopping_safety_thresh=0.33, input_early_stopping_futility_thresh=0.2, input_model="empiric", input_para_prior="normal", input_beta_mean=0, input_beta_sd=1, input_theta_mean=0, input_theta_sd=1) enroll_patient_plot(simRes$datALL[[1]])
The dataset contains 1296 rows (6 scenarios, 4 different combinations of link functions and prior distributions, 2 sets of skeletons, 3 maximum number of patients, 3 toxicity and efficacy correlations, and 3 subset number of patients) that represent each condition by 1000 simulations, along with 15 columns that contain 9 operating characteristics, other 6 columns including Scenario, Model for link function and prior distribution, N for maximum number of patients, Skeleton, Nphase for subset number of patients, and corr for toxicity and efficacy correlation to separate each condition.
examples_results
examples_results
This function is to obtain complete orderings of both toxicity and efficacy for all drug combinations when considering the partial ordering issue for two combined drugs.
get_ordering(doseComb_forMat, type_forMat)
get_ordering(doseComb_forMat, type_forMat)
doseComb_forMat |
For 2 drugs, either a matrix with columns for all combinations and rows for two drugs when type_forMat is "comb", or a vector of length 2 indicating the number of levels of each drug when type_forMat is "matrix" should be input. For more than 2 drugs, a list of all possible orderings should be input when type_forMat is "self". |
type_forMat |
A character string to indicate the input type of dose combinations. The type_forMat is either "comb" for inputting all tested dose combinations for 2 drugs, "matrix" for entering number of levels of two drugs so that a matrix of combinations can be constructed, or "self" for more than 3 drugs with directly input of all possible orderings. |
Dose-toxicity and dose-efficacy curves for single drug are assumed as monotonically increasing as drug increases. After combined two drugs and traversing all combinations, the number of possible orderings exponentially expands when increasing dose levels for single drug or the dimensions of drug combinations, which will mask the information provided from orderings. Here, 6 typical complete orderings are utilized from practical design.
Take the matrix as an example so that there are total of
does combination.
Across rows:
Up columns:
Up diagonals:
Down diagonals:
Alternating down-up diagonals:
Alternating up-down diagonals:
Finally, obtain the unique orderings if there are any duplicates.
A list of vectors are returned, with each vector representing a specific order of dose combinations in ascending order (dose combinations are denoted by natrual numbers).
Wages, N. A., & Conaway, M. R. (2013). Specifications of a continual reassessment method design for phase I trials of combined drugs. Pharmaceutical statistics, 12(4), 217-224. doi:10.1002/pst.1575
# Input all dose combinations doseComb <- matrix(c(10, 3, 20, 3, 30, 3, 40, 3, 20, 5, 20, 7), byrow=FALSE, nrow=2) orderings <- get_ordering(doseComb_forMat = doseComb, type_forMat = "comb") # Input number of dose levels doseLevels <- c(2,3) orderings <- get_ordering(doseComb_forMat = doseLevels, type_forMat = "matrix") # Input customized orderings orders <- list(c(1,2,3,4,5), c(2,1,4,3,5), c(1,2,4,3,5), c(2,1,3,4,5)) orderings <- get_ordering(doseComb_forMat = orders, type_forMat = "self") # Extreme case: only one ordering will be input orders <- list(c(1,2,3,4,5,6,7)) orderings <- get_ordering(doseComb_forMat = orders, type_forMat = "self")
# Input all dose combinations doseComb <- matrix(c(10, 3, 20, 3, 30, 3, 40, 3, 20, 5, 20, 7), byrow=FALSE, nrow=2) orderings <- get_ordering(doseComb_forMat = doseComb, type_forMat = "comb") # Input number of dose levels doseLevels <- c(2,3) orderings <- get_ordering(doseComb_forMat = doseLevels, type_forMat = "matrix") # Input customized orderings orders <- list(c(1,2,3,4,5), c(2,1,4,3,5), c(1,2,4,3,5), c(2,1,3,4,5)) orderings <- get_ordering(doseComb_forMat = orders, type_forMat = "self") # Extreme case: only one ordering will be input orders <- list(c(1,2,3,4,5,6,7)) orderings <- get_ordering(doseComb_forMat = orders, type_forMat = "self")
one-parameter logistic model with gamma prior
logisticOnePara_GammaPriorLikelihood( alpha1, alpha1_shape, alpha1_inverse_scale, intcpt, x, y )
logisticOnePara_GammaPriorLikelihood( alpha1, alpha1_shape, alpha1_inverse_scale, intcpt, x, y )
alpha1 |
parameter. |
alpha1_shape |
A number. |
alpha1_inverse_scale |
A number. |
intcpt |
A number. |
x |
A numeric vector. |
y |
A numeric vector. |
l -> likelihood function
one-parameter logistic model with normal prior
logisticOnePara_NormalPriorLikelihood( alpha1, alpha1_mean, alpha1_sd, intcpt, x, y )
logisticOnePara_NormalPriorLikelihood( alpha1, alpha1_mean, alpha1_sd, intcpt, x, y )
alpha1 |
parameter. |
alpha1_mean |
A number. |
alpha1_sd |
A number. |
intcpt |
A number. |
x |
A numeric vector. |
y |
A numeric vector. |
l -> likelihood function
two-parameter logistic model with gamma prior
logisticTwoPara_GammaPriorLikelihood( alpha0, alpha1, alpha0_shape, alpha0_inverse_scale, alpha1_shape, alpha1_inverse_scale, x, y )
logisticTwoPara_GammaPriorLikelihood( alpha0, alpha1, alpha0_shape, alpha0_inverse_scale, alpha1_shape, alpha1_inverse_scale, x, y )
alpha0 |
parameter. |
alpha1 |
parameter. |
alpha0_shape |
A number. |
alpha0_inverse_scale |
A number. |
alpha1_shape |
A number. |
alpha1_inverse_scale |
A number. |
x |
A numeric vector. |
y |
A numeric vector. |
l -> likelihood function
two-parameter logistic model with normal prior
logisticTwoPara_NormalPriorLikelihood( alpha0, alpha1, alpha0_mean, alpha0_sd, alpha1_mean, alpha1_sd, x, y )
logisticTwoPara_NormalPriorLikelihood( alpha0, alpha1, alpha0_mean, alpha0_sd, alpha1_mean, alpha1_sd, x, y )
alpha0 |
parameter. |
alpha1 |
parameter. |
alpha0_mean |
A number. |
alpha0_sd |
A number. |
alpha1_mean |
A number. |
alpha1_sd |
A number. |
x |
A numeric vector. |
y |
A numeric vector. |
l -> likelihood function
This function is used to perform maximization to select the dose level with maximum efficacy probability for next patient or cohort of patients allocation when the current sample size is greater than or equal to a pre-specified number.
maximization_phase(pE_est, seed_m=NULL)
maximization_phase(pE_est, seed_m=NULL)
pE_est |
A vector of estimated efficacy probability in the acceptable set. |
seed_m |
An integer for the seed to generate random numbers used in maximization phase, default is NULL. |
If several dose combinations have the same maximum estimated efficacy probability, then randomly select one dose level for next enrolled patient or cohort of patients.
A number is returned indicating the dose level for next patient or cohort of patients allocation.
# Assume the estimated prbabilities for each dose combination in the acceptable set as: p_est <- c(0.1, 0.2, 0.3, 0.4) # Dose level for next enrolled patient or cohort of patients is: d <- maximization_phase(p_est)
# Assume the estimated prbabilities for each dose combination in the acceptable set as: p_est <- c(0.1, 0.2, 0.3, 0.4) # Dose level for next enrolled patient or cohort of patients is: d <- maximization_phase(p_est)
This function is used to generate the plot of optimal combination dose (ODC) selections among a number simulation trials.
ODC_plot(SimsRes)
ODC_plot(SimsRes)
SimsRes |
A S4 class stores simulation results obtained from function |
Returns a ggplot object.
# input the scenario with pre-defined true toxicity and efficacy probabilities scenario <- matrix(c(0.02, 0.05, 0.04, 0.10, 0.08, 0.15, 0.12, 0.32, 0.06, 0.10, 0.10, 0.15, 0.14, 0.25, 0.20, 0.35, 0.12, 0.18, 0.16, 0.22, 0.22, 0.35, 0.25, 0.40, 0.20, 0.24, 0.24, 0.35, 0.35, 0.45, 0.40, 0.50), ncol=2, byrow = TRUE) # generate skeletons DLT_skeleton <- priorSkeletons(updelta=0.025, target=0.3, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) Efficacy_skeleton <- priorSkeletons(updelta=0.025, target=0.5, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) # simulate 1 trial under the same model and prior distribution simRes <- SIM_phase_I_II(nsim=1, Nmax=40, DoseComb=scenario, input_doseComb_forMat=c(4,4), input_type_forMat="matrix", input_Nphase=20, input_DLT_skeleton=DLT_skeleton, input_efficacy_skeleton=Efficacy_skeleton, input_DLT_thresh=0.3, input_efficacy_thresh=0.3, input_cohortsize=1, input_corr=0, input_early_stopping_safety_thresh=0.33, input_early_stopping_futility_thresh=0.2, input_model="empiric", input_para_prior="normal", input_beta_mean=0, input_beta_sd=1, input_theta_mean=0, input_theta_sd=1) ODC_plot(simRes)
# input the scenario with pre-defined true toxicity and efficacy probabilities scenario <- matrix(c(0.02, 0.05, 0.04, 0.10, 0.08, 0.15, 0.12, 0.32, 0.06, 0.10, 0.10, 0.15, 0.14, 0.25, 0.20, 0.35, 0.12, 0.18, 0.16, 0.22, 0.22, 0.35, 0.25, 0.40, 0.20, 0.24, 0.24, 0.35, 0.35, 0.45, 0.40, 0.50), ncol=2, byrow = TRUE) # generate skeletons DLT_skeleton <- priorSkeletons(updelta=0.025, target=0.3, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) Efficacy_skeleton <- priorSkeletons(updelta=0.025, target=0.5, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) # simulate 1 trial under the same model and prior distribution simRes <- SIM_phase_I_II(nsim=1, Nmax=40, DoseComb=scenario, input_doseComb_forMat=c(4,4), input_type_forMat="matrix", input_Nphase=20, input_DLT_skeleton=DLT_skeleton, input_efficacy_skeleton=Efficacy_skeleton, input_DLT_thresh=0.3, input_efficacy_thresh=0.3, input_cohortsize=1, input_corr=0, input_early_stopping_safety_thresh=0.33, input_early_stopping_futility_thresh=0.2, input_model="empiric", input_para_prior="normal", input_beta_mean=0, input_beta_sd=1, input_theta_mean=0, input_theta_sd=1) ODC_plot(simRes)
This function is used to generate the plot of patient allocation by dose combinations of a single trial.
patient_allocation_plot(data)
patient_allocation_plot(data)
data |
A data frame with 3 columns DoseLevel, DLT for toxicity outcome, and ORR for efficacy outcome. |
Returns a ggplot object.
# input the scenario with pre-defined true toxicity and efficacy probabilities scenario <- matrix(c(0.02, 0.05, 0.04, 0.10, 0.08, 0.15, 0.12, 0.32, 0.06, 0.10, 0.10, 0.15, 0.14, 0.25, 0.20, 0.35, 0.12, 0.18, 0.16, 0.22, 0.22, 0.35, 0.25, 0.40, 0.20, 0.24, 0.24, 0.35, 0.35, 0.45, 0.40, 0.50), ncol=2, byrow = TRUE) # generate skeletons DLT_skeleton <- priorSkeletons(updelta=0.025, target=0.3, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) Efficacy_skeleton <- priorSkeletons(updelta=0.025, target=0.5, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) # simulate 1 trial under the same model and prior distribution simRes <- SIM_phase_I_II(nsim=1, Nmax=40, DoseComb=scenario, input_doseComb_forMat=c(4,4), input_type_forMat="matrix", input_Nphase=20, input_DLT_skeleton=DLT_skeleton, input_efficacy_skeleton=Efficacy_skeleton, input_DLT_thresh=0.3, input_efficacy_thresh=0.3, input_cohortsize=1, input_corr=0, input_early_stopping_safety_thresh=0.33, input_early_stopping_futility_thresh=0.2, input_model="empiric", input_para_prior="normal", input_beta_mean=0, input_beta_sd=1, input_theta_mean=0, input_theta_sd=1) patient_allocation_plot(simRes$datALL[[1]])
# input the scenario with pre-defined true toxicity and efficacy probabilities scenario <- matrix(c(0.02, 0.05, 0.04, 0.10, 0.08, 0.15, 0.12, 0.32, 0.06, 0.10, 0.10, 0.15, 0.14, 0.25, 0.20, 0.35, 0.12, 0.18, 0.16, 0.22, 0.22, 0.35, 0.25, 0.40, 0.20, 0.24, 0.24, 0.35, 0.35, 0.45, 0.40, 0.50), ncol=2, byrow = TRUE) # generate skeletons DLT_skeleton <- priorSkeletons(updelta=0.025, target=0.3, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) Efficacy_skeleton <- priorSkeletons(updelta=0.025, target=0.5, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) # simulate 1 trial under the same model and prior distribution simRes <- SIM_phase_I_II(nsim=1, Nmax=40, DoseComb=scenario, input_doseComb_forMat=c(4,4), input_type_forMat="matrix", input_Nphase=20, input_DLT_skeleton=DLT_skeleton, input_efficacy_skeleton=Efficacy_skeleton, input_DLT_thresh=0.3, input_efficacy_thresh=0.3, input_cohortsize=1, input_corr=0, input_early_stopping_safety_thresh=0.33, input_early_stopping_futility_thresh=0.2, input_model="empiric", input_para_prior="normal", input_beta_mean=0, input_beta_sd=1, input_theta_mean=0, input_theta_sd=1) patient_allocation_plot(simRes$datALL[[1]])
This function is used to generate skeletons of toxicity and efficacy. This is a modifed version based on getprior
, which keep the same procedure using empiric and one-parameter logistic models assumed normal priors with and further add multiple models with various prior distributions including hyperbolic tangent model with exponential prior, empiric/one-parameter logistic models with normal prior and self-input mean values as well as with gamma prior, and two-parameter logistic model with normal/gamma priors.
priorSkeletons(updelta, target, npos, ndose, model = "empiric", prior = "normal", alpha_mean=NULL, beta_mean=0, a0 = 3, alpha_shape=NULL, alpha_inverse_scale=NULL, beta_shape=NULL, beta_inverse_scale=NULL)
priorSkeletons(updelta, target, npos, ndose, model = "empiric", prior = "normal", alpha_mean=NULL, beta_mean=0, a0 = 3, alpha_shape=NULL, alpha_inverse_scale=NULL, beta_shape=NULL, beta_inverse_scale=NULL)
updelta |
The half-width of the indifference intervals. |
target |
The target DLT rate. |
npos |
The prior guess of the position of MTD. |
ndose |
The number of testing doses. |
model |
A character string to specify the model used. The default model is "empiric". Other models include hyperbolic tangent model specified by "tanh", one-parameter logistic model specified by "logistic", and two-parameter logistic model specified by "logistic2". |
prior |
A character sting to specify the prior distribution of parameter. The default prior is "normal" used together with the model="empiric". Other prior distributions include "exponential" when model="tanh", "gamma" when model="empiric", "normal" and "gamma" when model="logistic" and "logistic2". |
alpha_mean |
The mean of intercept parameter of two-parameter logistic model only used when model="logistic2" and prior="normal", otherwise will be ignored. |
beta_mean |
The mean of parameter used when prior="exponential" or "normal", otherwise will be ignored. |
a0 |
A constant value of intercept from a one-parameter logistic model only used when model="logistic" with default value 3, otherwise will be ignored. |
alpha_shape |
The shape parameter of intercept parameter only used when model="logistic2" and prior="gamma", otherwise will be ignored. |
alpha_inverse_scale |
The scale parameter of intercept parameter only used when model="logistic2" and prior="gamma", otherwise will be ignored. |
beta_shape |
The shape parameter used when prior="gamma", otherwise will be ignored. |
beta_inverse_scale |
The scale parameter used when prior="gamma", otherwise will be ignored. |
A vector of length is returned.
The skeletons can be either specified by clinical researchers based on history information or directly generated based on this function given specific model and prior distribution.
Lee, S. M., & Cheung, Y. K. (2009). Model calibration in the continual reassessment method. Clinical Trials, 6(3), 227-238. doi:10.1177/1740774509105076
# generate skeleton based on empiric model with normal prior prior <- priorSkeletons(updelta = 0.01, target = 0.25, npos= 5, ndose = 9, beta_mean = 0) # generate skeleton based on one-parameter logistic model with normal prior prior <- priorSkeletons(updelta = 0.01, target = 0.25, npos= 5, ndose = 9, model = "logistic", prior = "normal", beta_mean = 0, a0 = 3)
# generate skeleton based on empiric model with normal prior prior <- priorSkeletons(updelta = 0.01, target = 0.25, npos= 5, ndose = 9, beta_mean = 0) # generate skeleton based on one-parameter logistic model with normal prior prior <- priorSkeletons(updelta = 0.01, target = 0.25, npos= 5, ndose = 9, model = "logistic", prior = "normal", beta_mean = 0, a0 = 3)
This function is used to perform adaptive randomization for next patient or cohort of patients allocation when the current sample size is less than a pre-specified number.
randomization_phase(pE_est, seed_r=NULL)
randomization_phase(pE_est, seed_r=NULL)
pE_est |
A vector of estimated efficacy probability in the acceptable set. |
seed_r |
An integer for the seed to generate random numbers used in randomization phase, default is NULL. |
The dose combination for next patient or cohort of patients allocation is with probability
A number is returned indicating the dose level for next patient or cohort of patients allocation.
# Assume the estimated prbabilities for each dose combination in the acceptable set as: p_est <- c(0.1, 0.2, 0.3, 0.4) # Dose level for next enrolled patient or cohort of patients is: d <- randomization_phase(p_est)
# Assume the estimated prbabilities for each dose combination in the acceptable set as: p_est <- c(0.1, 0.2, 0.3, 0.4) # Dose level for next enrolled patient or cohort of patients is: d <- randomization_phase(p_est)
Generate correlated bivariate binary outcomes of toxicity and efficacy for a cohort number of patients.
rBin2Corr(cohortsize, pT, pE, psi, seed=NULL)
rBin2Corr(cohortsize, pT, pE, psi, seed=NULL)
cohortsize |
Number of patients in each cohort. |
pT |
Toxicity probability. |
pE |
Efficacy probability. |
psi |
Association parameter for efficacy and toxicity, where psi=0 means toxicity and efficacy is independent. |
seed |
An integer for the seed to generate random numbers, default is NULL. |
The formula for generating correlated binary variables is
where , so that four probabilities can be calculated for the possible combinations of (toxicity, efficacy) including
given
and
. Multinomial distribution
rmultinom
is further used to generate bivariate binary outcomes (number equals to cohortsize) based on the four calculated probabilities.
Return a matrix with columns corresponding to toxicity and efficacy, and rows for each observations of binary outcome with 0 for no toxicity (no efficacy) and 1 for toxicity (efficacy) at the first (second) column.
Murtaugh, P. A., & Fisher, L. D. (1990). Bivariate binary models of efficacy and toxicity in dose-ranging trials. Communications in Statistics-Theory and Methods, 19(6), 2003-2020. doi:10.1080/03610929008830305
Thall, P. F., & Cook, J. D. (2004). Dose‐finding based on efficacy–toxicity trade‐offs. Biometrics, 60(3), 684-693. doi:10.1111/j.0006-341X.2004.00218.x
rBin2Corr(cohortsize = 1, pT = 0.2, pE = 0.4, psi = 0, seed=12)
rBin2Corr(cohortsize = 1, pT = 0.2, pE = 0.4, psi = 0, seed=12)
This function is used to generate the plot of relationships between outcomes and total average sample size, number of patients for determination of randomization phase, skeleton, and Association parameter for efficacy and toxicity binary outcome by different scenarios and link functions.
sample_plot(dat, outcome, outname, N = NULL, nR = NULL, Skeleton = NULL, corr = NULL)
sample_plot(dat, outcome, outname, N = NULL, nR = NULL, Skeleton = NULL, corr = NULL)
dat |
Input data used for plot. |
outcome |
Column name for the outcome used in the plot. |
outname |
A string for the name of outcome. |
N |
Maximum sample size, if not fixed, use the default value NULL. |
nR |
Number of patients for determination of randomization phase, if not fixed, use the default value NULL. |
Skeleton |
Two skeletons with number 1 and 2, if not fixed, use the default value NULL. |
corr |
Association parameter for efficacy and toxicity, if not fixed, use the default value NULL. |
4 settings with multiple inputs: need to fix three and plot each outcome vs. the remaining one by 6 scenarios:
1. N: maximum sample size -> 40, 50, 60
2. nR: subset sample size -> 10, 20, 30
3. Skeleton: two sets of skeletons for toxicity and efficacy
4. corr: correlation between toxicity and efficacy binary outcomes -> 0, -2.049, 0.814
Returns a ggplot object.
# load the data stored in the crm12Comb package data(examples_results, package = "crm12Comb") # fix the number of patients for determination of randomization phase, skeleton, # and Association parameter for efficacy and toxicity binary outcome # plot the relationship between # "Probability of ODC as target combinations" vs. total average sample size sample_plot(examples_results, outcome = "prob_target", outname = "Probability of ODC as target combinations", N = NULL, nR = 20, Skeleton = 1, corr = 0)
# load the data stored in the crm12Comb package data(examples_results, package = "crm12Comb") # fix the number of patients for determination of randomization phase, skeleton, # and Association parameter for efficacy and toxicity binary outcome # plot the relationship between # "Probability of ODC as target combinations" vs. total average sample size sample_plot(examples_results, outcome = "prob_target", outname = "Probability of ODC as target combinations", N = NULL, nR = 20, Skeleton = 1, corr = 0)
This function is to realize the simulations of whole process of combined phase I and phase II design for drug combinations with early stopping rules and flexible user-defined model or prior distribution, returning operating characters for performace evaluations and comparisons.
SIM_phase_I_II(nsim, Nmax, DoseComb, input_doseComb_forMat, input_type_forMat, input_Nphase, input_DLT_skeleton, input_efficacy_skeleton, input_DLT_thresh=0.3, input_efficacy_thresh=0.3, input_M_prob=NULL, input_K_prob=NULL, input_cohortsize=1, input_corr=0, input_early_stopping_safety_thresh=0.33, input_early_stopping_futility_thresh=0.2, input_model="empiric", input_para_prior="normal", input_beta_mean=0, input_beta_sd=1, input_intcpt_lgst1=3, input_beta_shape=1, input_beta_inverse_scale=1, input_theta_mean=0, input_theta_sd=1, input_theta_intcpt_lgst1=3, input_theta_shape=1, input_theta_inverse_scale=1, input_alpha_mean=3, input_alpha_sd=1, input_alpha_shape=1, input_alpha_inverse_scale=1, input_alphaT_mean=3, input_alphaT_sd=1, input_alphaT_shape=1, input_alphaT_inverse_scale=1, random_seed=42)
SIM_phase_I_II(nsim, Nmax, DoseComb, input_doseComb_forMat, input_type_forMat, input_Nphase, input_DLT_skeleton, input_efficacy_skeleton, input_DLT_thresh=0.3, input_efficacy_thresh=0.3, input_M_prob=NULL, input_K_prob=NULL, input_cohortsize=1, input_corr=0, input_early_stopping_safety_thresh=0.33, input_early_stopping_futility_thresh=0.2, input_model="empiric", input_para_prior="normal", input_beta_mean=0, input_beta_sd=1, input_intcpt_lgst1=3, input_beta_shape=1, input_beta_inverse_scale=1, input_theta_mean=0, input_theta_sd=1, input_theta_intcpt_lgst1=3, input_theta_shape=1, input_theta_inverse_scale=1, input_alpha_mean=3, input_alpha_sd=1, input_alpha_shape=1, input_alpha_inverse_scale=1, input_alphaT_mean=3, input_alphaT_sd=1, input_alphaT_shape=1, input_alphaT_inverse_scale=1, random_seed=42)
nsim |
Number of simulation trials. |
Nmax |
Number of maximum enrolled patients for each trial. |
DoseComb |
A matrix with rows of length equaling number of dose combinations and columns of length equaling number of drugs for pre-defined true toxicity and true efficacy probabilities corresponding to each dose combinations. |
input_doseComb_forMat |
For 2 drugs, either a matrix with columns for all combinations and rows for two drugs when input_type_forMat is "comb", or a vector of length 2 indicating the number of levels of each drug when input_type_forMat is "matrix" should be input. For more than 2 drugs, a list of all possible orderings should be input when input_type_forMat is "self". |
input_type_forMat |
A character string to indicate the input type of dose combinations. The type_forMat is either "comb" for inputting all tested dose combinations for 2 drugs, "matrix" for entering number of levels of two drugs so that a matrix of combinations can be constructed, or "self" for more than 3 drugs with directly input of all possible orderings. |
input_Nphase |
Number of patients for determination of randomization phase (current number of patients less than Nphase) or maximization phase (current number of patients larger than or equal to Nphase). |
input_DLT_skeleton |
A vector with same length of dose combinations for toxicity skeleton for each dose combination. |
input_efficacy_skeleton |
A vector with same length of dose combinations for efficacy skeleton for each dose combination. |
input_DLT_thresh |
DLT threshold to define acceptable set. |
input_efficacy_thresh |
Efficacy threshold to define target combinations. |
input_M_prob |
A vector with same length of possible toxicity orderings denoting prior probabilities of toxicity orderings (sum is 1). |
input_K_prob |
A vector with same length of possible efficacy orderings denoting prior probabilities of efficacy orderings (sum is 1). |
input_cohortsize |
Number of patients in each cohort. |
input_corr |
Association parameter for efficacy and toxicity, where 0 means toxicity and efficacy is independent. |
input_early_stopping_safety_thresh |
Safety threshold for early stopping condition. |
input_early_stopping_futility_thresh |
Futility threshold for early stopping condition. |
input_model |
A character string to specify the model used, must be one of "empiric", "tanh", "logistic" or "logistic2". |
input_para_prior |
A character string to specify the prior distribution used for parameters, must be one of "normal" or "gamma" (when input_model is either "empiric" or "logistic" or "logistic2") or "exponential" (when input_model is "tanh"). |
input_beta_mean |
The mean of parameter used when input_para_prior="exponential" or "normal", otherwise will be ignored. |
input_beta_sd |
The standard deviation of parameter used when input_para_prior="normal", otherwise will be ignored. |
input_intcpt_lgst1 |
A constant value of intercept from a one-parameter logistic model only used when input_model="logistic" (suggested value is 3), otherwise will be ignored. |
input_beta_shape |
The shape parameter used when input_para_prior="gamma", otherwise will be ignored. |
input_beta_inverse_scale |
The scale parameter used when input_para_prior="gamma", otherwise will be ignoredL. |
input_theta_mean |
The mean of parameter used when input_para_prior="exponential" or "normal", otherwise will be ignored. |
input_theta_sd |
The standard deviation of parameter used when input_para_prior="normal", otherwise will be ignored. |
input_theta_intcpt_lgst1 |
A constant value of intercept from a one-parameter logistic model only used when input_model="logistic" (default value is 3), otherwise will be ignored. |
input_theta_shape |
The shape parameter used when input_para_prior="gamma", otherwise will be ignored. |
input_theta_inverse_scale |
The scale parameter used when input_para_prior="gamma", otherwise will be ignored. |
input_alpha_mean |
The mean of intercept parameter of two-parameter logistic model only used when model="logistic2" and input_para_prior="normal", otherwise will be ignored. |
input_alpha_sd |
The standard deviation of intercept parameter of two-parameter logistic model only used when input_model="logistic2" and input_para_prior="normal", otherwise will be ignored. |
input_alpha_shape |
The shape parameter of intercept parameter from a two-parameter logistic model only used when input_model="logistic2" and input_para_prior="gamma", otherwise will be ignored. |
input_alpha_inverse_scale |
The scale parameter of intercept parameter from a two-parameter logistic model only used when input_model="logistic2" and input_para_prior="gamma", otherwise will be ignored. |
input_alphaT_mean |
The mean of intercept parameter of two-parameter logistic model only used when model="logistic2" and input_para_prior="normal", otherwise will be ignored. |
input_alphaT_sd |
The standard deviation of intercept parameter of two-parameter logistic model only used when input_model="logistic2" and input_para_prior="normal", otherwise will be ignored. |
input_alphaT_shape |
The shape parameter of intercept parameter from a two-parameter logistic model only used when input_model="logistic2" and input_para_prior="gamma", otherwise will be ignored. |
input_alphaT_inverse_scale |
The scale parameter of intercept parameter from a two-parameter logistic model only used when input_model="logistic2" and input_para_prior="gamma", otherwise will be ignored. |
random_seed |
An integer for the start seed to generate random numbers, default is 42. |
This function is to realize the whole process of combined phase I and phase II adaptive design for drug combinations based on CRM amonng number of simulation trials. For each trial, basic steps include starting the trial for first patient or cohor of patients allocation, toxicity and efficacy estimations by current data, adaptive randomization or maximization phase for next patient or cohort of patients allocation, updating current data of patients enrollment, determining early stoppings for safety or fuility, and selecting optimal dose combination (ODC) after reaching maximum sample size or stopping early.
A list of operating characteristics is returned containing the following components:
prob_safe |
Probability of simulation trials with ODC identified as safe/ineffective combinations. |
prob_target |
Probability of simulation trials with ODC identified as target combinations. |
prob_toxic |
Probability of simulation trials with ODC identified as toxic combinations. |
mean_SS |
Average number of patients enrolled. |
mean_ODC |
Average proportion of patients allocated to target ODS(s). |
prob_stop_safety |
Probability of simulation trials stopping early for safety. |
prob_stop_futility |
Probability of simulation trials stopping early for futility. |
mean_DLT |
Average observed DLT rate. |
mean_ORR |
Average observed response rate. |
Npatient |
A vector of number of patients enrolled for all simulation trials. |
ODC |
A vector of ODC for all simulation trials. |
prop_ODC |
A list of vectors storing dose levels for each patients allocation. |
datALL |
A list of data frames storing data of (doselevel, toxicity, efficacy) for each patient. |
Wages, N. A., & Conaway, M. R. (2014). Phase I/II adaptive design for drug combination oncology trials. Statistics in medicine, 33(12), 1990-2003. doi:10.1002/sim.6097
priorSkeletons
, get_ordering
, toxicity_est
, efficacy_est
, rBin2Corr
, binom.test
# input the scenario with pre-defined true toxicity and efficacy probabilities scenario <- matrix(c(0.02, 0.05, 0.04, 0.10, 0.08, 0.15, 0.12, 0.32, 0.06, 0.10, 0.10, 0.15, 0.14, 0.25, 0.20, 0.35, 0.12, 0.18, 0.16, 0.22, 0.22, 0.35, 0.25, 0.40, 0.20, 0.24, 0.24, 0.35, 0.35, 0.45, 0.40, 0.50), ncol=2, byrow = TRUE) # generate skeletons DLT_skeleton <- priorSkeletons(updelta=0.025, target=0.3, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) Efficacy_skeleton <- priorSkeletons(updelta=0.025, target=0.5, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) # simulate 1 trial under the same model and prior distribution simRes <- SIM_phase_I_II(nsim=1, Nmax=40, DoseComb=scenario, input_doseComb_forMat=c(4,4), input_type_forMat="matrix", input_Nphase=20, input_DLT_skeleton=DLT_skeleton, input_efficacy_skeleton=Efficacy_skeleton, input_DLT_thresh=0.3, input_efficacy_thresh=0.3, input_cohortsize=1, input_corr=0, input_early_stopping_safety_thresh=0.33, input_early_stopping_futility_thresh=0.2, input_model="empiric", input_para_prior="normal", input_beta_mean=0, input_beta_sd=1, input_theta_mean=0, input_theta_sd=1)
# input the scenario with pre-defined true toxicity and efficacy probabilities scenario <- matrix(c(0.02, 0.05, 0.04, 0.10, 0.08, 0.15, 0.12, 0.32, 0.06, 0.10, 0.10, 0.15, 0.14, 0.25, 0.20, 0.35, 0.12, 0.18, 0.16, 0.22, 0.22, 0.35, 0.25, 0.40, 0.20, 0.24, 0.24, 0.35, 0.35, 0.45, 0.40, 0.50), ncol=2, byrow = TRUE) # generate skeletons DLT_skeleton <- priorSkeletons(updelta=0.025, target=0.3, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) Efficacy_skeleton <- priorSkeletons(updelta=0.025, target=0.5, npos=10, ndose=16, model = "empiric", prior = "normal", beta_mean=0) # simulate 1 trial under the same model and prior distribution simRes <- SIM_phase_I_II(nsim=1, Nmax=40, DoseComb=scenario, input_doseComb_forMat=c(4,4), input_type_forMat="matrix", input_Nphase=20, input_DLT_skeleton=DLT_skeleton, input_efficacy_skeleton=Efficacy_skeleton, input_DLT_thresh=0.3, input_efficacy_thresh=0.3, input_cohortsize=1, input_corr=0, input_early_stopping_safety_thresh=0.33, input_early_stopping_futility_thresh=0.2, input_model="empiric", input_para_prior="normal", input_beta_mean=0, input_beta_sd=1, input_theta_mean=0, input_theta_sd=1)
Title: Bayesian likelihood inference
tanh_ExpPriorLikelihood(beta, beta_mean, x, y)
tanh_ExpPriorLikelihood(beta, beta_mean, x, y)
beta |
parameter. |
beta_mean |
A number. |
x |
A numeric vector. |
y |
A numeric vector. |
l -> likelihood function
: R package dfcrm Hyperbolic tangent model with exponential prior
Estimate toxicity using Bayesian inference for each enrolled patient or cohort of patients given the current accumulated data.
toxicity_est(Dat, I, M, M_prob, DLT_skeleton, DLT_thresh, model, para_prior, beta_mean, beta_sd, intcpt_lgst1, beta_shape, beta_inverse_scale, alpha_mean, alpha_sd, alpha_shape, alpha_inverse_scale, seed=NULL)
toxicity_est(Dat, I, M, M_prob, DLT_skeleton, DLT_thresh, model, para_prior, beta_mean, beta_sd, intcpt_lgst1, beta_shape, beta_inverse_scale, alpha_mean, alpha_sd, alpha_shape, alpha_inverse_scale, seed=NULL)
Dat |
A data frame for current data with three columns (DoseLevel, DLT and ORR). |
I |
Number of dose combinations. |
M |
Number of toxicity orderings. |
M_prob |
A vector of length |
DLT_skeleton |
A list of vector with length |
DLT_thresh |
DLT threshold to define acceptable set. |
model |
A character string to specify the model used, must be one of "empiric", "tanh", "logistic" or "logistic2". |
para_prior |
A character string to specify the prior distribution used for parameters, must be one of "normal" or "gamma" (when model is either "empiric" or "logistic" or "logistic2") or "exponential" (when model is "tanh"). |
beta_mean |
The mean of parameter used when prior="exponential" or "normal", otherwise need to specify NULL. |
beta_sd |
The standard deviation of parameter used when prior="normal", otherwise need to specify NULL. |
intcpt_lgst1 |
A constant value of intercept from a one-parameter logistic model only used when model="logistic" (suggested value is 3), otherwise need to specify NULL. |
beta_shape |
The shape parameter used when prior="gamma", otherwise need to specify NULL. |
beta_inverse_scale |
The scale parameter used when prior="gamma", otherwise need to specify NULL. |
alpha_mean |
The mean of intercept parameter of two-parameter logistic model only used when model="logistic2" and prior="normal", otherwise need to specify NULL. |
alpha_sd |
The standard deviation of intercept parameter of two-parameter logistic model only used when model="logistic2" and prior="normal", otherwise need to specify NULL. |
alpha_shape |
The shape parameter of intercept parameter from a two-parameter logistic model only used when model="logistic2" and prior="gamma", otherwise need to specify NULL. |
alpha_inverse_scale |
The scale parameter of intercept parameter from a two-parameter logistic model only used when model="logistic2" and prior="gamma", otherwise need to specify NULL. |
seed |
An integer for the seed to generate random numbers used for equal ordering prior probabilities, default is NULL. |
The toxicity estimation is based on Bayesian framework by calculating the likelihood function under each orderings, and select the ordering with maximum posterior probability. Then, estimated parameters can be obtained, which will be used for toxicity estimation based on the corresponding link function (specified in statement).
A list is returned containing the following components:
AR |
A vector for dose levels belonging to acceptable set (estimated DLT rate less than pre-specified DLT threshold). |
M_prob |
A vector for posterier density of toxicity orderings and will be used as prior information for next enrolled patient or cohort of patients. |
Wages, N. A., & Conaway, M. R. (2014). Phase I/II adaptive design for drug combination oncology trials. Statistics in medicine, 33(12), 1990-2003. doi:10.1002/sim.6097
# Generate a data including 3 columns: DoseLevel, DLT, ORR (DLT and ORR are binary outcomes) currDat <- data.frame(sample(1:9, 6, replace=TRUE), rbinom(6, 1, 0.2), rbinom(6, 1, 0.5)) names(currDat) <- c("DoseLevel", "DLT", "ORR") # Generate toxicity skeleton DLT_skeleton_p <- priorSkeletons(updelta = 0.045, target = 0.3, npos= 5, ndose = 9, model = "logistic", prior = "normal", beta_mean = 0, a0 = 3) # Obtain 6 complete orderings for toxicity skeleton orderings <- get_ordering(doseComb_forMat=c(3,3), type_forMat="matrix") DLT_skeleton_l <- lapply(orderings, function(or){DLT_skeleton_p[or]}) # estimate toxicity tox <- toxicity_est(Dat=currDat, I=9, M=6, M_prob=rep(1/6, 6), DLT_skeleton=DLT_skeleton_l, DLT_thresh=0.3, model="logistic", para_prior="normal", beta_mean=0, beta_sd=1, intcpt_lgst1=3, beta_shape=NULL, beta_inverse_scale=NULL, alpha_mean=NULL, alpha_sd=NULL, alpha_shape=NULL, alpha_inverse_scale=NULL, seed=42)
# Generate a data including 3 columns: DoseLevel, DLT, ORR (DLT and ORR are binary outcomes) currDat <- data.frame(sample(1:9, 6, replace=TRUE), rbinom(6, 1, 0.2), rbinom(6, 1, 0.5)) names(currDat) <- c("DoseLevel", "DLT", "ORR") # Generate toxicity skeleton DLT_skeleton_p <- priorSkeletons(updelta = 0.045, target = 0.3, npos= 5, ndose = 9, model = "logistic", prior = "normal", beta_mean = 0, a0 = 3) # Obtain 6 complete orderings for toxicity skeleton orderings <- get_ordering(doseComb_forMat=c(3,3), type_forMat="matrix") DLT_skeleton_l <- lapply(orderings, function(or){DLT_skeleton_p[or]}) # estimate toxicity tox <- toxicity_est(Dat=currDat, I=9, M=6, M_prob=rep(1/6, 6), DLT_skeleton=DLT_skeleton_l, DLT_thresh=0.3, model="logistic", para_prior="normal", beta_mean=0, beta_sd=1, intcpt_lgst1=3, beta_shape=NULL, beta_inverse_scale=NULL, alpha_mean=NULL, alpha_sd=NULL, alpha_shape=NULL, alpha_inverse_scale=NULL, seed=42)