ransch | R Documentation |
Generate block randomization schedule tables.
ransch(n, block, arms, r = 1L, strata = NULL) ranschtbl(n, block, arms, r = 1L, strata = NULL, write = NULL)
n |
sample size of study or each stratum |
block |
block size; note if |
arms |
names of the treatment arms |
r |
randomization ratio; see examples |
strata |
an optional named list of vectors for each stratum |
write |
a file path to write a directory with csv files for each randomization table |
## no strata, 2-3 treatments with varying randomization ratios ransch(24, 4, 1:2) ## 1:1 ransch(24, 6, 1:3) ## 1:1:1 ransch(24, 8, 1:3, c(1, 2, 1)) ## 1:2:1 ## one two-level stratum ransch(24, 4, 1:2, strata = list(Age = c('<65', '>=65'))) ## multiple strata strata <- list(Site = LETTERS[1:3], Age = c('<65', '>=65')) ransch(24, 4, 1:2, strata = strata) ## tables for printing ranschtbl(24, 4, c('Pbo', 'Trt')) ranschtbl(24, 4, c('Pbo', 'Trt'), c(1, 3), strata) ## Not run: ranschtbl(24, 4, c('Pbo', 'Trt'), strata = strata, write = '~/desktop') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.