CADBCD_Alloc_Surv: Allocation Function of Covariate Adjusted Doubly Biased Coin...

View source: R/CARA_function.R

CADBCD_Alloc_SurvR Documentation

Allocation Function of Covariate Adjusted Doubly Biased Coin Design for Survival Response

Description

Calculating the probability of assigning the upcoming patient to treatment A based on the patient's covariates and the previous patients' covariates and responses for Covariate Adjusted Doubly Biased Coin procedure for survival trial.

Usage

CADBCD_Alloc_Surv(ptsb.cov, ptsb.t, ptsb.Y, ptsb.E, ptnow.cov, v = 2, target)

Arguments

ptsb.cov

a n x k covariate matrix of previous patients.

ptsb.t

a treatment vector of previous patients with length n.

ptsb.Y

a response vector of previous patients with length n.

ptsb.E

a censoring indicator vector (1 = event observed, 0 = censored)with length n.

ptnow.cov

a covariate vector of the incoming patient with length k.

v

a non-negative integer that controls the randomness of CADBCD design. The default value is 2.

target

the type of optimal allocation target. Options are "Neyman" or "RSIHR".

Details

For the first m = 2m_0 patients, a restricted randomization procedure is used to allocate them equally to treatments A and B.

After the initial enrollment of 2m_0 patients, adaptive treatment assignment begins from patient 2m_0 + 1 onward. Importantly, this adaptive assignment does not require complete observation of outcomes from earlier patients. Instead, at each new patient arrival, the treatment effect parameters (\tilde{\boldsymbol{\beta}}_{A,m}, \tilde{\boldsymbol{\beta}}_{B,m}) are re-estimated via partial likelihood using the accrued survival data subject to dynamic administrative censoring. Specifically, each previously enrolled patient is censored at the current arrival time if their event has not yet occurred. These updated estimates are then used to guide covariate-adjusted allocation.

When the (m+1)-th patient enters the trial with covariate vector \boldsymbol{Z}_{m+1}, the probability of assigning this patient to treatment A is computed as:

\phi_{m+1} = g(\tilde{\boldsymbol{\beta}}_{A,m}, \tilde{\boldsymbol{\beta}}_{B,m}, \boldsymbol{Z}_{m+1}),

where 0 \leq g(\cdot) \leq 1 is an appropriately chosen allocation function that favors the better-performing treatment arm.

Following Zhang and Hu's CADBCD procedure, let N_A(m) and N_B(m) = m - N_A(m) denote the numbers of patients allocated to treatments A and B after m assignments. Let \tilde{\pi}_m = \pi_A(\tilde{\boldsymbol{\beta}}_{A,m}, \tilde{\boldsymbol{\beta}}_{B,m}, \boldsymbol{Z}_{m+1}) be the target allocation probability for the incoming patient. The average target allocation proportion among the first m patients is defined as:

\tilde{\rho}_m = \frac{1}{m} \sum_{i=1}^m \pi_A(\tilde{\boldsymbol{\beta}}_{A,m}, \tilde{\boldsymbol{\beta}}_{B,m}, \boldsymbol{Z}_i).

Under the CADBCD scheme, the probability of assigning treatment A to the (m+1)-th patient is given by:

\phi_{m+1} = \frac{\tilde{\pi}_m \left( \frac{\tilde{\rho}_m}{N_A(m)/m} \right)^v} {\tilde{\pi}_m \left( \frac{\tilde{\rho}_m}{N_A(m)/m} \right)^v + (1 - \tilde{\pi}_m) \left( \frac{1 - \tilde{\rho}_m}{N_B(m)/m} \right)^v},

and to treatment 2 with probability \psi_{m+1,2} = 1 - \psi_{m+1,1}, where v \geq 0 is a constant controlling the degree of randomness—from the most random when v = 0 to the most deterministic when v \rightarrow \infty. similiar procedure for survival responses are used in all other designs.

Value

prob

Probability of assigning the upcoming patient to treatment A.

References

Mukherjee, A., Jana, S., & Coad, S. (2024). Covariate-adjusted response-adaptive designs for semiparametric survival models. Statistical Methods in Medical Research, 09622802241287704.

Examples

set.seed(123)
n = 40
covariates = cbind(rexp(40),rexp(40))
treatment = sample(c(0, 1), n, replace = TRUE)
survival_time = rexp(n, rate = 1)
censoring = runif(n)
event = as.numeric(survival_time < censoring)
new_patient_cov = c(Z1 = 1, Z2 = 0.5)
result = CADBCD_Alloc_Surv(
 ptsb.cov = covariates,
 ptsb.t = treatment,
 ptsb.Y = survival_time,
 ptsb.E = event,
 ptnow.cov = new_patient_cov,
 v = 2,
 target = "Neyman"
)
print(result$prob)

caradpt documentation built on Aug. 28, 2025, 9:09 a.m.