*load the three year averages dataset do "do files - REPLICATION/0_gen three year averages.do" est clear ***************************************** *BASELINE SPECIFICATION IN PAPER (TABLE 1) ***************************************** *column1 eststo:reg restrictions_all_racial_max restrictions2_racial_max perc_black2 urb2 density2 proprietary charter yearcleanup, robust estadd ysumm *column2 eststo:reg restrictions_all_racial_max restrictions2_racial_max perc_black2 perc_landless2_new urb2 density2 proprietary charter yearcleanup $colonydum, robust estadd ysumm *column3//for IV regressions a few more lines of code are needed to save the first stage eststo:ivreg29 restrictions_all_racial_max restrictions2_racial_max (perc_black2= rice_wheat2_40_low) perc_landless2_new urb2 density2 proprietary charter yearcleanup $colonydum, robust savefirst savefprefix (first) first estadd ysumm *save the first state results in the e()-data of the main equation, so that they are printed in the table est store tmp est restore firstperc_black2 scalar fs_r2 = e(r2) scalar fs_b = _b[rice_wheat2_40_low] scalar fs_se = _se[rice_wheat2_40_low] est restore tmp estadd scalar fs_r2=fs_r2 estadd scalar fs_b=fs_b estadd local fs_se = "("+string(fs_se,"%7.3f")+")" est store est3 *column4 cap egen ineq_median=median(perc_landless_avg) cap gen ineq_median_diff=perc_landless_avg-ineq_median eststo:reg restrictions_all_racial_max restrictions2_racial_max perc_black2 perc_landless2_new urb2 density2 proprietary charter yearcleanup $colonydum if ineq_median_diff>0, robust estadd ysumm esttab using "$table_folder/table1.tex", label replace se star(* 0.1 ** 0.05 *** 0.01) booktabs nonotes /// mtitles("OLS" "{OLS}" "2SLS" "\mtitle{OLS\\Inequality above median}") /// end("\rowstyle{\relax}\\") /// alignment(D..{-1}) /// drop(_cons) /// indicate("Year control=yearcleanup" "Colony fixed effects = colony_d*" "Additional controls = proprietary charter", labels("\checkmark" "")) /// order(restrictions2_racial_max perc_black2 perc_landless2_new urb2 density2 yearcleanup $colonydum proprietary charter ) /// scalars("ymean Mean suffrage" "r2 \(R^2\)" "fs_b \midrule{\bfseries First-Stage Results}\\Instrument Coefficient" "fs_se ~" "fs_r2 1\(^{st}\) stage \(R^2\)") eststo clear