View source: R/groupRAR_functions.R
| Group.dyldDBCD_Cont | R Documentation |
Simulating the group doubly biased coin design with delayed continuous response (number of arms \ge 2) in a clinical trial context. (Inference: two-sided t-test for two arms or chi-square test for more than two arms.)
Group.dyldDBCD_Cont(n0 = 20, theta, k, ssn, gsize.param, rspT.dist,
rspT.param, target.alloc = "Neyman", r = 2, nsim = 2000,
eTime = 7, mRate = NULL, alpha = 0.05,
allocation = "DBCD", erade.alpha = 0.5, lower.bound = 0,
test.fun = NULL, typeI = FALSE, seed = NULL)
n0 |
A positive integer and a multiple of |
theta |
A numerical vector of length |
k |
A positive integer. The number of treatment groups in the trial ( |
ssn |
A positive integer. The total number of participants in each simulated trial. |
gsize.param |
A positive number. Group sizes are drawn from a zero-truncated Poisson distribution with rate |
rspT.dist |
The distribution of the time from enrollment until the response is observed. One of |
rspT.param |
A numeric vector of parameters for the response-time distribution of each treatment. For |
target.alloc |
Desired allocation proportion. One of |
r |
A non-negative number. The tuning parameter of Hu and Zhang's allocation function, used when |
nsim |
A positive integer. The number of simulated trials, with a default value of 2000. |
eTime |
A positive number. The time between the enrollment of consecutive groups. Allocation probabilities are updated once per group, using the responses observed by then. The default is 7. |
mRate |
A number between 0 and 1 giving the probability that a response is missing. Missingness is simulated completely at random (MCAR), and missing responses are excluded from estimation and testing. The default |
alpha |
A number between 0 and 1. The significance level of the two-sided test, with a default value of 0.05. |
allocation |
The allocation function. |
erade.alpha |
A number between 0 and 1. The degree of randomization of ERADE, used when |
lower.bound |
A number between 0 and |
test.fun |
An optional function |
typeI |
Logical. If |
seed |
An optional integer passed to |
Hu and Zhang's doubly biased coin design (DBCD) adjusts the probability of assigning each patient to a specific treatment group in a clinical trial, based on the responses of all previous patients. The group DBCD is a more practical version of this approach. It updates the allocation probabilities for the patients in each group based on the available responses of all preceding groups, either when the data become available or at fixed time intervals (for example weekly or biweekly). This function implements the group doubly biased coin design for delayed continuous responses.
The process begins by assigning the first n0 patients (possibly the first few groups) to treatment groups using restricted randomization and collecting their responses. Initial parameter estimates for the response variable are then obtained for each treatment group. Based on these estimates, the estimated desired allocation proportion is calculated. Then Hu and Zhang's allocation function is applied to determine the probabilities for the next group of patients to be assigned to each treatment group, which drive the allocation proportion towards the desired one. This process is repeated sequentially for each group until the predetermined number of patients has been allocated.
This methodology was introduced by Zhai, Li, Zhang and Hu (2024) in their paper 'Group response-adaptive randomization with delayed and missing responses'.
Target allocations. "Neyman" is proportional to \sigma_k. "ZR" is the allocation of Zhang and Rosenberger (2006), which minimizes the total expected response (smaller responses are better, and all means must be positive). For two arms it is their rule (7): \rho_1 = \sigma_1\sqrt{\mu_2}/(\sigma_1\sqrt{\mu_2} + \sigma_2\sqrt{\mu_1}) when this assigns more patients to the arm with the smaller mean, and 1/2 otherwise. For three or more arms it minimizes the total expected response for a fixed noncentrality parameter of the chi-squared test of equal means, with every proportion at least lower.bound, the continuous analogue of Tymofyeyev, Rosenberger and Hu (2007). "OptimalNeyman" minimizes the total sample size under the same constraints and equals "Neyman" for two arms with lower.bound = 0. For three or more arms a positive lower.bound such as 0.1 is recommended with "ZR" and "OptimalNeyman". "DaOptimal" is proportional to \sigma_k^{4/3}. While the target cannot be estimated (for example with fewer than two responses in an arm) equal allocation is used.
Allocation functions. With allocation = "ERADE" and \alpha = erade.alpha, arm k receives the next patient (in group designs, each patient of the next group) with probability \alpha\hat\rho_k if it is over-allocated (N_k/m > \hat\rho_k), \hat\rho_k if it is on target, and \hat\rho_k + (1-\alpha)\sum_{j \in S}\hat\rho_j/|T| if it is under-allocated, where S and T are the sets of over- and under-allocated arms, N_k/m is the current allocation proportion and \hat\rho is the estimated target (Alkhnefr, Hu and Zhai, 2025, eq. (1)). For two arms this is the ERADE of Hu, Zhang and He (2009). ERADE attains the lower bound of the asymptotic variance of the allocation proportions, so its allocation is less variable than that of the DBCD.
An object of class "grouprar", a list that is printed as a short summary (see print.grouprar), with the following elements.
method |
The name of the procedure. |
sample size |
The total sample size ( |
parameter |
The true means and variances used in the simulations, named |
propotion |
The mean allocation proportion of each arm over the simulations, named |
sd of propotion |
The standard deviation of the allocation proportion of each arm over the simulations. |
failure rate |
The mean response over the simulations (for continuous responses this element holds the mean response, not a failure rate). |
sd of failure rate |
The standard deviation of the failure rate (or mean response) over the simulations. |
power |
The proportion of simulated trials that reject the null hypothesis of equal means. Simulations in which the test cannot be computed are dropped. |
data: failureRate |
The failure rate (or mean response) of each simulated trial. |
data: test |
The test decision of each simulated trial (1 = reject). |
data: assignment |
The treatment assignments of the last simulated trial. |
data: propotion |
A data frame with the allocation proportions of each simulated trial. |
data: allocation |
An |
type I error |
Only if |
duration |
The mean time from the first enrollment to the last observed response. Trials without any observed response have duration NA and are left out of the mean. |
sd of duration |
The standard deviation of the duration over the simulations. |
enrollment duration |
The mean time from the first to the last enrollment. |
data: duration |
The duration of each simulated trial. |
data: enrollment |
The enrollment duration of each simulated trial. |
Alkhnefr, N., Hu, F. and Zhai, G. (2025). Efficient randomized adaptive designs for multi-arm clinical trials. Statistical Methods in Medical Research, 34(9), 1886-1898. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/09622802251362644")}
Hu, F. and Zhang, L. X. (2004). Asymptotic properties of doubly adaptive biased coin designs for multitreatment clinical trials. The Annals of Statistics, 32(1), 268-301. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/aos/1079120137")}
Hu, F., Zhang, L. X. and He, X. (2009). Efficient randomized-adaptive designs. The Annals of Statistics, 37(5A), 2543-2560. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/08-AOS655")}
Tymofyeyev, Y., Rosenberger, W. F. and Hu, F. (2007). Implementing optimal allocation in sequential binary response experiments. Journal of the American Statistical Association, 102(477), 224-234. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1198/016214506000000906")}
Zhai, G., Li, Y., Zhang, L. and Hu, F. (2024). Group response-adaptive randomization with delayed and missing responses. Statistics in Medicine, 43(27), 5047-5059. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.10220")}
Zhang, L. and Rosenberger, W. F. (2006). Response-adaptive randomization for clinical trials with continuous outcomes. Biometrics, 62(2), 562-569. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.1541-0420.2005.00496.x")}
# a simple use
## Arguments for generating the simulated data
### For response simulation
theta = c(13, 4.0^2, 15, 2.5^2)
k = 2
ssn = 120
### for entry time and response time simulation
eTime = 7
gsize.param = 5
rspT.param = rep(10, 2)
rspT.dist = "exponential"
## Arguments for the design
n0 = 10
target.alloc = "Neyman"
res <- Group.dyldDBCD_Cont(n0 = n0, theta = theta, k = k, ssn = ssn,
gsize.param = gsize.param, rspT.dist = rspT.dist,
rspT.param = rspT.param, target.alloc = target.alloc,
r = 2, nsim = 100, eTime = eTime, mRate = 0.2, alpha = 0.05)
# View the output (a list of all results)
res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.