View source: R/groupRAR_tools.R
| nextAlloc | R Documentation |
Computes the allocation probabilities of the next patient, or of the next group of patients, in an ongoing response-adaptive randomized trial from the assignments and responses observed so far, and optionally draws the assignments. The same estimates, targets and allocation functions as in the simulation functions (for example DBCD_Bin and Group.DBCD_Bin) are used.
nextAlloc(alloc, outcome, k, response = "binary", target.alloc = NULL,
allocation = "DBCD", r = 2, erade.alpha = 0.5, lower.bound = 0,
theta0 = NULL, size = 1)
alloc |
An integer vector with the treatment (1 to |
outcome |
A numeric vector of the same length as |
k |
A positive integer. The number of treatment groups in the trial ( |
response |
The response type, |
target.alloc |
Desired allocation proportion. For binary responses one of |
allocation |
The allocation function, |
r |
A non-negative number. The tuning parameter of Hu and Zhang's allocation function, used when |
erade.alpha |
A number between 0 and 1. The degree of randomization of ERADE, used when |
lower.bound |
A number between 0 and |
theta0 |
A vector of length |
size |
A non-negative integer. The number of assignments to draw with the returned probabilities, for example the size of the next group. The default is 1, and 0 draws none. |
The parameters of each arm are estimated from the observed responses only (NA values are ignored): smoothed success rates for binary responses, and the mean and variance (which needs at least two responses) for continuous responses. The current allocation proportions use all enrolled patients, including those whose responses are not available yet. If the target cannot be estimated, equal allocation is used as the target, and with no enrolled patients every arm has probability 1/k. All patients of a group are assigned independently with the same probabilities, as in the group designs of Zhai, Li, Zhang and Hu (2024).
A list with the following elements.
prob |
The allocation probabilities of the next patient for each arm, named |
target |
The estimated target allocation proportions. |
estimate |
The parameter estimates, named |
assignment |
An integer vector of |
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")}
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")}
DBCD_Bin, DBCD_Cont, Group.DBCD_Bin for simulating the designs.
## 30 patients enrolled in a three-arm trial, the last three responses are pending
set.seed(1)
alloc <- sample(1:3, 30, replace = TRUE)
outcome <- rbinom(30, 1, c(0.6, 0.7, 0.8)[alloc])
outcome[28:30] <- NA
## probabilities for the next patient with the DBCD and the RSIHR target
nextAlloc(alloc, outcome, k = 3, target.alloc = "RSIHR")
## assignments for the next group of 5 patients with ERADE
nextAlloc(alloc, outcome, k = 3, target.alloc = "RSIHR", allocation = "ERADE",
size = 5)$assignment
## continuous responses
y <- rnorm(30, mean = c(13, 15, 14)[alloc], sd = 3)
nextAlloc(alloc, y, k = 3, response = "continuous", target.alloc = "Neyman")$prob
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.