mergedblocks: Merged block randomization

Description Usage Arguments Value References See Also Examples

View source: R/mergedblocks.R

Description

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

1
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 16(3):246-252.

See Also

mergedblocksmulti to create allocations for multiple strata at the same time.

Examples

1
2
3
4
5
6
7
8
9
#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"))

mergedblocks documentation built on March 16, 2021, 9:08 a.m.