Learn R Programming

carat (version 1.1)

evalRand.sim: Evaluation Randomization Procedures with Covariate Data Generating Mechanism

Description

Evaluates randomization procedure based on several different quantities of imbalances by simulating patients' covariate profiles under the assumption of independence between covariates and levels within each covariate.

Usage

# S3 method for careval
evalRand.sim(n = 1000, N = 500, Replace = FALSE, cov_num = 2, 
             level_num = c(2, 2), pr = rep(0.5, 4), method = "HuHuCAR", ...)

Arguments

N

the iteration number.

n

the number of patients. The default is 1000.

Replace

bool. If Replace = FALSE, the function does clinical trial design for N iterations for one group of patients. If Replace = TRUE, the function dose clinical trial design for N iterations for N different groups of patients.

cov_num

the number of covariates. The default is 2.

level_num

the vector of level numbers for each covariate. Hence the length of level_num should be equal to the number of covariates. The default is c(2, 2).

pr

the vector of probabilities. Under the assumption of independence between covariates, pr is a vector containing probabilities for each level of each covariate. The length of pr should correspond to the number of all levels, and the vector sum of pr should be equal to cov_num. The default is pr = (0.5, 0.5, 0.5, 0.5), which implies that cov_num = 2, and level_num = c(2, 2).

method

the randomization method to be used in allocating patients. The default randomization “HuHuCAR” uses Hu and Hu's general covariate-adaptive randomization; the alternatives are “PocSimMIN”, “StrBCD”, “StrPBR”, “DoptBCD” and “AdjBCD”.

arguments to be passed to methods. These depends on method, and the following arguments are accepted:

omega

the vector of weights at the overall, within-stratum, and marginal levels. It is required that at least one element is larger than 0. Note that omega is only needed when HuHuCAR are to be assessed.

weight

the vector of weights for marginal imbalances. It is required that at least one element is NOT 0 and length(weight) = cov_num. Note that weight is only needed when PocSimMIN is to be assessed.

p

the probability of assigning one patinet to treatment 1. p should be larger than 1/2 to obtain balance. Note that p is only needed when "HuHuCAR", "PocSimMIN" and "StrBCD" is to be assessed.

a

a design parameter. As a goes to \(\infty\), the design becomes more deteministic. Note that a is only needed when "AdjBCD" is to be assessed.

bsize

the block size for stratified permuted block randomization. It is required to be a multiple of 2. Note that bsize is only needed when "StrPBR" is to be assessed.

Value

See evalRand.

Details

See evalRand.

See Also

See evalRand to evaluate a randomization procedure with complete covariate data.