Permuted Block Randomized Design

> library(blockrand)

The blockrand function is used to create a data frame with the block sequential treatment randomizations.

When doing a stratified study you should run blockrand once for each stratum then optionally combine the different data frames with rbind. Save the data frame(s) and when the study is completed the data can be added to the data frame for analysis.

> ## stratified by age, 64 in stratum, 2 treatments
> set.seed(126)
> low <- blockrand(n=64, 
+                  stratum='age < 1 month',
+                  num.levels = 2, levels = c("Treatment","Control"), 
+                  block.sizes = c(2,1), block.prefix='Block_low',
+                  id.prefix='low')
> high <- blockrand(n=64, 
+                   stratum='age > 1 month',
+                   num.levels = 2, levels = c("Treatment","Control"), 
+                   block.sizes = c(2,1), block.prefix='Block_high',
+                   id.prefix='high')
> 
> my_design <- rbind(low, high)
> my_design
        id       stratum     block.id block.size treatment
1    low01 age < 1 month  Block_low01          2   Control
2    low02 age < 1 month  Block_low01          2 Treatment
3    low03 age < 1 month  Block_low02          4   Control
4    low04 age < 1 month  Block_low02          4 Treatment
5    low05 age < 1 month  Block_low02          4 Treatment
6    low06 age < 1 month  Block_low02          4   Control
7    low07 age < 1 month  Block_low03          2 Treatment
8    low08 age < 1 month  Block_low03          2   Control
9    low09 age < 1 month  Block_low04          2 Treatment
10   low10 age < 1 month  Block_low04          2   Control
11   low11 age < 1 month  Block_low05          4   Control
12   low12 age < 1 month  Block_low05          4 Treatment
13   low13 age < 1 month  Block_low05          4   Control
14   low14 age < 1 month  Block_low05          4 Treatment
15   low15 age < 1 month  Block_low06          4 Treatment
16   low16 age < 1 month  Block_low06          4   Control
17   low17 age < 1 month  Block_low06          4 Treatment
18   low18 age < 1 month  Block_low06          4   Control
19   low19 age < 1 month  Block_low07          4 Treatment
20   low20 age < 1 month  Block_low07          4   Control
21   low21 age < 1 month  Block_low07          4   Control
22   low22 age < 1 month  Block_low07          4 Treatment
23   low23 age < 1 month  Block_low08          4   Control
24   low24 age < 1 month  Block_low08          4   Control
25   low25 age < 1 month  Block_low08          4 Treatment
26   low26 age < 1 month  Block_low08          4 Treatment
27   low27 age < 1 month  Block_low09          2 Treatment
28   low28 age < 1 month  Block_low09          2   Control
29   low29 age < 1 month  Block_low10          4 Treatment
30   low30 age < 1 month  Block_low10          4 Treatment
31   low31 age < 1 month  Block_low10          4   Control
32   low32 age < 1 month  Block_low10          4   Control
33   low33 age < 1 month  Block_low11          4   Control
34   low34 age < 1 month  Block_low11          4   Control
35   low35 age < 1 month  Block_low11          4 Treatment
36   low36 age < 1 month  Block_low11          4 Treatment
37   low37 age < 1 month  Block_low12          4   Control
38   low38 age < 1 month  Block_low12          4 Treatment
39   low39 age < 1 month  Block_low12          4 Treatment
40   low40 age < 1 month  Block_low12          4   Control
41   low41 age < 1 month  Block_low13          2 Treatment
42   low42 age < 1 month  Block_low13          2   Control
43   low43 age < 1 month  Block_low14          2 Treatment
44   low44 age < 1 month  Block_low14          2   Control
45   low45 age < 1 month  Block_low15          4 Treatment
46   low46 age < 1 month  Block_low15          4   Control
47   low47 age < 1 month  Block_low15          4   Control
48   low48 age < 1 month  Block_low15          4 Treatment
49   low49 age < 1 month  Block_low16          4 Treatment
50   low50 age < 1 month  Block_low16          4   Control
51   low51 age < 1 month  Block_low16          4   Control
52   low52 age < 1 month  Block_low16          4 Treatment
53   low53 age < 1 month  Block_low17          2 Treatment
54   low54 age < 1 month  Block_low17          2   Control
55   low55 age < 1 month  Block_low18          2   Control
56   low56 age < 1 month  Block_low18          2 Treatment
57   low57 age < 1 month  Block_low19          2   Control
58   low58 age < 1 month  Block_low19          2 Treatment
59   low59 age < 1 month  Block_low20          4 Treatment
60   low60 age < 1 month  Block_low20          4   Control
61   low61 age < 1 month  Block_low20          4   Control
62   low62 age < 1 month  Block_low20          4 Treatment
63   low63 age < 1 month  Block_low21          2 Treatment
64   low64 age < 1 month  Block_low21          2   Control
65  high01 age > 1 month Block_high01          4   Control
66  high02 age > 1 month Block_high01          4   Control
67  high03 age > 1 month Block_high01          4 Treatment
68  high04 age > 1 month Block_high01          4 Treatment
69  high05 age > 1 month Block_high02          2   Control
70  high06 age > 1 month Block_high02          2 Treatment
71  high07 age > 1 month Block_high03          4 Treatment
72  high08 age > 1 month Block_high03          4   Control
73  high09 age > 1 month Block_high03          4 Treatment
74  high10 age > 1 month Block_high03          4   Control
75  high11 age > 1 month Block_high04          4 Treatment
76  high12 age > 1 month Block_high04          4   Control
77  high13 age > 1 month Block_high04          4 Treatment
78  high14 age > 1 month Block_high04          4   Control
79  high15 age > 1 month Block_high05          4   Control
80  high16 age > 1 month Block_high05          4 Treatment
81  high17 age > 1 month Block_high05          4 Treatment
82  high18 age > 1 month Block_high05          4   Control
83  high19 age > 1 month Block_high06          2 Treatment
84  high20 age > 1 month Block_high06          2   Control
85  high21 age > 1 month Block_high07          2 Treatment
86  high22 age > 1 month Block_high07          2   Control
87  high23 age > 1 month Block_high08          4   Control
88  high24 age > 1 month Block_high08          4 Treatment
89  high25 age > 1 month Block_high08          4   Control
90  high26 age > 1 month Block_high08          4 Treatment
91  high27 age > 1 month Block_high09          4   Control
92  high28 age > 1 month Block_high09          4 Treatment
93  high29 age > 1 month Block_high09          4 Treatment
94  high30 age > 1 month Block_high09          4   Control
95  high31 age > 1 month Block_high10          2 Treatment
96  high32 age > 1 month Block_high10          2   Control
97  high33 age > 1 month Block_high11          4   Control
98  high34 age > 1 month Block_high11          4 Treatment
99  high35 age > 1 month Block_high11          4 Treatment
100 high36 age > 1 month Block_high11          4   Control
101 high37 age > 1 month Block_high12          2 Treatment
102 high38 age > 1 month Block_high12          2   Control
103 high39 age > 1 month Block_high13          2 Treatment
104 high40 age > 1 month Block_high13          2   Control
105 high41 age > 1 month Block_high14          2 Treatment
106 high42 age > 1 month Block_high14          2   Control
107 high43 age > 1 month Block_high15          2 Treatment
108 high44 age > 1 month Block_high15          2   Control
109 high45 age > 1 month Block_high16          2 Treatment
110 high46 age > 1 month Block_high16          2   Control
111 high47 age > 1 month Block_high17          4   Control
112 high48 age > 1 month Block_high17          4 Treatment
113 high49 age > 1 month Block_high17          4   Control
114 high50 age > 1 month Block_high17          4 Treatment
115 high51 age > 1 month Block_high18          4   Control
116 high52 age > 1 month Block_high18          4 Treatment
117 high53 age > 1 month Block_high18          4   Control
118 high54 age > 1 month Block_high18          4 Treatment
119 high55 age > 1 month Block_high19          2 Treatment
120 high56 age > 1 month Block_high19          2   Control
121 high57 age > 1 month Block_high20          2 Treatment
122 high58 age > 1 month Block_high20          2   Control
123 high59 age > 1 month Block_high21          2   Control
124 high60 age > 1 month Block_high21          2 Treatment
125 high61 age > 1 month Block_high22          4   Control
126 high62 age > 1 month Block_high22          4   Control
127 high63 age > 1 month Block_high22          4 Treatment
128 high64 age > 1 month Block_high22          4 Treatment
> table(my_design$block.id) # block size of different blocks

 Block_low01  Block_low02  Block_low03  Block_low04  Block_low05  Block_low06 
           2            4            2            2            4            4 
 Block_low07  Block_low08  Block_low09  Block_low10  Block_low11  Block_low12 
           4            4            2            4            4            4 
 Block_low13  Block_low14  Block_low15  Block_low16  Block_low17  Block_low18 
           2            2            4            4            2            2 
 Block_low19  Block_low20  Block_low21 Block_high01 Block_high02 Block_high03 
           2            4            2            4            2            4 
