CovAdptRnd | R Documentation |
Generate treatment assignment under various CARs.
CovAdptRnd(rndflag, S, pi)
rndflag |
Index of the assignment rule. 1 for SRS; 2 for WEI; 3 for BCD; 4 for SBR |
S |
A nx1 vector. |
pi |
Targeted assignment probability across strata. It should be a vector with the length of max(S), It should be noted that the treatment assignment process is independent of pi when rndflag == 2 or 3. |
A nx1 treatment assignment vector generated according to the specified method.
Jiang L, Linton O B, Tang H, Zhang Y. Improving estimation efficiency via regression-adjustment in covariate-adaptive randomizations with imperfect compliance [J]. 2022.
CovAdptRnd(rndflag = 1, S = matrix(sample(1:4,100,TRUE)), pi = c(0.5, 0.5, 0.5, 0.5))
CovAdptRnd(rndflag = 2, S = matrix(sample(1:4,100,TRUE)), pi = c(0.5, 0.5, 0.5, 0.5))
CovAdptRnd(rndflag = 3, S = matrix(sample(1:4,100,TRUE)), pi = c(0.5, 0.5, 0.5, 0.5))
CovAdptRnd(rndflag = 4, S = matrix(sample(1:4,100,TRUE)), pi = c(0.5, 0.5, 0.5, 0.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.