Description Usage Arguments Details Value References See Also

View source: R/rand_generatingData.R

Allocates patients to one of two treatments using general covariate-adaptive randomization proposed by Hu Y, Hu F (2012) <doi:10.1214/12-AOS983>, by simulating covariate profiles based on the assumption of independence between covariates and levels within each covariate.

1 2 | ```
HuHuCAR.sim(n = 1000, cov_num = 2, level_num = c(2, 2),
pr = rep(0.5, 4), omega = NULL, 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, |

`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. If |

`p` |
the biased coin probability. |

See `HuHuCAR`

.

See `HuHuCAR`

.

Hu Y, Hu F. *Asymptotic properties of covariate-adaptive randomization*[J]. The Annals of Statistics, 2012, 40(3): 1794-1815.

See `HuHuCAR`

for allocating patients with complete covariate data; See `HuHuCAR.ui`

for the command-line user interface.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.