Block_high04 Block_high05 Block_high06 Block_high07 Block_high08 Block_high09 
           4            4            2            2            4            4 
Block_high10 Block_high11 Block_high12 Block_high13 Block_high14 Block_high15 
           2            4            2            2            2            2 
Block_high16 Block_high17 Block_high18 Block_high19 Block_high20 Block_high21 
           2            4            4            2            2            2 
Block_high22 
           4 
> table(my_design$stratum, my_design$treatment) 
               
                Control Treatment
  age < 1 month      32        32
  age > 1 month      32        32
> table(my_design$treatment, my_design$block.size)
           
             2  4
  Control   22 42
  Treatment 22 42
> table(my_design$stratum, my_design$block.size)
               
                 2  4
  age < 1 month 20 44
  age > 1 month 24 40
> plotblockrand(my_design,'my_design.pdf',
+               top=list(text=c('My Design','Patient: %ID%','Treatment: %TREAT%'),
+                        col=c('black','black','red'), font=c(1,1,4)),
+               middle=list(text=c("My Design","Age group: %STRAT%","Patient: %ID%"),
+                           col=c('black','blue','green'),font=c(1,2,3)),
+               bottom="THIS IS A SAMPLE DESIGN",
+               cut.marks=TRUE)

Assigning Data

> my_design <- cbind(my_design, Val = round(rnorm(128, 0, 4),2))
> my_design
        id       stratum     block.id block.size treatment    Val
