4492 18

# [编程问题求助] 求救STATA做Bootstrap方法-需要用到两个回归方程的系数 [推广有奖]

• 2关注
• 1粉丝

22%

-

0

190 个

0 点

0 点

0 点

1154 点

93

0

113 小时

2010-10-30

2014-4-22

第二个回归：OC=b0+b1SR+b2PM+b3SL+b4SR*SL+b5SR*PM

 载入中......

### 回帖推荐

sophiafinn 发表于9楼

in your case capture drop program bootaaa program bootaaa, rclass sureg ( PM SL SR) (OC SR PM SL SR*SL SR*PM) if' in' return scalar aaa = _b[SL]*[OC]_b[SR*PM] end bootstrap r(aaa) , bca reps(5000) nodots: bootaaa
Tomorrow is another day!!

 请各位高手踊跃帮忙啊~~
Tomorrow is another day!!

 .....
Tomorrow is another day!!

 等待回答。。。。
Tomorrow is another day!!

 帮忙啊～～～
Tomorrow is another day!!

 求救！！
Tomorrow is another day!!

sophiafinn 发表于 2013-2-7 08:19:11 |显示全部楼层
 I guess similar to this one http://www.ats.ucla.edu/stat/stata/faq/mulmediation.htm

sophiafinn 发表于 2013-2-7 08:20:44 |显示全部楼层
 capture drop program bootmm program bootmm, rclass   syntax [if] [in]   sureg (read math)(write math)(science read write math) if' in'   return scalar indread  = [read]_b[math]*[science]_b[read]   return scalar indwrite = [write]_b[math]*[science]_b[write]   return scalar indtotal = [read]_b[math]*[science]_b[read]+ ///                            [write]_b[math]*[science]_b[write] end bootstrap r(indread) r(indwrite) r(indtotal), bca reps(5000) nodots: bootmm

sophiafinn 发表于 2013-2-7 08:25:12 |显示全部楼层
 in your case capture drop program bootaaa program bootaaa, rclass sureg ( PM SL SR) (OC SR PM SL SR*SL SR*PM) if' in' return scalar aaa  = [PM]_b[SL]*[OC]_b[SR*PM] end bootstrap r(aaa) , bca reps(5000) nodots: bootaaa

 sophiafinn 发表于 2013-2-7 08:25 in your case capture drop program bootaaa十分感谢！！我自己做了一下，应该就是这个样子了。不过在sureg语句上面需要再加上syntax [if][in] 否则运行结果就会显示insufficient observations to compute jackknife standard errors no results will be saved。 再次感谢！！
Tomorrow is another day!!

 您需要登录后才可以回帖 登录 | 我要注册 回帖后跳转到最后一页

论坛VIP
贵宾会员
可免费加入