楼上答主的回答稍有遗漏,貌似使用ivregress是无法直接导出第一阶段回归的,但是使用ivregess可以。
根据help helpreg2的文档得到:
Q: How do I report the first-stage from ivregress?
A: This has been the most frequently asked question with outreg2. What had been requested was a full
compatibility with the rest of Stata, i.e., factor variables, post estimation commands, etc. This was
impletemented for the first time by ivregress2, which was the first to extend the official version in
about 5 or 6 years.
再次help ivregress2得到各类例子,例如:
ivregress2 2sls mpg weight (length=displacement), first
est restore first
outreg2 using myfile, cttop(first) replace
est restore second
estat firststage
local fstat `r(mineig)'
estat endogenous
local p_durbin `r(p_durbin)'
outreg2 using myfile, cttop(second) excel adds(IV F-stat, `fstat', Durbin pval, `p_durbin')
用ivregress2命令实现一起输出,具体如下:
xi:ivregress 2sls y (x=iv) …… ,r first
xi:ivregress2 2sls y (x=iv) …… ,r first
est restore first
outreg2 using myfile, cttop(first) replace
est restore second
outreg2 using myfile, cttop(second) excel