This repository contains the code for my paper The Optimal Allocation of Campaign Funds in House Elections. To run the analysis for the entire paper, first clone the directory,
git clone https://github.com/dincerti/optimal-house.git
Then, from the command line (terminal) run the script
Make sure that all of the required packages have been installed. The script takes around 17 hours to run on my local machine. The code is slow because there are 20 separate Bayesian models that need to be estimated. The scripts containing these models are
06-do_dlmnat is much faster than the others). Your machine must have at least four cores because the Bayesian models in
07c are run in parallel.