This file creates blocks first to assign chief or community candidate (T2). Then, conditional on that selection, it creates blocks to divide units in treatments T3 and T4.

1 Data

blocking <- read.csv("3 out/4_blocking_data.csv")
nrow(blocking)
## [1] 363

2 Housekeeping

Define blocking vars.

Note that chiefdom is not included as it is categorical. It is rather included as a group for first blocking operation. First assignment is included as a group for second operation

block.vars1 = c(
  "n_pop_total", 
  "elf", 
  "distance_phu_miles",
  "distance_coverage_min",
  "deliberation_process", 
  "wealth_community", 
  "pc_candidate", 
  "chief_contacted_pc",  
  "n_hh_with_livestock",
  "days_since_chw")
block.vars2 = c(block.vars1, "longitude", "latitude")
# Check that no missing data in block vars

We have to do some imputation on vars with missing data. This mostly will not matter as data is missing mostly for units for whom assignment is notional (eg units with T1=0).

table(is.na(blocking$n_pop_total))
## 
## FALSE  TRUE 
##   321    42
for(v in c(block.vars1, block.vars2)) {
  blocking[v][[1]][is.na(blocking[v][[1]])] <- mean(blocking[v][[1]], na.rm = TRUE)}
table(is.na(blocking$n_pop_total))
## 
## FALSE 
##   363

Some cleaning:

blocking <- mutate(blocking, primary_stratum = (!same_candidate)*(pc_candidate  + comm_candidate)==2)
blocking <-within(blocking,
                  primary_stratum[(!is.na(pc_candidate) | !is.na(comm_candidate)) &
                           is.na(primary_stratum)] <- FALSE)
                           
blocking <- mutate(blocking, groups = (10+chiefdom_code)*primary_stratum)
blocking$groups[blocking$T1==0] <- -9

blocking$groups[is.na(blocking$groups)] <- -10 # Should be an empty category

table(is.na(blocking$groups))
## 
## FALSE 
##   363
table(blocking$groups, blocking$T1)
##     
##        0   1
##   -9  63   0
##   0    0 199
##   11   0  14
##   12   0  17
##   13   0  13
##   14   0   9
##   15   0  10
##   16   0  32
##   17   0   6
table(blocking$primary_stratum)
## 
## FALSE  TRUE 
##   255   108
table(blocking$groups, blocking$primary_stratum)
##     
##      FALSE TRUE
##   -9    56    7
##   0    199    0
##   11     0   14
##   12     0   17
##   13     0   13
##   14     0    9
##   15     0   10
##   16     0   32
##   17     0    6

3 Treatment T2

Select chief or community nominees for CAHW.

We use blocktools.

blocking$id <- 1:nrow(blocking)

blocking$n_pop_total[is.na(blocking$n_pop_total)] <- mean(blocking$n_pop_total, na.rm = TRUE)
out1 <- block( blocking, 
              groups = "groups", 
              n.tr = 2, 
              id.vars = c("id"), 
              block.vars = c(block.vars1)
              )

blocking$T2_block <- createBlockIDs(out1, blocking, id.var = "id")

kable(table(blocking$T2_block, blocking$groups)[c(1:4, 100:104),])
-9 0 11 12 13 14 15 16 17
1 2 0 0 0 0 0 0 0 0
2 2 0 0 0 0 0 0 0 0
3 2 0 0 0 0 0 0 0 0
4 2 0 0 0 0 0 0 0 0
100 0 2 0 0 0 0 0 0 0
101 0 2 0 0 0 0 0 0 0
102 0 2 0 0 0 0 0 0 0
103 0 2 0 0 0 0 0 0 0
104 0 2 0 0 0 0 0 0 0

Note that some blocks are of uneven size which means that some blocks have only one unit. We address this by doing a random-systematic assignment, using the ordering of blocks.

# select a random unit  from each block

blocking$T2_pc_candidate <- NA
temp <- floor((2*runif(1) + 1:nrow(blocking)))%%2
blocking$T2_pc_candidate[order(blocking$T2_block+runif(nrow(blocking)))] <- temp

table(blocking$groups, blocking$T2_pc_candidate, blocking$primary_stratum)
## , ,  = FALSE
## 
##     
##        0   1
##   -9  27  29
##   0   99 100
##   11   0   0
##   12   0   0
##   13   0   0
##   14   0   0
##   15   0   0
##   16   0   0
##   17   0   0
## 
## , ,  = TRUE
## 
##     
##        0   1
##   -9   5   2
##   0    0   0
##   11   7   7
##   12   9   8
##   13   6   7
##   14   5   4
##   15   5   5
##   16  16  16
##   17   3   3

3.1 Cleaning up:

  • primary stratum indicates whether in candidate experiment
  • block is the block
  • T2_pc_candidate is whether chief candidate select
# Recode vars to clarify status of units that are not in the  experimental pool
blocking <- 
  within(blocking,
         {
         T2_pc_candidate[pc_candidate==1 & comm_candidate==0] <- 1
         T2_pc_candidate[pc_candidate==0 & comm_candidate==1] <- 0
         T2_pc_candidate[pc_candidate==0 & comm_candidate==0] <- -9
         T2_pc_candidate[T1==0] <- NA
         })

