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.
# 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", ...)
the iteration number.
the number of patients. The default is 1000
.
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.
the number of covariates. The default is 2
.
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)
.
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)
.
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:
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.
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.
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 design parameter. As a
goes to \(\infty\), the design becomes more deteministic. Note that a
is only needed when "AdjBCD"
is to be assessed.
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.
See evalRand
.
See evalRand
.
See evalRand
to evaluate a randomization procedure with complete covariate data.