The code in this repository reproduces figures, tables, and empirical estimates for the paper "Land lotteries, long-term wealth, and political selection".
Please cite the paper if you use this code for academic research:
@article{poulos2019land,
title={Land lotteries, long-term wealth, and political selection},
author={Poulos, Jason},
journal={Public Choice},
volume={178},
number={1-2},
pages={217--230},
year={2019},
publisher={Springer US}
}
lottery.Rdatacontains the datasets used for the analysiscodebook.txtdescribes thelottery.Rdatadatasetsanalysis.shshell script foranalysis.Ranalysis.Rmain file; runs descriptive stats, balance tests, and ITT analysesdescriptive-stats.Rcreate descriptive figures and tables for Online Appendix (OA)ipums-ga-1850.csvsubset of complete--count Census data (1850)counties-1800.csvcounty--level Census data (1800)counties-1850.csvcounty--level Census data (1850)counties-1870.csvcounty--level Census data (1870)
county-maps.Rcreate maps of Georgia with 1807 county boundariesutils.Rdefines functionsprepare.Rprepare lottery data for analysisbalance-tests.Restimates p values for balance plotbalance-plot.Rcreates Figure 1: balance plot with p valuesqq-plot.Rcreates QQ plots for (for OA)summary-table.Rcreate Table 1: summary statistics (including pre-treatment variables, political outcomes, and wealth outcomes)officeholding-robust.Rrobustness tests on officeholder outcome (for OA)slave-wealth-robust.Rrobustness tests on slave wealth outcome (for OA)candidate-robust.Rrobustness tests for candidate outcome (for OA)qreg-plot.Rquantile regression estimates (for OA)power.Rperforms power analysis and outputs plot (for OA)
- Clone a copy of the repository to your working directory with the command
$ git clone https://github.com/jvpoulos/ga-lottery
- The code uses R version 3.2.2 (2015-08-14). To install this R version on Ubuntu, use the command
$ sudo apt-get install r-base-core=3.2.2-1trusty0
- Open
analysis.Rin a script editor- Verify that all required packages in
analysis.Rare installed in your R library - Change the file path specified by
data.directoryto your working directory - Change
patient.descriptive,patient.robust,patient.qreg, orpatient.powerto TRUE to run descriptive and auxilliary analyses
- Verify that all required packages in
- Save your changes to
analysis.R - Open
county-maps.Rand verify required packages are installed - Make shell file
analysis.shexecutable from the Linux/Unix command line:
$ chmod +x analysis.sh
- Execute the file:
$ ./analysis.sh > analysis.txt
- The script will output figures as .pdfs and a .RData file
analysis.RData.analysis.txtcontains the result of the script and LaTeX table output.