table(blocking$groups, blocking$T2_pc_candidate)
##     
##       -9   0   1
##   -9   0   0   0
##   0   11 124  64
##   11   0   7   7
##   12   0   9   8
##   13   0   6   7
##   14   0   5   4
##   15   0   5   5
##   16   0  16  16
##   17   0   3   3

3.2 Results

kable(select(blocking, community_code,  primary_stratum, groups, T1, T2_pc_candidate)[1:10,])
community_code primary_stratum groups T1 T2_pc_candidate
1 FALSE -9 0 NA
2 FALSE 0 1 0
3 FALSE 0 1 0
4 FALSE -9 0 NA
5 FALSE 0 1 1
6 FALSE 0 1 0
7 FALSE 0 1 -9
8 FALSE 0 1 0
9 TRUE 11 1 0
10 FALSE 0 1 0

4 Treatments 3 and 4

Now assign other two treatments in 2*2 factorial conditional on CAHW type. Not blocking now on chiefdom but on X,Y coordinates.

Groups for blocking:

blocking <- mutate(blocking, groups_2by2 = T2_pc_candidate + 10*primary_stratum)

blocking$groups_2by2[is.na(blocking$groups_2by2)] <- -1

table(blocking$groups_2by2)
## 
##  -9  -1   0   1  10  11 
##  11  63 124  64  51  50

4.1 Now blocking

out2 <- block( blocking, 
               groups = "groups_2by2", 
               n.tr = 4, 
               id.vars = c("id"), 
               block.vars = c(block.vars2)
)

blocking$T3T4_block <- createBlockIDs(out2, blocking, id.var = "id")

table(blocking$T3T4_block, blocking$groups_2by2)
##     
##      -9 -1 0 1 10 11
##   1   0  4 0 0  0  0
##   2   0  4 0 0  0  0
##   3   0  4 0 0  0  0
##   4   0  4 0 0  0  0
##   5   0  4 0 0  0  0
##   6   0  4 0 0  0  0
##   7   0  4 0 0  0  0
##   8   0  4 0 0  0  0
##   9   0  4 0 0  0  0
##   10  0  4 0 0  0  0
##   11  0  4 0 0  0  0
##   12  0  4 0 0  0  0
##   13  0  4 0 0  0  0
##   14  0  4 0 0  0  0
##   15  0  4 0 0  0  0
##   16  0  3 0 0  0  0
##   17  4  0 0 0  0  0
##   18  4  0 0 0  0  0
##   19  3  0 0 0  0  0
##   20  0  0 4 0  0  0
##   21  0  0 4 0  0  0
##   22  0  0 4 0  0  0
##   23  0  0 4 0  0  0
##   24  0  0 4 0  0  0
##   25  0  0 4 0  0  0
##   26  0  0 4 0  0  0
##   27  0  0 4 0  0  0
##   28  0  0 4 0  0  0
##   29  0  0 4 0  0  0
##   30  0  0 4 0  0  0
##   31  0  0 4 0  0  0
##   32  0  0 4 0  0  0
##   33  0  0 4 0  0  0
##   34  0  0 4 0  0  0
##   35  0  0 4 0  0  0
##   36  0  0 4 0  0  0
##   37  0  0 4 0  0  0
##   38  0  0 4 0  0  0
##   39  0  0 4 0  0  0
##   40  0  0 4 0  0  0
##   41  0  0 4 0  0  0
##   42  0  0 4 0  0  0
##   43  0  0 4 0  0  0
##   44  0  0 4 0  0  0
##   45  0  0 4 0  0  0
##   46  0  0 4 0  0  0
##   47  0  0 4 0  0  0
##   48  0  0 4 0  0  0
##   49  0  0 4 0  0  0
##   50  0  0 4 0  0  0
##   51  0  0 0 4  0  0
##   52  0  0 0 4  0  0
##   53  0  0 0 4  0  0
##   54  0  0 0 4  0  0
##   55  0  0 0 4  0  0
##   56  0  0 0 4  0  0
##   57  0  0 0 4  0  0
##   58  0  0 0 4  0  0
##   59  0  0 0 4  0  0
##   60  0  0 0 4  0  0
##   61  0  0 0 4  0  0
##   62  0  0 0 4  0  0
##   63  0  0 0 4  0  0
##   64  0  0 0 4  0  0
##   65  0  0 0 4  0  0
##   66  0  0 0 4  0  0
##   67  0  0 0 0  4  0
##   68  0  0 0 0  4  0
##   69  0  0 0 0  4  0
##   70  0  0 0 0  4  0
##   71  0  0 0 0  4  0
##   72  0  0 0 0  4  0
##   73  0  0 0 0  4  0
##   74  0  0 0 0  4  0
##   75  0  0 0 0  4  0
##   76  0  0 0 0  4  0
##   77  0  0 0 0  4  0
##   78  0  0 0 0  4  0
##   79  0  0 0 0  3  0
##   80  0  0 0 0  0  4
##   81  0  0 0 0  0  4
##   82  0  0 0 0  0  4
##   83  0  0 0 0  0  4
##   84  0  0 0 0  0  4
##   85  0  0 0 0  0  4
##   86  0  0 0 0  0  4
##   87  0  0 0 0  0  4
##   88  0  0 0 0  0  4
##   89  0  0 0 0  0  4
##   90  0  0 0 0  0  4
##   91  0  0 0 0  0  2
##   92  0  0 0 0  0  4

