楼主: tanxixi0
13933 13

[回归分析求助] stata利用bootstrap做调节中介效应,如何加入控制变量? [推广有奖]

11
南山有三水 发表于 2022-2-5 00:19:46
你好,请问end前那一行代码是什么呢?s前的那个符号不可识别诶,望回复,万分感谢

12
我的pp有点疼 发表于 2022-2-12 15:21:26
我觉得这个很不错

13
快快乐乐hhh 发表于 2022-3-21 13:43:13

14
Ashley667713 发表于 2023-8-12 00:43:34
请问各位大佬,bootstrap检验结果怎么看呢?得出下面的结果,能说明存在有调节的中介吗?判断标准是什么呢?
以下是我的代码
generate Regulation_FinIndex=Regulation*FinIndex
capture program drop Fun_Med
program Fun_Med, rclass      
sem(FinCons <- FinIndex Regulation Regulation_FinIndex $X_CON Industry Year) (Innovation<- FinCons FinIndex Regulation Regulation_FinIndex $X_CON Industry Year) , nocaps
  return scalar cielw = (_b[FinCons:FinIndex]+($FinCons-$s)*_b[FinCons:Regulation_FinIndex])*_b[Innovation:FinCons]
  return scalar ciemn =(_b[FinCons:FinIndex]+($FinCons)*_b[FinCons:Regulation_FinIndex])*_b[Innovation:FinCons]
  return scalar ciehi = (_b[FinCons:FinIndex]+($FinCons+$s)*_b[FinCons:Regulation_FinIndex])*_b[Innovation:FinCons]
end
set seed 12345
*运行命令
Fun_Med
*bootstrap中介效应
bootstrap r(cielw) r(ciemn) r(ciehi), reps(1000) nodots:Fun_Med
estat boot, bc percentile

下面是stata的bootstrap运行结果

*bootstrap中介效应
. bootstrap r(cielw) r(ciemn) r(ciehi), reps(1000) nodots:Fun_Med

Bootstrap results                                        Number of obs = 5,486
                                                         Replications  = 1,000

      Command: Fun_Med
        _bs_1: r(cielw)
        _bs_2: r(ciemn)
        _bs_3: r(ciehi)

------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
             | coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _bs_1 |   .3648103    .122476     2.98   0.003     .1247617    .6048589
       _bs_2 |   .3995091   .1220864     3.27   0.001     .1602242     .638794
       _bs_3 |   .4342079     .13029     3.33   0.001     .1788442    .6895715
------------------------------------------------------------------------------

. estat boot, bc percentile

Bootstrap results                               Number of obs     =      5,486
                                                Replications      =       1000

      Command: Fun_Med
        _bs_1: r(cielw)
        _bs_2: r(ciemn)
        _bs_3: r(ciehi)

------------------------------------------------------------------------------
             |    Observed               Bootstrap
             | coefficient       Bias    std. err.  [95% conf. interval]
-------------+----------------------------------------------------------------
       _bs_1 |   .36481031  -.0006982   .12247603    .1361559   .6300016   (P)
             |                                       .1390963    .637625  (BC)
       _bs_2 |   .39950908  -.0005795   .12208637    .1739227   .6581728   (P)
             |                                       .1804219   .6728866  (BC)
       _bs_3 |   .43420785  -.0004609   .13028997    .1994043    .711171   (P)
             |                                       .2148655   .7233667  (BC)
------------------------------------------------------------------------------
Key:  P: Percentile
     BC: Bias-corrected

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

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