我做了4个回归,前两个没有固定效应和时间固定效应,后两个有,最后把4个回归结果导在一张表上时,如何把固定效应和时间固定效应也导在表上面啊?就是固定效应或时间效应那边的yes或no,怎么显示在一张表上啊?
命令如下:
a.
gen lnvio=log(vio)
regress lnvio shall
est store c1
outreg2 c1 using "C:\Users\admin\Desktop\SW习题的数据\test1",word append addtext(State effects?, NO, Time effects?, NO)
regress lnvio shall incarc_rate density avginc pop pb1064 pw1064 pm1029
est store c2
outreg2 c2 using "C:\Users\admin\Desktop\SW习题的数据\test2",word append addtext(State effects?, NO, Time effects?, NO)
b.
xtset stateid year
xtreg lnvio shall incarc_rate density avginc pop pb1064 pw1064 pm1029, fe vce(cluster stateid)
est store c3
outreg2 c3 using "C:\Users\admin\Desktop\SW习题的数据\test3",word append addtext(State effects?, YES, Time effects?, NO)
c.
gen y77=(year==77)
gen y78=(year==78)
gen y79=(year==79)
gen y80=(year==80)
......
global yeardum "y77 y78 y79 y80 y81 y82 y83 y84 y85 y86 y87 y88 y89 y90 y91 y92 y93 y94 y95 y96 y97 y98 y99"
xtreg lnvio shall incarc_rate density avginc pop pb1064 pw1064 pm1029 $yeardum, fe vce(cluster stateid)
est store b1
outreg2 b1 using "C:\Users\admin\Desktop\SW习题的数据\test4",word append addtext(State effects?, YES, Time effects?, YES)
esttab c1 c2 c3 b1
outreg2 [c1 c2 c3 b1] using "C:\Users\admin\Desktop\SW习题的数据\test5",word append drop($yeardum)