Assignment:

blocking$T3T4 <- NA
temp <- 1+floor((4*runif(1) + 1:nrow(blocking)))%%4
blocking$T3T4[order(blocking$T3T4_block+runif(nrow(blocking)))] <- temp
blocking$T3T4[blocking$T1 ==0 ] <- NA

blocking <- mutate(blocking, T3_PayPerformance = 1*(T3T4 ==3 | T3T4==4))
blocking <- mutate(blocking, T4_SocialSanction = 1*(T3T4 ==2 | T3T4==4))
       
(with(blocking, table(T3_PayPerformance, T4_SocialSanction,  groups_2by2)))
## , , groups_2by2 = -9
## 
##                  T4_SocialSanction
## T3_PayPerformance  0  1
##                 0  2  3
##                 1  3  3
## 
## , , groups_2by2 = -1
## 
##                  T4_SocialSanction
## T3_PayPerformance  0  1
##                 0  0  0
##                 1  0  0
## 
## , , groups_2by2 = 0
## 
##                  T4_SocialSanction
## T3_PayPerformance  0  1
##                 0 31 31
##                 1 31 31
## 
## , , groups_2by2 = 1
## 
##                  T4_SocialSanction
## T3_PayPerformance  0  1
##                 0 16 16
##                 1 16 16
## 
## , , groups_2by2 = 10
## 
##                  T4_SocialSanction
## T3_PayPerformance  0  1
##                 0 13 13
##                 1 13 12
## 
## , , groups_2by2 = 11
## 
##                  T4_SocialSanction
## T3_PayPerformance  0  1
##                 0 13 12
##                 1 12 13

5 Final Assignments:

Assignments to T1 are constrained by unit existence; (random) assignments to T2 are constrained by presence of two distinct candidates (primary stratum = 1); assignments to T3, T4 constrained only by T1

# Top level: CAHW
table(blocking$T1)
## 
##   0   1 
##  63 300
# Second level: Choice of CAHW
table(blocking$T2_pc_candidate)
## 
##  -9   0   1 
##  11 175 114
table(blocking$T1, blocking$T2_pc_candidate, blocking$primary_stratum)
## , ,  = FALSE
## 
##    
##      -9   0   1
##   0   0   0   0
##   1  11 124  64
## 
## , ,  = TRUE
## 
##    
##      -9   0   1
##   0   0   0   0
##   1   0  51  50
# Levels 3 and 4: Incentives
table(blocking$T3_PayPerformance, blocking$T4_SocialSanction, blocking$T1)
## , ,  = 0
## 
##    
##      0  1
##   0  0  0
##   1  0  0
## 
## , ,  = 1
## 
##    
##      0  1
##   0 75 75
##   1 75 75
# Note Levels 3 and 4 lose balance slightly because of missing candidates for T2:
table(blocking$T3_PayPerformance, blocking$T4_SocialSanction, blocking$T2_pc_candidate)
## , ,  = -9
## 
##    
##      0  1
##   0  2  3
##   1  3  3
## 
## , ,  = 0
## 
##    
##      0  1
##   0 44 44
##   1 44 43
## 
## , ,  = 1
## 
##    
##      0  1
##   0 29 28
##   1 28 29

6 T5: Assignment to 10 training groups

blocking$T5_block  <- blocking$T1*100 + blocking$primary_stratum*10 + blocking$T3T4
blocking$T5_session <- NA
temp <- 1+floor((10*runif(1) + 1:nrow(blocking)))%%10
blocking$T5_session[order(blocking$T5_block+runif(nrow(blocking)))] <- temp
blocking$T5_session[blocking$T1 ==0 ] <- NA
table(blocking$T5_session)
## 
##  1  2  3  4  5  6  7  8  9 10 
## 30 30 30 30 30 30 30 30 30 30
table(blocking$T5_session, blocking$T3T4)
##     
##      1 2 3 4
##   1  7 8 7 8
##   2  7 8 7 8
##   3  7 8 7 8
##   4  8 7 8 7
##   5  8 7 8 7
##   6  8 7 8 7
##   7  8 7 8 7
##   8  8 7 8 7
##   9  7 8 7 8
##   10 7 8 7 8

7 Balance

