StrBCD.sim {carat} | R Documentation |
Allocates patients to one of two treatments using Shao's method proposed by Shao J, Yu X, Zhong B (2010) <doi:10.1093/biomet/asq014>, by simulating covariate profiles under the assumption of independence between covariates and levels within each covariate.
StrBCD.sim(n = 1000, cov_num = 2, level_num = c(2, 2),
pr = rep(0.5, 4), p = 0.85)
n |
the number of patients. The default is |
cov_num |
the number of covariates. The default is |
level_num |
a vector of level numbers for each covariate. Hence the length of |
pr |
a vector of probabilities. Under the assumption of independence between covariates, |
p |
the biased coin probability. |
See StrBCD
.
See StrBCD
.
Shao J, Yu X, Zhong B. A theory for testing hypotheses under covariate-adaptive randomization[J]. Biometrika, 2010, 97(2): 347-360.
See StrBCD
for allocating patients with complete covariate data; See StrBCD.ui
for the command-line user interface.