Hi,
I am trying to export a 2SLS regression table that includes a scalar for the first-stage F-statistic.
I am using the code below but Stata is failing to report the F-statistic value to the table.
Am I doing anything wrong?
Otherwise, eoes xtivreg store the first-stage F stat somewhere?
I am trying to export a 2SLS regression table that includes a scalar for the first-stage F-statistic.
I am using the code below but Stata is failing to report the F-statistic value to the table.
Am I doing anything wrong?
Otherwise, eoes xtivreg store the first-stage F stat somewhere?
Code:
*First stage F-stat
xtreg X IV i.year, fe robust
estadd local Fstat = `e(F)'
*2SLS regression
xtivreg y (X= IV) i.year, fe vce(robust)
estadd local Year "Yes"
estadd local Firm "Yes"
estadd local Industry "No"
eststo D1
*Print table
esttab D1 using "$tables\iv_table.tex" , ///
replace noobs b(%10.3f) se star(* 0.10 ** 0.05 *** 0.01) ///
scalars("Fstat IV First-stage F-stat" "N Number of Obsevations" "ar2 Adjusted R squared" "Year Year Fixed Effects" "Firm Firm Fixed Effects" "Industry2 Industry (2dig) Fixed Effects") sfmt( %10.0f %10.3f) ///
align(cccc) nomtitles label nogaps numbers nonotes keep(IPP_output1998)

Comment