This file explains the different files used in the Costa Rica ISQ paper.

In the main data folder are three files:
CR_ISQdistrict.dta is the Stata data file used in Table 1 for the administrative district results
CR_ISQ_ED.dta is the Stata data file used in Table 1 for the electoral district results
table1.do is the do file that will create the output in Table 1

In the supplement folder are the files used to replicate the numbers mentioned in the text as well as the analyses in the online appendix

There are 4 data files that can be shared:
lapop.dta - This contains the LAPOP survey data used in the online appendix
ucrdta.dta - This contains the Universidad de Costa Rica survey data used in the online appendix
appendix1.dta - This file contains the tariff and trade data at the 2-digit sectoral level used in Tables 1 and 2 of the online appendix
eidata2.dta - This file contains a reduced dataset to run the King-Roberts ecological inference program in R

There are 6 do files
appendix1.do - This is the do file used to create appendix1.dta which contains trade and tariff information for CR's relations with the US at the 2-digit HS code level
appendix1_trade.do - This file sets up and creates the graph showing changing Costa Rican exports to the US over time by factor intensity
CR_ISQ_supp_1.do - This do file creates many of the tables/analyses based on CR_ISQdistrict.dta and included in the online appendix
	The summary statistics and correlation information from Appendix 2 are in here
	The effects of the PLN/PAC from Appendix 3 are in here
	The regressions using presidential results rather than legislative results are in here
	Finally, the bounds for the ecological inference footnote are calculated here
CR_ISQ_supp_2_lapop.do - This file runs the analysis based on the LAPOP survey
	The survey results including our FTZ variable are here
	The % of people in FTZ and non-FTZs voting for CAFTA (and the t-test are here)
	The timing of the decision over CAFTA results are also here
CR_ISQ_supp_2_ucrsurv.do - This do file runs the analysis based on the Universidad de Costa Rica surveys
	The information from Appendix 6 and Appendix 7 are in here
	Also, the mediation results reported in footnote 15 are here
pruningTable1 - This do file runs the pruning checks mentioned in footnote 11 for the administrative and electoral district files

Finally, there is one R file
ei_cr_isq - This file runs the King-Roberts ecological inference package in R using eidata2.dta.