This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replication code for Wilke, Humphreys 2020, Field Experiments, Theory, and External Validity | |
# The analysis was run using | |
## R version 3.5.3 (2019-03-11) | |
## DeclareDesign version 0.18.0 | |
## tidyverse version 1.2.1 | |
## bbmle version 1.0.20 | |
## knitr version 1.22 | |
# Install and load packages ----------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(DesignLibrary) | |
library(knitr) | |
# We are interested in a 5 arm trial with clusters. The 5 arm trial admits 5*4/2 comparisons of arms (10!). Plus one might be interested in various estimands that group arms together in different ways. | |
# To get going lets look at standard code for a 5 arm trial from the multiarm designer: | |
# get_design_code(multi_arm_designer(m_arms = 5)) | |
# Now lets base a design off that, but add in clusters. Note that there is an individual level shock and a cluster shock: the ICC is determined by the relative size of these. |