全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2066 1
2019-03-31
我做了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)


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2019-3-31 16:43:42
要摆在同一张表,档案名字要一样,例如都是 test,第一个 outreg2 之最后应该用 replace ,其他的 outreg2 用 append。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群