*load the three year averages dataset do "do files - REPLICATION/0_gen three year averages.do" est clear ******************** *TABLE 2 IN PAPER ******************** *column1 eststo:reg restrictions_all_racial_max restrictions2_racial_max year17002_south urb2 density2 proprietary charter yearcleanup , robust estadd ysumm *column2 eststo:reg restrictions_all_racial_max restrictions2_racial_max year17002_south 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 (year17002_south=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 firstyear17002_south 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 eststo:reg restrictions_all_racial_max restrictions2_racial_max slaveprice2_carib urb2 density2 proprietary charter yearcleanup if south==1 , robust estadd ysumm *column5 eststo:reg restrictions_all_racial_max restrictions2_racial_max slaveprice2_carib perc_landless2_new urb2 density2 proprietary charter yearcleanup $colonydum if south==1 , robust estadd ysumm //export all the saved estimates to a TeX table. See the comments for table2.do for detailed explanations esttab using "$table_folder/table2.tex", label replace se star(* 0.1 ** 0.05 *** 0.01) booktabs nonotes /// mtitles("\mtitle{OLS}" "\mtitle{OLS}" "\mtitle{2SLS}" "\mtitle{OLS}" "\mtitle{OLS}") /// end("\rowstyle{\relax}\\") /// alignment(D..{-1}) /// drop(_cons) /// mgroups("Labour: Binary (1 if South \& after 1700)" "Labour: Carribean slave prices", pattern(1 0 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) ) /// indicate("Year control=yearcleanup" "Colony fixed effects = colony_d*" "Additional controls = proprietary charter", labels("\checkmark" "")) /// order(restrictions2_racial_max year17002_south slaveprice2_carib 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\)")