# mergedblocks

##### Merged block randomization

Function to carry out merged block randomization, a restricted randomization method designed for small clinical trials (at most 100 subjects) or trials with small strata, for example in multicentre trials. It can be used for more than two groups or unequal randomization ratios.

##### Usage

```
mergedblocks(n, ratio = c(1, 1),
labels = as.character(1:length(ratio)))
```

##### Arguments

- n
The number of subjects to randomize.

- ratio
The desired randomization ratio, given as a vector. Default is 1:1 randomization, but more groups or unequal ratios are possible as well. E.g. for 1:1:2 randomization, use c(1, 1, 2).

- labels
The labels for the assignments, given as a vector, e.g. c("treatment", "placebo"). The length of

`labels`

should match the length of`ratio`

. Default is to use numeric labels.

##### Value

Allocation of the subjects, given as a vector.

##### References

S.L. van der Pas (2019). Merged block randomisation: a novel randomisation procedure for small clinical trials. Clinical Trials. Pages tba.

##### See Also

`mergedblocksmulti`

to create allocations for multiple strata at the same time.

##### Examples

```
# NOT RUN {
#Randomize 20 patients, 1:1 allocation, with labels "0" and "1".
mergedblocks(20)
#Randomize 50 patients, 1:1 allocation with labels "treatment" and "placebo".
mergedblocks(100, labels = c("treatment", "placebo"))
#Randomize 100 patients, 1:2:2 allocation with labels "placebo",
#"treatment 1", and "treatment 2".
mergedblocks(100, c(1, 2, 2), c("placebo", "treatment 1", "treatment 2"))
# }
```

*Documentation reproduced from package mergedblocks, version 1.0.0, License: GPL-3*