Reputation: 915
I am running the following in Stata:
eststo: ivregress 2sls y (x=z) control [aw=weight], cluster(cluster) first
esttab using file.tex, b(%9.3f) se(%9.3f) r2(%9.8f) replace
This produces a publication-style table for 2nd stage. However, what should I do to do that for 1st stage? I need coefficients and R^2.
I am fine with using any command for publication-style output - it doesn't need to be esttab
.
I tried ivregress2
but it did not work:
_iv_vce_wrk(): 3001 expected 21 arguments but received 20
<istmt>: - function returned error
Upvotes: 1
Views: 2212
Reputation:
You just need to run the first stage separately:
webuse hsng2, clear
eststo clear
regress hsngval pcturban faminc i.region
eststo
ivregress 2sls rent pcturban (hsngval = faminc i.region), first
eststo
Which then produces:
esttab, r2(2) mtitles("First Stage" "Second Stage")
--------------------------------------------
(1) (2)
First Stage Second Stage
--------------------------------------------
pcturban 182.2 0.0815
(1.58) (0.27)
faminc 2.731***
(4.01)
1.region 0
(.)
2.region -5095.0
(-1.24)
3.region -1778.1
(-0.44)
4.region 13413.8**
(3.31)
hsngval 0.00224***
(6.82)
_cons -18671.9 120.7***
(-1.56) (7.93)
--------------------------------------------
N 50 50
R-sq 0.69 0.60
--------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
Upvotes: 5