abrar
abrar

Reputation: 135

How to use blockrand with 4:1 block randomization of 2 arms with no stratification in R?

We need to randomize some additional people to make up for some duplicates in those already enrolled. I need to randomize 20 patients in a 4:1 way to 2 treatments with no stratification. According to what I have read, the block size should be 4+1 = 5. I have tried:

> allocation_table_practice = blockrand(n = 20, num.levels = 2,block.sizes = 5,levels = c(0,1))
> allocation_table_practice 
   id block.id block.size treatment
1   1        1         10         1
2   2        1         10         1
3   3        1         10         0
4   4        1         10         0
5   5        1         10         1
6   6        1         10         0
7   7        1         10         1
8   8        1         10         0
9   9        1         10         0
10 10        1         10         1
11 11        2         10         1
12 12        2         10         0
13 13        2         10         0
14 14        2         10         1
15 15        2         10         0
16 16        2         10         0
17 17        2         10         1
18 18        2         10         0
19 19        2         10         1
20 20        2         10         1

allocation_table_practice$treatment %>% table
 0  1 
10 10

If I am correctly interpreting "treatment" as the randomization, then why do I not get 15 controls and 5 intervention. It seems 10:10 to me. Where am I going wrong?

Upvotes: 0

Views: 17

Answers (0)

Related Questions