Compares randomization procedures based on several different quantities of imbalances. Among all included randomization procedures of class "careval", two or more procedures can be compared in this function.
compRand(...)It returns an object of class
"carcomp".
An object of class "carcomp" is a list containing the following components:
a matrix containing the maximum, 95%-quantile, median, and mean of the absolute overall imbalances for the randomization method(s) to be evaluated.
a matrix containing the maximum, 95%-quantile, median, and mean of the absolute within-covariate-margin imbalances for the randomization method(s) to be evaluated.
a matrix containing the maximum, 95%-quantile, median, and mean of the absolute within-stratum imbalances for the randomization method(s) to be evaluated.
a data frame containing the mean absolute imbalances at the overall, within-stratum, and within-covariate-margin levels for the randomization method(s) to be evaluated.
a data frame containing the absolute imbalances at the overall, within-stratum, and within-covariate-margin levels.
a character string giving the randomization method(s) to be evaluated.
the number of patients.
the number of iterations.
the number of covariates.
a vector of level numbers for each covariate.
a character string giving the data type, Real or Simulated.
a bool vector indicating whether the data used for all the iterations is the same for the randomization method(s) to be evaluated.
objects of class "careval".
The primary goal of using covariate-adaptive randomization in practice is to achieve balance with respect to the key covariates. We choose four rules to measure the absolute imbalances at overall, within-covariate-margin, and within-stratum levels, which are maximal, 95%quantile, median and mean of the absolute imbalances at different aspects. The Monte Carlo method is used to calculate the four types of imbalances. Let \(D_{n,i}(\cdot)\) be the final difference at the corresponding level for \(i\)th iteration, \(i=1,\ldots\), N, and N is the number of iterations.
(1) Maximal $$\max_{i = 1, \dots, N}|D_{n,i}(\cdot)|.$$
(2) 95% quantile $$|D_{n,\lceil0.95N\rceil}(\cdot)|.$$
(3) Median
$$|D_{n,(N+1)/2}(\cdot)|$$
for N is odd, and
$$\frac{1}{2}(|D_{(N/2)}(\cdot)|+|D_{(N/2+1)}(\cdot)|)$$
for N is even.
(4) Mean $$\frac{1}{N}\sum_{i = 1}^{N}|D_{n, i}(\cdot)|.$$
Atkinson A C. Optimum biased coin designs for sequential clinical trials with prognostic factors[J]. Biometrika, 1982, 69(1): 61-67.
Baldi Antognini A, Zagoraiou M. The covariate-adaptive biased coin design for balancing clinical trials in the presence of prognostic factors[J]. Biometrika, 2011, 98(3): 519-535.
Hu Y, Hu F. Asymptotic properties of covariate-adaptive randomization[J]. The Annals of Statistics, 2012, 40(3): 1794-1815.
Ma W, Ye X, Tu F, Hu F. carat: Covariate-Adaptive Randomization for Clinical Trials[J]. Journal of Statistical Software, 2023, 107(2): 1-47.
Pocock S J, Simon R. Sequential treatment assignment with balancing for prognostic factors in the controlled clinical trial[J]. Biometrics, 1975: 103-115.
Shao J, Yu X, Zhong B. A theory for testing hypotheses under covariate-adaptive randomization[J]. Biometrika, 2010, 97(2): 347-360.
Zelen M. The randomization and stratification of patients to clinical trials[J]. Journal of chronic diseases, 1974, 27(7): 365-375.
See evalRand or evalRand.sim to evaluate a specific randomization procedure.
## Compare stratified permuted block randomization and Hu and Hu's general CAR
cov_num <- 2
level_num <- c(2, 2)
pr <- rep(0.5, 4)
n <- 500
N <- 20 # <Run the code above in your browser using DataLab