My code is the following
Code:
eststo: ivreghdfe y (x=z), a(Year) first savefirst savefprefix(st1)
mat list e(first)
estadd scalar F2 = e(first)[4,1]
esttab est1 st1*
esttab st1* est1, scalar (F F2)
The problem is that the F-Stat from the first stage ends up in the column of the second-stage regression. The reason I put F2 is because if I write the following
Code:
estadd scalar F = e(first)[4,1]
I receive an error that says
e(F) already defined r(110)
This makes me think maybe I need pull out the F-Stat from the first stage in my line of code where I am appending the stored results/regressions.
Code:
esttab st1* est1, scalar (F F2)
After reading help for esttab I used ereturn list to see where the number was being stored and it is stored under e(widstat). So I ran
Code:
eststo clear
eststo: ivreghdfe y (x=y), a(Year) first savefirst savefprefix(st1)
esttab st1* est1 using mytable.rtf, scalar (widstat F)
However, it still shows up in the wrong column. I have posted my table below as a png if it is easier to find the problem.
Array
0 Response to Adding F-Stat of first stage regression using ivreghdfe and estout
Post a Comment