summary(lm(T2_pc_candidate ~ elf + wealth_community + n_pop_total + distance_phu_miles + distance_coverage_min + deliberation_process +wealth_community + pc_candidate + chief_contacted_pc + n_hh_with_livestock + days_since_chw, data = blocking[blocking$primary_stratum ==1, ]))
## 
## Call:
## lm(formula = T2_pc_candidate ~ elf + wealth_community + n_pop_total + 
##     distance_phu_miles + distance_coverage_min + deliberation_process + 
##     wealth_community + pc_candidate + chief_contacted_pc + n_hh_with_livestock + 
##     days_since_chw, data = blocking[blocking$primary_stratum == 
##     1, ])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.70373 -0.46865  0.07974  0.47437  0.70971 
## 
## Coefficients: (1 not defined because of singularities)
##                         Estimate Std. Error t value Pr(>|t|)  
## (Intercept)            3.101e-01  2.819e-01   1.100   0.2742  
## elf                   -4.447e-02  2.189e-01  -0.203   0.8394  
## wealth_community      -4.238e-03  5.065e-02  -0.084   0.9335  
## n_pop_total            1.548e-04  3.310e-04   0.468   0.6412  
## distance_phu_miles     2.391e-02  1.397e-02   1.711   0.0905 .
## distance_coverage_min -1.011e-03  8.711e-04  -1.160   0.2490  
## deliberation_process   9.999e-03  4.924e-02   0.203   0.8395  
## pc_candidate                  NA         NA      NA       NA  
## chief_contacted_pc    -6.084e-02  1.431e-01  -0.425   0.6717  
## n_hh_with_livestock   -7.204e-04  1.688e-03  -0.427   0.6706  
## days_since_chw         3.337e-05  3.475e-05   0.960   0.3395  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5094 on 91 degrees of freedom
##   (7 observations deleted due to missingness)
## Multiple R-squared:  0.06457,    Adjusted R-squared:  -0.02794 
## F-statistic: 0.698 on 9 and 91 DF,  p-value: 0.7091
summary(lm(T3_PayPerformance ~ elf + wealth_community + n_pop_total + distance_phu_miles + distance_coverage_min + deliberation_process +wealth_community + pc_candidate + chief_contacted_pc + n_hh_with_livestock + days_since_chw, data = blocking[blocking$T1 ==1, ]))
## 
## Call:
## lm(formula = T3_PayPerformance ~ elf + wealth_community + n_pop_total + 
##     distance_phu_miles + distance_coverage_min + deliberation_process + 
##     wealth_community + pc_candidate + chief_contacted_pc + n_hh_with_livestock + 
##     days_since_chw, data = blocking[blocking$T1 == 1, ])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.72586 -0.49998 -0.02652  0.48495  0.75494 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            4.926e-01  1.375e-01   3.582 0.000399 ***
## elf                    2.318e-03  1.144e-01   0.020 0.983848    
## wealth_community       9.214e-04  2.743e-02   0.034 0.973225    
## n_pop_total            2.302e-04  1.749e-04   1.316 0.189213    
## distance_phu_miles    -1.512e-03  8.768e-03  -0.172 0.863228    
## distance_coverage_min -5.497e-04  6.864e-04  -0.801 0.423815    
## deliberation_process   2.560e-03  2.215e-02   0.116 0.908070    
## pc_candidate           4.502e-02  6.479e-02   0.695 0.487633    
## chief_contacted_pc    -9.561e-02  7.060e-02  -1.354 0.176708    
## n_hh_with_livestock   -5.564e-04  7.436e-04  -0.748 0.454908    
## days_since_chw        -6.718e-06  1.833e-05  -0.367 0.714219    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5053 on 289 degrees of freedom
## Multiple R-squared:  0.01623,    Adjusted R-squared:  -0.01781 
## F-statistic: 0.4767 on 10 and 289 DF,  p-value: 0.9045
summary(lm(T4_SocialSanction ~ elf + wealth_community + n_pop_total + distance_phu_miles + distance_coverage_min + deliberation_process +wealth_community + pc_candidate + chief_contacted_pc + n_hh_with_livestock + days_since_chw, data = blocking[blocking$T1 ==1, ]))
## 
## Call:
## lm(formula = T4_SocialSanction ~ elf + wealth_community + n_pop_total + 
##     distance_phu_miles + distance_coverage_min + deliberation_process + 
##     wealth_community + pc_candidate + chief_contacted_pc + n_hh_with_livestock + 
##     days_since_chw, data = blocking[blocking$T1 == 1, ])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.69235 -0.49430  0.02813  0.49358  0.69791 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)   
## (Intercept)            4.562e-01  1.374e-01   3.320  0.00102 **
## elf                   -1.066e-01  1.144e-01  -0.932  0.35222   
## wealth_community       1.676e-02  2.741e-02   0.611  0.54139   
## n_pop_total           -1.420e-04  1.749e-04  -0.812  0.41740   
## distance_phu_miles    -2.105e-03  8.763e-03  -0.240  0.81035   
## distance_coverage_min  9.031e-04  6.860e-04   1.317  0.18904   
## deliberation_process  -3.901e-03  2.214e-02  -0.176  0.86024   
## pc_candidate           3.102e-02  6.475e-02   0.479  0.63222   
## chief_contacted_pc     4.901e-02  7.056e-02   0.695  0.48791   
## n_hh_with_livestock   -5.395e-05  7.432e-04  -0.073  0.94218   
## days_since_chw         7.282e-06  1.832e-05   0.398  0.69124   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.505 on 289 degrees of freedom
## Multiple R-squared:  0.01729,    Adjusted R-squared:  -0.01671 
## F-statistic: 0.5086 on 10 and 289 DF,  p-value: 0.8837

