--------------------------------------------------------------------------------
README for "Maternal Mortality and Women's Political Power"
Sonia Bhalotra & Damian Clarke & Joseph Gomes & Atheendar Venkataramani
Journal of the European Economic Association
2022
--------------------------------------------------------------------------------

This folder contains four sub-directories:
|_ data:    contains all data used in the paper
|_ source:  contains all source code used for replication of results
|_ results: tables and figures provided in the paper
|_ log:     a log or equivalent file produced when running each source code

All results in the paper can be replicated by running the programs provided in
the "source" sub-directory, simply changing one global variable in each file po-
inting to the location of this folder on your computer.  Additionally, these fi-
les replicate the results contained in online appendices. A small number of res-
ults from the online appendix are not included here given that they are simply
descriptive results from auxiliary datasets. If you wish to generate the precise
format of results from the paper, the tex files located in this directory can be
compiled, providing the complete rendered output.

All source files written in Stata are written for version >=15.0, though have
been run in versions of Stata as early as 13.0.  Source files written in R requ-
ire versions of R from 3.6.3 or later.

Three main separate scripts are provided, broadly replicating the following
 results:

 (a) Main cross-country quota analysis
 (b) Honest DID analysis corresponding to (a)
 (c) An appendix example considering the case of leader quotas in India

These are respectively named quotaAnalysis.do, HonestDiD.R, and IndiaEvent.do.
To replicate all results, each of the scripts should be run from within the
"source" sub-directory. These can be run in Stata, using:
   do quotaAnalysis.do
and in R using:
   source("HonestDiD.R")
after changing the MAIN global at the top of each script. This should be changed
to indicate the location of these replication materials on your computer. For exa-
mple, if the replication materials are located in a folder called "~/replication",
the line in each script defining the MAIN global should be set as:

    global MAIN "~/replication/"

No other changes are necessary.  A number of external user-written programs are
required, which can be installed from the SSC in Stata, or CRAN in R.  In Stata
do files, these are installed automatically if not available, provided that
internet connectivity is available. If a required ado file is not installed and
internet connectivity is not available, the script will fail to run until either
the ado has been installed and the scripts are re-run, or internet connectivity
is available and the script is re-run.  In the case of HonestDID.R, the required
packages are indicated in the header of the script.  To ensure backwards compat-
ability, the precise versions of ado files and R programs are provided in the
"compatatbility" subfolder of the source file.  If desired, these can simply be
placed in the main source directory ensuring that this code can be run if these
files are updated in the future.

Two slightly modified ado files are additionally provided based on ados from St-
ata's SSC.  These are plausexogLIML.ado (a modified version of plausexog.ado),
and did_mutliplegt_dc.ado (a modification of the program did_multiplegt.ado). In
the case of plausexogLIML.ado, this augments plausexog to be able to estimate IV
via LIML, and in the case of did_multiplegt_dc.ado, this provides greater graph-
ing capabilities and corrects a minor typo in the original ado which leads to
errors when calculating pooled effects.  These are both provided in the source
directory, and must remain there for replication materials to run correctly.

Tables are all exported as tex files, and figures are all exported as eps files
or in pdf format. If you desire to replicate the precise format of these tables
and figures as presented in the paper, you can compile the tex file in the main
directory using the following command:

  xelatex genderMMR.tex

These scripts have all been tested on a notebook with 32GB of RAM, and an Intel
i7 with 8 cores using Stata MP version 15.0, and R version 3.6.3.  The file
quotaAnalysis.do takes approximately 15 hours to run in its entirety, and this
will take longer if multiple cores are not available or older processors are
used.

Within scripts, results exported for the main paper are exported to the folder
"results/main". Appendix results are exported to the folder "results/appendix"

--------------------------------------------------------------------------------
For queries regarding data generation and data sources, please refer to Appendix
A of the paper, also available in this directly, or contact Damian Clarke at:

  dclarke [AT] fen.uchile.cl

or

  damian.clarke [AT] protonmail.com.
