全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
12537 3
2019-01-09
使用下面的语句进行回归后,得到的回归结果怎么全部输出到一张表呢。如果使用
outreg2 using xx.doc, replace只会得到一次回归
forvalues i =0/9{

reg y x1 x2 x3 if year==200`i',r
}
二维码

扫码加我 拉你入群

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

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

全部回复
2019-1-9 19:18:55
outreg2 using tablename, e(all) replace excel ctitle(XX) dec(X)

outreg2 using tablename, append excel ctitle(XX) dec(X)

The first command create a .csv file and the second command add the result into the same file. You can define the column title and decimals as well. Hope it's helpful.
二维码

扫码加我 拉你入群

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

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

2019-1-10 08:25:29
二维码

扫码加我 拉你入群

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

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

2019-1-10 20:33:25

forvalues i =0/9{
reg y x1 x2 x3 if year==200`i',r
est store m`i'
}
reg2docx m0 m1 m2 m3 m4  m5 m6 m7 m8 m9 using  mytable.docx, append  r2(%9.3f)  ar2(%9.2f)   ///  
b(%9.3f) t(%7.2f) title(table1: OLS regression results)
试下
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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