Allocates patients to one of two treatments using stratified randomization proposed by Zelen M (1974) <Doi: 10.1016/0021-9681(74)90015-0>, by simulating covariates-profile on assumption of independence between covariates and levels within each covariate.
# S3 method for carandom
StrPBR.sim(n = 1000, cov_num = 2, level_num = c(2, 2),
pr = rep(0.5, 4), bsize = 4)
the number of patients. The default is 1000
.
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 = rep(0.5, 4)
(default), which implies that cov_num = 2
and level_num = c(2, 2)
.
the block size for the stratified randomization. It is required to be a multiple of 2. The default is 4
.
See StrPBR
.
See StrPBR
.
See StrPBR
for allocating patients with complete covariate data; See StrPBR.ui
for the command-line user interface.