Folder `R’ contains all the R codes for the paper.
File `partition_examples.R’ generates figure 1 in the paper.
File `prior.R’ generates the figures and tables from the prior elicitation section.
File `simulation_data.R’ generates the data for the simulation analysis as described in the paper.
Files `simulation_x_win.R’ generate the results for estimator x. CGS0 and CGS1 mean, respectively, CGS without and with covariates, while LLR0, LLR1 and LLR2 mean, respectively, LLR without covariates, with covariates but no interactions between W and X and with covariates and interactions between W and X. Only CGS1 and LLR1 are reported in the paper since the results changed very little qualitatively with these different variations.
File `simulation_master_win.R’ calls the data generation script and each estimator script individually to produce the full results for the simulation experiments.
File `simulation_results_win.R’ read the outputs of the master script and produce the tables and figures for the simulation exercise.
File `application.R’ reads the probation data and produces all the tables and figures in the empirical application section of the paper.
We compare the performance of BART-RDD with the following methods:
- Regression Discontinuity Designs Using Covariates - Calonico, Cattaneo, Farrell and Titiunik (2019)
- Nonparametric bayes analysis of the sharp and fuzzy regression discontinuity designs - Chib, Greenberg and Simoni (2014)
- BART: Bayesian Additive Regression Trees - Chipman, George and McCulloch (2010)
- Bayesian Regression Tree Models for Causal Inference: Regularization, Confounding, and Heterogeneous Effects - Hahn, Murray and Carvalho (2020)
The original code from each of those papers can be found on:
- Calonico, Cattaneo, Farrell and Titiunik Github Repo
- Chib, Greenberg and Simoni R package
- XBART repo, contains code for XBART, XBCF and BART-RDD
It is worth noting that the method of Chib, Greenberg and Simoni is only made available through Windows and Mac binary files of their R package on Siddhartha Chib’s webpage. Since the package is not available in CRAN as of yet, this means the package cannot be compiled on Linux. For this reason, all the analysis in our paper was run on Windows.
File “Previous papers” presents a summary of simulations in a handful of relevant methodological RDD papers.
To discuss implementation of bart-RDD to real datasets we perform a reanalysis of the data studied by Lindo, Sanders and Oreopoulos (2010). Their paper and replication files can be found on the link.