Learn R Programming

carat (version 1.1)

compRand: Compare Different Randomization Procedures via Tables and Plots

Description

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.

Usage

# S3 method for carcomp
compRand(...)

Arguments

objects of class "careval".

Value

It returns an object of class "carcomp".

The function print is used to obtain results. The generic accessor functions Assig, Diff, data, All strata and others extract various useful features of the value returned by compRand.

An object of class "carcomp" is a list containing at least the following components:

Overall Imbalances

a matrix containing maximum, 95%-quantile, median, mean, and loss of absolute overall imbalances for all the input methods.

Marginal Imbalances

a matrix containing maximum, 95%-quantile, median, mean, and loss of absolute marginal imbalances for all the input methods.

Within-stratum Imbalances

a matrix containing maximum, 95%-quantile, median, mean, loss of absolute imbalances, and also containing mean absolute imbalances of the strata with \(i\) patients falling in, where \(i = 1, \dots, bsize\) for all the input methods.

Details

The primary goal of using covariate-adaptive randomization in practice is to achieve balance with respect to the key covariates and to the overall treatment assignments. We choose four rules to measure the absolute imbalances at overall, marginal and withinn-stratum levels, which are maximal, 95%quantile, median and mean of the absolute imbalances at different aspects.

(1) Maximal $$\max_{i = 1, \dots, n}|D_n(\cdot)|.$$ (2) 95% quantile $$|D_{\lceil0.95n\rceil}(\cdot)|.$$ (3) Median

$$(|D_n(\cdot)|)= |D_{(n+1)/2}(\cdot)|$$ for \(n\) is odd; $$(|D_n(\cdot)|)=\frac{1}{2}(|D_{(n/2)}(\cdot)|+|D_{(n/2+1)}(\cdot)|)$$ for \(n\) is even.

(4) Mean $$\frac{1}{n}\sum_{j = 1}^{n}|D_{j}(\cdot)|.$$

The Monte Carlo method is used to calculate the four types of imbalances.

References

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.

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 Also

See evalRand or evalRand.sim to evaluate a specific randomization procedure.

Examples

Run this code
# NOT RUN {
## 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 # <<adjust according to CPU
bsize <- 4
# set weight for Hu and Hu's method, it satisfies
# (1)Length should equal to cov_num
omega <- c(1, 2, 1, 1)
# Assess Hu and Hu's general CAR
Obj1 <- evalRand.sim(n = n, N = N, Replace = FALSE, cov_num = cov_num, 
                     level_num = level_num, pr = pr, method = "HuHuCAR", 
                     omega, p = 0.85)
# Assess stratified permuted block randomization
Obj2 <- evalRand.sim(n = n, N = N, Replace = FALSE, cov_num = cov_num, 
                     level_num = level_num, pr = pr, method = "StrPBR", 
                     bsize)

RES <- compRand(Obj1, Obj2)

# }

Run the code above in your browser using DataLab