互助问答第549期:reghdfe回归命令问题

机制检验问题

尊敬的各位老师:

请问一下老师,reghdfe回归控制了时间效应、地区和行业交互固定效应,输出结果时应该如何添加命令才能使表格结果自动展示时间效应yes,地区行业交互yes。比如说,普通reg y x c i.year i.indcd, r ,这样的结果输出时,在reg2docx后面添加indicate(year=*.year  indcd=*.indcd)就可以了。这个问题已经困扰我一段时间了。

sysuse auto,clear

* Run and store regressions

reghdfe price weight length, a(turn) keepsing

estimates store model1

reghdfe price weight length, a(turn trunk) keepsing

estimates store model2

reghdfe price weight length, a(turn foreign) keepsing

estimates store model2

* Prepare estimates for -estout-

estfe . model*, labels(turn "Turn FE" turn#trunk "Turn-Trunk FE")

return list

* Run estout/esttab

esttab . model* , indicate("Length Controls=length" `r(indicate_fe)')

* Return stored estimates to their previous state

estfe . model*, restore

详情请参见

http://scorreia.com/software/reghdfe/faq.html#how-can-i-combine-reghdfe-with-esttab-or-estout

(0)

相关推荐