Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mediation Bootstrap results

    Dear all,

    I am running a mediation in Stata and I am getting significant effects of the mediator and the IV
    sureg (mv1 iv)(dv mv1 iv)
    After that I want to bootstrap the results

    bootstrap r(ind_eff) r(dir_eff), reps(5000)

    But now the indirect effect _bs_1 has a p value of 0.3 and thereby is not significant anymore

    Could you please help me how I can interpret the results?
    Is the model with a mediation not working for me?

    when running estat bootstrap, percentile the interval value is not 0
    Last edited by OLMABA JALA; 09 Jan 2021, 09:36.

  • #2
    From your example it is not fully clear to me what you are doing and which programs you use. I assume, some of them are written by you and not Stata standard. So it would be interesting to know these in detail. For example, the command you show is not complete since the part after the colon is missing. Which program are you bootstrapping?
    Best wishes

    (Stata 16.1 MP)

    Comment


    • #3
      Thank you Felix

      I am just using STATA programs

      What I would like to do: I would like to check if there is a mediation of mv on the relationship between the IV and the DV
      So first I am running this code -sureg (mv1 iv)(dv mv1 iv)-

      I am bootstrapping the mediation-sureg (mv1 iv)(dv mv1 iv)-

      Comment


      • #4
        Does anyone have an idea?

        My STATA commands are
        sureg (mv1 iv) (dv mv1 iv)
        bootstrap r(ind_eff) r(dir_eff), reps(2000): sureg (mv1 iv) (dv mv1 iv)

        I am getting significant effects of the mediator and the IV for the first commands
        But after the second command the indirect effect _bs_1 has a p value of 0.3 and thereby is not significant anymore

        Could you please help me how I can interpret the results?
        Is the model with a mediation not working for me?

        when running estat bootstrap, percentile the interval value is not 0
        Last edited by OLMABA JALA; 11 Jan 2021, 09:43.

        Comment


        • #5
          I still cannot replicate your commands. Normally, sureg does not compute the statistics you specify. Here is a simple example (Stata 16.1):


          Code:
          . sysuse nlsw88, clear
          (NLSW, 1988 extract)
          
          . sureg (hours age collgrad) (wage hours age collgrad)
          
          Seemingly unrelated regression
          --------------------------------------------------------------------------
          Equation             Obs   Parms        RMSE    "R-sq"       chi2        P
          --------------------------------------------------------------------------
          hours              2,242       2    10.46462    0.0080      18.11   0.0001
          wage               2,242       3    5.487714    0.0911     224.80   0.0000
          --------------------------------------------------------------------------
          
          ------------------------------------------------------------------------------
                       |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
          hours        |
                   age |  -.0932333   .0722292    -1.29   0.197    -.2347999    .0483334
              collgrad |   2.102342   .5198566     4.04   0.000     1.083442    3.121243
                 _cons |   40.37051    2.84026    14.21   0.000      34.8037    45.93731
          -------------+----------------------------------------------------------------
          wage         |
                 hours |    .074792   .0110752     6.75   0.000      .053085    .0964989
                   age |  -.0562952   .0378915    -1.49   0.137    -.1305612    .0179709
              collgrad |   3.459765   .2736087    12.64   0.000     2.923502    3.996028
                 _cons |   6.375591   1.555111     4.10   0.000     3.327629    9.423554
          ------------------------------------------------------------------------------
          
          . bootstrap r(ind_eff) r(dir_eff), reps(999) seed(123): ///
          >         sureg (hours age collgrad) (wage hours age collgrad)
          (running sureg on estimation sample)
          'r(ind_eff)' evaluated to missing in full sample
          r(322);
          Therefore, I assume you must have some ado or something you are using. The regular sureg command does not return these statistics.
          Best wishes

          (Stata 16.1 MP)

          Comment


          • #6
            Thanks
            I am not aware of using any other packages

            But I tried the same using the approach from here: https://stats.idre.ucla.edu/stata/fa...data-method-1/
            bootstrap indeff=r(ind_eff) direff=r(dir_eff) toteff=r(tot_eff), /// reps(500) seed(1) cluster(cid) idcluster(ncid): /// ml_mediation, dv(write) iv(hon) mv(abil) l2id(ncid)

            Comment


            • #7
              Does anyone have an idea?

              Comment


              • #8
                Hi all,

                New to Stata and to Statalist. I have installed the ml_mediation package and am following the syntax here.

                The following syntax is working fine:
                ml_mediation, dv(PSWQ) iv(time) mv(Attention) l2id(ID)
                return list


                However, when I enter the bootstrapping syntax...
                bootstrap indeff=r(ind_eff) direff=r(dir_eff) toteff=r(tot_eff), ///
                reps(5000) seed(1) cluster(ID) idcluster(nID): ///
                ml_mediation, dv(PSWQ) iv(time) mv(Attention) l2id(nID)
                estat boot, percentile bc

                ...I get the following errors:

                . bootstrap indeff=r(ind_eff) direff=r(dir_eff) toteff=r(tot_eff), ///
                indeff=r(ind_eff) command not found
                r(111);

                .

                . reps(5000) seed(1) cluster(ID) idcluster(nID): ///
                command reps is unrecognized
                r(199);


                Does anyone have any ideas why I'm getting errors for these commands?


                Comment


                • #9
                  Obama/Phillip:
                  what if:
                  Code:
                  bootstrap indeff=r(ind_eff) direff=r(dir_eff) toteff=r(tot_eff), reps(500) seed(1) cluster(cid) idcluster(ncid): ml_mediation, dv(write) iv(hon) mv(abil) l2id(ncid)
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    That did the trick, Carlo! Thank you so much for your help.

                    Comment

                    Working...
                    X