楼主: kollins
11437 7

[其他] 怎么实现批量回归? [推广有奖]

  • 0关注
  • 0粉丝

教授

27%

还不是VIP/贵宾

-

威望
0
论坛币
4 个
通用积分
0.0130
学术水平
2 点
热心指数
1 点
信用等级
1 点
经验
1460 点
帖子
55
精华
0
在线时间
2530 小时
注册时间
2007-11-18
最后登录
2025-4-26

楼主
kollins 发表于 2010-1-21 17:54:53 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
我要做几千次回归,其中因变量和一个自变量变化,其余的变量不变。
如,y11  x11 z           和        y21 x21 z
        y12  x12 z                      y22 x22 z
        y13  x13 z                      y23 x23  z
不想加group,因为这样竖的数据结构我前期加工难度较大。
二维码

扫码加我 拉你入群

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

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

关键词:批量回归 Group 数据结构 自变量 因变量 因变量 自变量

回帖推荐

johnayl 发表于7楼  查看完整内容

if it's not convergent, you can do one of the following: 1. try to understand why it does not converge. is the model well specified? can you add or remove some RHVs? 2. if it does not work, then change the maximization method and try again 3. If that still does not work, you have to work on the maximization procedure. you may set up the max number of iterations or change the tolerance thresho ...

sungmoo 发表于4楼  查看完整内容

forv i=1/76{ reg y`i' x`i' z }

liuxb 发表于2楼  查看完整内容

根据你的上述资料,试试下面程序,根据变量多少,修改“2” “3” 的数值。 forvalue i=1(1)2 { forvalue j=1(1)3 { reg y`i'`j' x`i'`j' } }

本帖被以下文库推荐

沙发
liuxb 发表于 2010-1-21 19:23:00
根据你的上述资料,试试下面程序,根据变量多少,修改“2” “3” 的数值。
forvalue i=1(1)2 {
forvalue j=1(1)3 {
   reg y`i'`j' x`i'`j'
}
}

藤椅
kollins 发表于 2010-1-21 20:18:48
非常感谢啊,可以操作了。我自己也搞了一个但运行不起来,能否看一问题出哪了。你上面说的i和j在我数据中其实是同步的,i=j=76,所以我写了一个
local i =1
while `i'<=76 {
  {reg y`i'   x`i'   z}
   local i=`i'+1
}
但显示program error:  code follows on the same line as open brace

板凳
sungmoo 发表于 2010-1-21 20:42:13
kollins 发表于 2010-1-21 20:18
local i =1
while `i'<=76 {
  {reg y`i'   x`i'   z}
   local i=`i'+1
}
forv i=1/76{
reg y`i' x`i' z
}

报纸
kollins 发表于 2010-1-21 21:38:41
有个小问题,我用tobit时候,会出现convergence not achieved,这时候程序会停止运行了,我想让它强制运行程序到结束,杂办呢?

地板
蓝色 发表于 2010-1-22 15:05:40
kollins 发表于 2010-1-21 21:38
有个小问题,我用tobit时候,会出现convergence not achieved,这时候程序会停止运行了,我想让它强制运行程序到结束,杂办呢?
既然不收敛就没有最后的结果了。

7
johnayl 发表于 2010-1-23 07:42:55
if it's not convergent, you can do one of the following:

1. try to understand why it does not converge. is the model well specified? can you add or remove some RHVs?
2. if it does not work, then change the maximization method and try again
3. If that still does not work, you have to work on the maximization procedure. you may set up the max number of iterations or change the tolerance threshold. This is only for you to see what the results look like. it is not recommended for reporting the final results.

hope it helps

8
1015415507 学生认证  发表于 2021-4-25 21:43:54
kollins 发表于 2010-1-21 20:18
非常感谢啊,可以操作了。我自己也搞了一个但运行不起来,能否看一问题出哪了。你上面说的i和j在我数据中其 ...
我出现了跟你一样的问题,请问你解决了吗

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-25 14:17