楼主: 爱吃鱼的羊
12621 3

[编程问题求助] stata循环回归,如何实现结果全部输出呢 [推广有奖]

  • 2关注
  • 1粉丝

本科生

53%

还不是VIP/贵宾

-

威望
0
论坛币
358 个
通用积分
1.0108
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
605 点
帖子
28
精华
0
在线时间
140 小时
注册时间
2017-11-13
最后登录
2022-6-23

楼主
爱吃鱼的羊 发表于 2019-1-9 18:57:19 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
使用下面的语句进行回归后,得到的回归结果怎么全部输出到一张表呢。如果使用
outreg2 using xx.doc, replace只会得到一次回归
forvalues i =0/9{

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

扫码加我 拉你入群

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

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

关键词:Stata 如何实现 tata forvalues forvalue

本帖被以下文库推荐

沙发
réussite 发表于 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

板凳
songking 发表于 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)
试下

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-29 10:24