1    low01 age < 1 month  Block_low01          2   Control  -4.77
2    low02 age < 1 month  Block_low01          2 Treatment   1.40
3    low03 age < 1 month  Block_low02          4   Control  -3.41
4    low04 age < 1 month  Block_low02          4 Treatment  -2.61
5    low05 age < 1 month  Block_low02          4 Treatment   2.81
6    low06 age < 1 month  Block_low02          4   Control   3.26
7    low07 age < 1 month  Block_low03          2 Treatment  -4.60
8    low08 age < 1 month  Block_low03          2   Control  -5.52
9    low09 age < 1 month  Block_low04          2 Treatment  -2.62
10   low10 age < 1 month  Block_low04          2   Control  -4.94
11   low11 age < 1 month  Block_low05          4   Control   2.12
12   low12 age < 1 month  Block_low05          4 Treatment   0.46
13   low13 age < 1 month  Block_low05          4   Control  -3.63
14   low14 age < 1 month  Block_low05          4 Treatment  -0.24
15   low15 age < 1 month  Block_low06          4 Treatment  -7.60
16   low16 age < 1 month  Block_low06          4   Control  -6.50
17   low17 age < 1 month  Block_low06          4 Treatment  -9.97
18   low18 age < 1 month  Block_low06          4   Control   1.82
19   low19 age < 1 month  Block_low07          4 Treatment   6.85
20   low20 age < 1 month  Block_low07          4   Control   1.87
21   low21 age < 1 month  Block_low07          4   Control  -4.07
22   low22 age < 1 month  Block_low07          4 Treatment  -4.50
23   low23 age < 1 month  Block_low08          4   Control  -0.73
24   low24 age < 1 month  Block_low08          4   Control  11.26
25   low25 age < 1 month  Block_low08          4 Treatment  -3.58
26   low26 age < 1 month  Block_low08          4 Treatment   0.27
27   low27 age < 1 month  Block_low09          2 Treatment   1.96
28   low28 age < 1 month  Block_low09          2   Control  -0.96
29   low29 age < 1 month  Block_low10          4 Treatment  -2.26
30   low30 age < 1 month  Block_low10          4 Treatment   4.02
31   low31 age < 1 month  Block_low10          4   Control  -0.91
32   low32 age < 1 month  Block_low10          4   Control   4.21
33   low33 age < 1 month  Block_low11          4   Control  -2.49
34   low34 age < 1 month  Block_low11          4   Control   2.19
35   low35 age < 1 month  Block_low11          4 Treatment  -5.47
36   low36 age < 1 month  Block_low11          4 Treatment  -3.89
37   low37 age < 1 month  Block_low12          4   Control  -0.26
38   low38 age < 1 month  Block_low12          4 Treatment   6.94
39   low39 age < 1 month  Block_low12          4 Treatment  -4.00
40   low40 age < 1 month  Block_low12          4   Control  -6.25
41   low41 age < 1 month  Block_low13          2 Treatment   3.97
42   low42 age < 1 month  Block_low13          2   Control  -1.34
43   low43 age < 1 month  Block_low14          2 Treatment   5.00
44   low44 age < 1 month  Block_low14          2   Control   2.83
45   low45 age < 1 month  Block_low15          4 Treatment  -0.87
46   low46 age < 1 month  Block_low15          4   Control   5.80
47   low47 age < 1 month  Block_low15          4   Control   2.92
48   low48 age < 1 month  Block_low15          4 Treatment   4.14
49   low49 age < 1 month  Block_low16          4 Treatment  -1.82
50   low50 age < 1 month  Block_low16          4   Control  -0.04
51   low51 age < 1 month  Block_low16          4   Control   4.67
52   low52 age < 1 month  Block_low16          4 Treatment   3.68
53   low53 age < 1 month  Block_low17          2 Treatment   2.29
54   low54 age < 1 month  Block_low17          2   Control  -1.96
55   low55 age < 1 month  Block_low18          2   Control  -5.59
56   low56 age < 1 month  Block_low18          2 Treatment  -7.29
57   low57 age < 1 month  Block_low19          2   Control   2.45
58   low58 age < 1 month  Block_low19          2 Treatment  -4.46
59   low59 age < 1 month  Block_low20          4 Treatment  -4.95
60   low60 age < 1 month  Block_low20          4   Control   0.28
61   low61 age < 1 month  Block_low20          4   Control   2.72
62   low62 age < 1 month  Block_low20          4 Treatment   1.72
63   low63 age < 1 month  Block_low21          2 Treatment  -3.34
64   low64 age < 1 month  Block_low21          2   Control  -2.95
65  high01 age > 1 month Block_high01          4   Control   7.41
66  high02 age > 1 month Block_high01          4   Control   0.80
67  high03 age > 1 month Block_high01          4 Treatment  -7.08
68  high04 age > 1 month Block_high01          4 Treatment   1.29
69  high05 age > 1 month Block_high02          2   Control -10.52
70  high06 age > 1 month Block_high02          2 Treatment   3.52
71  high07 age > 1 month Block_high03          4 Treatment   1.10
72  high08 age > 1 month Block_high03          4   Control  -4.59
73  high09 age > 1 month Block_high03          4 Treatment  -0.23
74  high10 age > 1 month Block_high03          4   Control   7.79
75  high11 age > 1 month Block_high04          4 Treatment  -7.69
76  high12 age > 1 month Block_high04          4   Control   3.85
77  high13 age > 1 month Block_high04          4 Treatment  -3.00
78  high14 age > 1 month Block_high04          4   Control  -5.11
79  high15 age > 1 month Block_high05          4   Control  -0.16
80  high16 age > 1 month Block_high05          4 Treatment   8.10
81  high17 age > 1 month Block_high05          4 Treatment   1.29
82  high18 age > 1 month Block_high05          4   Control  -4.49
83  high19 age > 1 month Block_high06          2 Treatment  -4.81
84  high20 age > 1 month Block_high06          2   Control  -3.14
85  high21 age > 1 month Block_high07          2 Treatment  -1.74
86  high22 age > 1 month Block_high07          2   Control   3.33
87  high23 age > 1 month Block_high08          4   Control  -8.34
88  high24 age > 1 month Block_high08          4 Treatment  -2.33
89  high25 age > 1 month Block_high08          4   Control  -6.11
90  high26 age > 1 month Block_high08          4 Treatment   4.82
91  high27 age > 1 month Block_high09          4   Control   1.21
92  high28 age > 1 month Block_high09          4 Treatment  -5.48
93  high29 age > 1 month Block_high09          4 Treatment  -1.22
94  high30 age > 1 month Block_high09          4   Control   1.83
95  high31 age > 1 month Block_high10          2 Treatment   1.04
96  high32 age > 1 month Block_high10          2   Control  -7.95
97  high33 age > 1 month Block_high11          4   Control  -5.52
98  high34 age > 1 month Block_high11          4 Treatment   3.33
99  high35 age > 1 month Block_high11          4 Treatment  -1.02
100 high36 age > 1 month Block_high11          4   Control   0.78
101 high37 age > 1 month Block_high12          2 Treatment   0.35
102 high38 age > 1 month Block_high12          2   Control  -0.31
103 high39 age > 1 month Block_high13          2 Treatment  -2.22
104 high40 age > 1 month Block_high13          2   Control  -1.59
105 high41 age > 1 month Block_high14          2 Treatment   0.48
106 high42 age > 1 month Block_high14          2   Control   3.71
107 high43 age > 1 month Block_high15          2 Treatment  -0.78
108 high44 age > 1 month Block_high15          2   Control  -3.00
109 high45 age > 1 month Block_high16          2 Treatment  -2.31
110 high46 age > 1 month Block_high16          2   Control   0.30
111 high47 age > 1 month Block_high17          4   Control  -6.34
112 high48 age > 1 month Block_high17          4 Treatment   1.66
113 high49 age > 1 month Block_high17          4   Control   4.87
114 high50 age > 1 month Block_high17          4 Treatment   0.97
115 high51 age > 1 month Block_high18          4   Control  -3.50
116 high52 age > 1 month Block_high18          4 Treatment  -1.11
117 high53 age > 1 month Block_high18          4   Control   3.67
118 high54 age > 1 month Block_high18          4 Treatment   2.59
119 high55 age > 1 month Block_high19          2 Treatment   8.36
120 high56 age > 1 month Block_high19          2   Control -11.04
121 high57 age > 1 month Block_high20          2 Treatment   7.60
122 high58 age > 1 month Block_high20          2   Control  -2.98
123 high59 age > 1 month Block_high21          2   Control -10.28
124 high60 age > 1 month Block_high21          2 Treatment  -1.00
125 high61 age > 1 month Block_high22          4   Control   1.85
126 high62 age > 1 month Block_high22          4   Control   2.91
127 high63 age > 1 month Block_high22          4 Treatment   5.16
128 high64 age > 1 month Block_high22          4 Treatment  -0.72
> library(table1)
> my_design$block.size <- factor(my_design$block.size)
> table1(~ Val + stratum + block.size| treatment, my_design)
Control
(N=64)
Treatment
(N=64)
Overall
(N=128)
Val
Mean (SD) -0.915 (4.64) -0.307 (4.14) -0.611 (4.39)
Median [Min, Max] -0.520 [-11.0, 11.3] -0.480 [-9.97, 8.36] -0.515 [-11.0, 11.3]
stratum
age < 1 month 32 (50.0%) 32 (50.0%) 64 (50.0%)
age > 1 month 32 (50.0%) 32 (50.0%) 64 (50.0%)
block.size
2 22 (34.4%) 22 (34.4%) 44 (34.4%)
4 42 (65.6%) 42 (65.6%) 84 (65.6%)

Analysis

> summary(aov(Val ~ treatment + block.id, my_design))
            Df Sum Sq Mean Sq F value Pr(>F)
treatment    1   11.8   11.85   0.568  0.453
block.id    42  687.7   16.37   0.785  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