8 Full results:

assignments <- select(blocking, community_code, primary_stratum, T1, T2_block, T3T4_block, T2_pc_candidate, T3_PayPerformance, T4_SocialSanction, T5_session)

kable(assignments)
community_code primary_stratum T1 T2_block T3T4_block T2_pc_candidate T3_PayPerformance T4_SocialSanction T5_session
1 FALSE 0 6 6 NA NA NA NA
2 FALSE 1 72 31 0 0 1 5
3 FALSE 1 97 45 0 0 1 10
4 FALSE 0 1 9 NA NA NA NA
5 FALSE 1 65 59 1 1 1 10
6 FALSE 1 126 35 0 0 0 5
7 FALSE 1 62 17 -9 0 0 2
8 FALSE 1 67 20 0 1 1 9
9 TRUE 1 136 69 0 1 0 6
10 FALSE 1 121 35 0 0 1 2
11 FALSE 1 64 41 0 1 0 10
12 TRUE 1 139 88 1 0 0 7
13 TRUE 1 138 84 1 0 1 2
14 FALSE 1 37 20 0 0 1 9
15 TRUE 1 133 72 0 1 1 3
16 FALSE 1 36 21 0 0 0 5
17 FALSE 1 120 46 0 1 0 4
18 TRUE 1 137 86 1 0 0 4
19 TRUE 1 137 76 0 0 0 6
20 FALSE 1 96 53 1 1 0 3
21 FALSE 1 99 64 1 0 1 5
22 TRUE 1 135 72 0 0 0 2
23 FALSE 0 4 1 NA NA NA NA
24 FALSE 1 45 20 0 0 0 7
25 FALSE 1 125 29 0 0 0 3
26 TRUE 1 136 85 1 1 0 10
27 TRUE 1 138 77 0 1 0 7
28 FALSE 1 43 39 0 1 1 6
29 FALSE 1 126 64 1 0 0 4
30 FALSE 1 78 57 1 0 0 10
31 FALSE 0 30 13 NA NA NA NA
32 TRUE 1 134 85 1 1 1 1
33 FALSE 1 122 47 0 0 1 1
34 FALSE 1 108 31 0 1 1 2
35 FALSE 0 26 13 NA NA NA NA
36 FALSE 1 44 22 0 1 0 1
37 FALSE 1 109 20 0 1 0 6
38 FALSE 1 67 65 1 1 0 7
39 TRUE 1 133 84 1 1 0 9
40 TRUE 1 139 76 0 0 1 2
41 TRUE 0 29 13 NA NA NA NA
42 FALSE 0 20 10 NA NA NA NA
43 TRUE 1 135 81 1 1 0 4
44 FALSE 1 34 44 0 0 1 8
45 FALSE 1 92 31 0 0 0 2
46 TRUE 1 134 70 0 1 0 8
47 FALSE 0 3 5 NA NA NA NA
48 FALSE 0 21 3 NA NA NA NA
49 FALSE 1 102 31 0 1 0 7
50 TRUE 1 145 67 0 0 0 6
51 TRUE 1 144 76 0 1 1 4
52 TRUE 1 140 80 1 1 1 5
53 TRUE 1 148 79 0 0 0 5
54 TRUE 1 147 86 1 0 1 3
55 FALSE 1 116 63 1 1 1 7
56 FALSE 1 42 23 0 0 1 10
57 TRUE 0 22 14 NA NA NA NA
58 TRUE 1 141 87 1 0 1 1
59 FALSE 0 13 12 NA NA NA NA
60 FALSE 1 46 55 1 1 1 3
61 FALSE 1 76 51 1 0 1 8
62 TRUE 1 147 73 0 0 1 1
63 FALSE 0 19 2 NA NA NA NA
64 TRUE 1 142 73 0 0 0 3
65 TRUE 1 140 67 0 1 1 3
66 TRUE 1 143 82 1 0 1 3
67 TRUE 1 146 71 0 1 1 9
68 TRUE 1 143 71 0 1 0 7
69 TRUE 1 141 68 0 1 0 8
70 FALSE 1 82 56 1 1 1 3
71 FALSE 1 125 58 1 0 0 6
72 TRUE 1 142 87 1 1 1 2
73 TRUE 1 144 88 1 0 1 5
74 FALSE 0 20 8 NA NA NA NA
75 TRUE 1 146 83 1 0 0 7
76 TRUE 1 145 80 1 0 0 7
77 TRUE 1 149 85 1 0 0 5
78 FALSE 1 45 57 1 1 1 8
79 FALSE 1 40 24 0 0 0 10
80 FALSE 1 98 46 0 0 1 4
81 FALSE 0 2 10 NA NA NA NA
82 FALSE 1 124 37 0 0 0 10
83 FALSE 1 39 57 1 0 1 10
84 FALSE 0 16 4 NA NA NA NA
85 FALSE 1 40 24 0 1 0 10
86 TRUE 1 153 77 0 0 0 10
87 FALSE 1 68 37 0 1 1 9
88 FALSE 1 107 35 0 1 1 6
89 TRUE 1 150 69 0 1 1 2
90 TRUE 1 152 90 1 1 0 10
91 FALSE 0 21 7 NA NA NA NA
92 FALSE 1 114 48 0 0 0 2
93 FALSE 0 22 15 NA NA NA NA
94 FALSE 1 71 19 -9 1 1 4
96 FALSE 1 54 24 0 1 1 8
97 TRUE 1 150 84 1 0 0 6
98 FALSE 0 18 8 NA NA NA NA
99 FALSE 1 123 57 1 1 0 10
100 TRUE 1 151 74 0 0 1 8
101 TRUE 1 154 76 0 1 0 2
102 FALSE 0 1 10 NA NA NA NA
103 TRUE 1 152 72 0 1 0 4
104 TRUE 1 154 90 1 1 1 9
105 FALSE 1 76 54 1 1 1 2
106 TRUE 1 155 91 1 1 1 5
108 FALSE 1 78 48 0 1 0 2
109 FALSE 1 64 65 1 0 0 4
110 FALSE 1 100 40 0 1 0 6
111 FALSE 1 123 48 0 1 1 4
112 FALSE 1 66 33 0 1 1 4
113 FALSE 1 132 50 0 1 0 9
114 TRUE 1 149 69 0 0 1 5
115 FALSE 1 41 48 0 0 1 1
116 FALSE 1 106 18 -9 0 0 4
117 TRUE 1 151 90 1 0 0 9
118 FALSE 1 106 24 0 0 1 7
119 TRUE 0 32 16 NA NA NA NA
120 TRUE 1 153 85 1 0 1 4
121 FALSE 1 107 35 0 1 0 5
122 FALSE 0 5 1 NA NA NA NA
123 FALSE 0 2 2 NA NA NA NA
124 FALSE 1 73 39 0 0 0 7
125 FALSE 1 68 65 1 1 1 1
126 TRUE 1 159 90 1 0 1 4
127 FALSE 1 77 41 0 1 1 9
128 FALSE 0 14 2 NA NA NA NA
129 FALSE 1 41 32 0 1 0 4
130 FALSE 1 124 49 0 0 1 10
131 FALSE 1 129 19 -9 0 1 2
132 FALSE 1 94 62 1 0 0 9
134 FALSE 1 63 58 1 1 0 5
135 FALSE 0 3 2 NA NA NA NA
136 FALSE 0 4 1 NA NA NA NA
137 FALSE 1 118 17 -9 1 0 1
138 FALSE 0 9 3 NA NA NA NA
139 FALSE 1 58 18 -9 0 1 8
140 FALSE 1 113 45 0 1 1 7
141 FALSE 1 93 63 1 1 0 10
142 FALSE 1 112 17 -9 1 1 10
143 FALSE 1 57 59 1 0 1 8
144 FALSE 0 10 3 NA NA NA NA
145 FALSE 1 75 56 1 0 1 7
146 FALSE 1 48 58 1 0 1 3
147 FALSE 1 127 43 0 0 0 5
148 FALSE 1 129 19 -9 1 0 3
149 FALSE 1 131 66 1 1 0 9
150 FALSE 1 43 28 0 1 0 8
151 FALSE 1 54 34 0 1 1 3
152 TRUE 1 160 79 0 0 1 7
153 FALSE 1 119 61 1 0 0 4
154 TRUE 1 157 74 0 1 0 5
155 FALSE 1 88 52 1 0 0 3
156 FALSE 1 60 29 0 1 0 1
157 FALSE 1 89 36 0 1 0 3
158 FALSE 0 8 3 NA NA NA NA
159 FALSE 1 119 38 0 0 1 5
160 FALSE 1 118 49 0 0 0 1
161 FALSE 0 5 4 NA NA NA NA
162 TRUE 1 156 84 1 1 1 1
163 FALSE 1 52 33 0 1 0 10
164 FALSE 1 104 47 0 1 0 3
165 FALSE 1 50 28 0 1 1 9
166 FALSE 1 69 27 0 0 0 9
167 FALSE 1 69 51 1 1 1 3
168 FALSE 1 58 34 0 0 1 6
169 FALSE 1 66 60 1 0 0 3
170 FALSE 0 7 5 NA NA NA NA
171 FALSE 1 111 30 0 0 1 8
172 FALSE 1 108 36 0 0 1 5
173 FALSE 1 50 28 0 0 0 5
174 FALSE 1 105 49 0 1 0 2
175 FALSE 1 127 43 0 1 0 4
176 FALSE 0 6 5 NA NA NA NA
177 FALSE 1 100 40 0 0 1 6
178 FALSE 0 7 5 NA NA NA NA
179 TRUE 1 158 75 0 0 0 8
180 TRUE 1 156 69 0 0 0 1
181 FALSE 1 85 18 -9 1 0 4
182 TRUE 1 157 82 1 1 0 8
183 FALSE 1 130 66 1 0 0 2
184 FALSE 1 105 58 1 1 1 9
185 FALSE 1 104 47 0 0 0 1
186 FALSE 1 51 38 0 1 0 8
187 TRUE 1 158 92 1 1 0 3
188 FALSE 0 17 6 NA NA NA NA
189 FALSE 1 71 18 -9 1 1 1
190 TRUE 1 159 78 0 0 0 8
191 FALSE 1 34 51 1 1 0 9
192 FALSE 1 53 46 0 1 1 1
193 FALSE 1 98 56 1 1 0 2
194 FALSE 0 8 6 NA NA NA NA
195 FALSE 1 48 27 0 0 1 9
196 FALSE 1 95 66 1 1 1 3
197 FALSE 1 60 29 0 1 1 10
198 FALSE 1 117 38 0 0 0 1
199 FALSE 1 35 30 0 1 0 1
200 FALSE 1 101 61 1 0 1 4
201 TRUE 1 165 78 0 1 1 7
202 FALSE 1 93 44 0 0 0 8
203 FALSE 1 74 32 0 0 1 9
204 FALSE 1 92 36 0 1 1 4
205 FALSE 0 9 6 NA NA NA NA
206 FALSE 1 79 44 0 1 1 5
207 FALSE 1 91 26 0 1 0 5
208 TRUE 1 164 75 0 1 1 4
209 FALSE 1 46 55 1 0 1 7
210 FALSE 1 112 66 1 0 1 7
211 FALSE 1 47 23 0 1 1 5
212 FALSE 1 81 42 0 1 1 7
213 FALSE 1 81 60 1 0 1 4
214 TRUE 1 163 75 0 0 1 10
215 TRUE 1 162 68 0 0 1 1
216 FALSE 1 90 32 0 0 0 10
217 FALSE 1 80 26 0 1 1 1
218 TRUE 1 163 82 1 0 0 4
219 FALSE 0 11 7 NA NA NA NA
220 FALSE 1 87 40 0 1 1 7
221 FALSE 1 75 43 0 0 1 3
222 FALSE 0 10 7 NA NA NA NA
223 FALSE 1 47 26 0 0 0 7
224 FALSE 1 70 26 0 0 1 1
225 TRUE 1 162 80 1 1 0 5
226 TRUE 1 161 68 0 1 1 10
227 TRUE 1 161 82 1 1 1 10
228 FALSE 0 12 7 NA NA NA NA
229 FALSE 1 84 60 1 1 1 2
230 FALSE 1 121 56 1 0 0 8
231 FALSE 1 113 45 0 0 0 4
232 FALSE 1 101 49 0 1 1 5
233 TRUE 1 164 87 1 1 0 2
234 FALSE 1 74 17 -9 0 1 3
235 TRUE 1 165 89 1 1 1 6
236 FALSE 1 85 42 0 1 0 9
238 FALSE 0 31 16 NA NA NA NA
239 FALSE 1 87 40 0 0 0 6
240 FALSE 0 11 4 NA NA NA NA
241 FALSE 0 12 4 NA NA NA NA
242 FALSE 0 23 11 NA NA NA NA
243 FALSE 1 63 37 0 1 0 7
244 FALSE 1 128 61 1 1 1 2
245 FALSE 0 29 14 NA NA NA NA
246 TRUE 1 173 73 0 1 0 1
247 FALSE 1 115 33 0 0 0 9
248 TRUE 1 167 81 1 0 1 6
249 TRUE 1 171 83 1 1 1 8
250 FALSE 1 73 39 0 1 0 2
251 FALSE 0 27 12 NA NA NA NA
252 FALSE 0 31 16 NA NA NA NA
253 TRUE 1 179 77 0 1 1 10
254 TRUE 1 181 88 1 1 0 1
256 FALSE 1 55 22 0 0 0 8
257 FALSE 1 110 27 0 1 0 6
258 FALSE 1 36 21 0 1 1 5
259 FALSE 0 13 9 NA NA NA NA
260 TRUE 1 174 89 1 1 0 3
261 FALSE 0 15 1 NA NA NA NA
262 TRUE 1 176 73 0 1 1 9
263 FALSE 1 61 37 0 0 1 2
264 TRUE 1 175 72 0 0 1 6
265 FALSE 1 51 29 0 0 1 6
266 FALSE 1 83 41 0 0 0 7
267 FALSE 1 49 52 1 1 1 10
268 TRUE 0 26 13 NA NA NA NA
269 FALSE 0 14 10 NA NA NA NA
270 FALSE 1 52 54 1 1 0 7
271 FALSE 1 114 47 0 1 1 6
272 FALSE 1 44 55 1 1 0 6
273 TRUE 1 175 88 1 1 1 3
274 TRUE 1 176 86 1 1 0 7
275 FALSE 1 117 38 0 1 1 5
276 FALSE 1 38 23 0 0 0 2
277 FALSE 1 59 62 1 1 1 10
278 FALSE 0 15 12 NA NA NA NA
279 FALSE 1 70 39 0 0 1 3
280 TRUE 1 174 71 0 0 1 7
281 FALSE 0 30 15 NA NA NA NA
282 FALSE 1 95 41 0 0 1 1
283 FALSE 1 103 52 1 0 1 4
284 FALSE 1 111 42 0 0 0 8
285 FALSE 1 37 51 1 0 0 5
287 FALSE 1 120 64 1 1 1 4
288 FALSE 1 56 53 1 0 0 9
289 TRUE 1 168 80 1 0 1 2
290 FALSE 0 24 11 NA NA NA NA
291 FALSE 0 16 8 NA NA NA NA
292 FALSE 0 17 8 NA NA NA NA
293 FALSE 1 97 45 0 1 0 8
294 TRUE 1 181 79 0 1 0 9
295 FALSE 1 80 21 0 0 1 10
296 FALSE 0 27 14 NA NA NA NA
297 FALSE 1 79 54 1 0 1 1
298 TRUE 1 173 86 1 1 1 1
299 TRUE 1 170 83 1 0 1 9
300 TRUE 1 180 78 0 1 0 6
302 FALSE 1 115 64 1 1 0 5
303 TRUE 1 179 87 1 0 0 5
304 TRUE 0 25 14 NA NA NA NA
305 TRUE 1 177 75 0 1 0 5
306 FALSE 1 65 59 1 1 0 6
307 FALSE 1 131 50 0 0 0 10
308 TRUE 1 166 70 0 0 0 4
309 FALSE 1 88 33 0 0 1 9
310 FALSE 1 110 59 1 0 0 8
311 FALSE 1 109 55 1 0 0 9
312 FALSE 1 86 25 0 1 1 8
313 FALSE 1 128 50 0 0 1 6
314 FALSE 1 59 25 0 1 0 2
315 FALSE 1 57 27 0 1 1 8
316 TRUE 1 178 68 0 0 0 8
317 TRUE 1 169 71 0 0 0 3
318 FALSE 1 83 53 1 1 1 6
319 FALSE 1 55 62 1 0 1 7
320 FALSE 1 116 22 0 0 1 5
321 FALSE 1 82 46 0 0 0 6
322 TRUE 1 177 91 1 0 0 9
323 TRUE 1 171 67 0 0 1 10
324 FALSE 0 18 9 NA NA NA NA
325 TRUE 1 172 70 0 0 1 10
326 FALSE 1 38 23 0 1 0 4
327 FALSE 1 62 21 0 1 0 8
328 TRUE 1 170 77 0 0 1 9
329 TRUE 1 166 81 1 1 1 2
330 FALSE 1 39 25 0 0 1 9
331 FALSE 1 61 61 1 1 0 3
332 TRUE 1 180 92 1 0 0 3
333 FALSE 1 72 30 0 1 1 7
334 FALSE 1 42 28 0 0 1 3
335 TRUE 0 25 12 NA NA NA NA
336 FALSE 1 77 65 1 0 1 4
337 FALSE 1 33 25 0 0 0 7
338 FALSE 1 130 50 0 1 1 1
339 TRUE 1 168 67 0 1 0 6
340 FALSE 1 99 43 0 1 1 6
341 TRUE 1 167 70 0 1 1 7
342 FALSE 1 94 22 0 1 1 2
343 FALSE 1 33 54 1 0 0 1
344 TRUE 1 169 81 1 0 0 1
345 FALSE 1 89 36 0 0 0 3
346 TRUE 1 172 83 1 1 0 4
347 FALSE 1 96 53 1 0 1 6
348 FALSE 0 23 11 NA NA NA NA
349 FALSE 1 90 32 0 1 1 8
350 TRUE 1 178 89 1 0 0 10
351 FALSE 1 84 60 1 1 0 7
352 TRUE 0 24 11 NA NA NA NA
353 FALSE 1 103 44 0 1 0 9
354 FALSE 1 35 42 0 0 1 2
355 TRUE 1 184 92 1 1 1 6
356 FALSE 1 53 63 1 0 1 2
357 FALSE 0 19 9 NA NA NA NA
358 TRUE 1 184 74 0 0 0 2
359 FALSE 1 122 34 0 0 0 1
360 FALSE 1 102 30 0 0 0 6
361 TRUE 1 183 78 0 0 1 8
362 FALSE 1 86 62 1 1 0 8
363 FALSE 1 56 63 1 0 0 6
364 FALSE 0 28 15 NA NA NA NA
365 FALSE 1 91 34 0 1 0 1
366 FALSE 1 49 52 1 1 0 5
367 TRUE 1 182 89 1 0 1 3
368 TRUE 1 182 74 0 1 1 8
369 FALSE 0 28 15 NA NA NA NA
370 TRUE 1 183 92 1 0 1 9

9 Export

write.csv(blocking, paste0("3 out/5_finalblocking_", format(Sys.time(), "%d%b%Y"), ".csv"))
write.csv(assignments, paste0("3 out/6_assignments_", format(Sys.time(), "%d%b%Y"), ".csv"))