Hello all,
I am running two IV regressions. They both use the same instrument and controls, the only difference being the dependent variable. There is a single instrument
I want to create a .tex table with the 2nd stage results, adding two extra rows to it: the first stage estimates, and the value of the 1st stage F-stat.
My code so far does this:
I only know how to add the F-stat. When I add it, though, it is displayed in bad formatting - with 10 decimal places. How can I adjust that and additionally add the 1st stage estimates? Note that there is a single instrument, so it would be only one extra row on that part.
Thanks a lot!
I am running two IV regressions. They both use the same instrument and controls, the only difference being the dependent variable. There is a single instrument
I want to create a .tex table with the 2nd stage results, adding two extra rows to it: the first stage estimates, and the value of the 1st stage F-stat.
My code so far does this:
Code:
use "dataset", clear local exp_shock exp_ss_b_2003 local imp_shock imp_ss_b_2003 local imp_price_shock ss_price_b_2003 replace `imp_price_shock' = _n cap noi eststo m1: /// ivreghdfe d_imp_tot_2007_2003 `exp_shock' ${weight_2003_b} ${flag_2003_b} (`imp_price_shock'= `imp_shock') /// , absorb(sec2d) cluster(${ss_cluster_firm}) partial( ${weight_2003_b} ${flag_2003_b}) first savefirst savefprefix(st1) quietly estadd local F1 `e(widstat)' local Fstat F1 cap noi eststo m2: /// ivreghdfe d_imp_totHS6_2007_2003 `exp_shock' ${weight_2003_b} ${flag_2003_b} (`imp_price_shock'= `imp_shock') /// , absorb(sec2d) cluster(${ss_cluster_firm}) partial( ${weight_2003_b} ${flag_2003_b}) first savefirst savefprefix(st1) quietly estadd local F1 `e(widstat)' local Fstat F1 esttab m1 m2 /// using "${ss_trade_tabdir}test.tex", /// se ar2 noconstant label compress booktabs /// coef(exp_ss_b_2003 "control1" ss_price_b_2003 "iv") /// keep(exp_ss_b_2003 ss_price_b_2003 ss_price_b_2003) /// s(N `Fstat' `FE', label("N" "F stat, 1st stage" "`FElabel'")) /// / star(* 0.1 ** 0.05 *** 0.01) replace
Thanks a lot!