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

View source: R/rand_evalRand.R

evalRand.simR Documentation

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

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. The default is 500.

n

the number of patients. The default is 1000.

Replace

a 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

a 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

a 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 sum of the probabilities for each margin should be 1. The default is rep(0.5, 4), which corresponds to cov_num = 2, and level_num = c(2, 2).

method

the randomization procedure to be evaluated. This package provides assessment for "HuHuCAR", "PocSimMIN", "StrBCD", "StrPBR", "AdjBCD", and "DoptBCD".

...

arguments to be passed to method. These arguments depend on the randomization method assessed and the following arguments are accepted:

omega

a vector of weights at the overall, within-stratum, and within-covariate-margin 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

a vector of weights for within-covariate-margin imbalances. It is required that at least one element is larger than 0. Note that weight is only needed when PocSimMIN is to be assessed.

p

the biased coin probability. p should be larger than 1/2 and less than 1. Note that p is only needed when "HuHuCAR", "PocSimMIN" and "StrBCD" is to be assessed.

a

a design parameter governing the degree of randomness. 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.

Details

See evalRand.

Value

See evalRand.

See Also

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


carat documentation built on Sept. 8, 2023, 6:05 p.m.