正在学习用STATA做Bootstrap的方法,,如果我想要通过Bootstrap得到一个统计值的BC置信区间,而这个统计值是通过两个回归方程得到的,请问应该如何做?
比如:第一个回归: PM=a0+a1SL+a2SR
第二个回归:OC=b0+b1SR+b2PM+b3SL+b4SR*SL+b5SR*PM
我想要求a1*b5的BC置信区间,应该如何做?
万分感谢!!!
楼主: 陌上小熊遇小兔
|
19106
42
[编程问题求助] 求救STATA做Bootstrap方法-需要用到两个回归方程的系数 |
硕士生 22%
-
|
回帖推荐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!!
|
||
京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明 免责及隐私声明