Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: binary mediation command


From   Pina Valle <[email protected]>
To   [email protected]
Subject   st: binary mediation command
Date   Wed, 15 Jun 2011 13:18:44 -0400

I am trying to test mediation with a dichotomous outcome, and I have looked around and found a command in STATA called binary_mediation. However, there isn't really any indication in the notes I found on whether the mediation is significant. Here is an example of my output along with the commands that I have used:

. quietly bootstrap r(indir_1) r(tot_ind) r(dir_eff) r(tot_eff), ///
>   reps(500): binary_mediation, dv (evercoh) iv (hhstruct) mv (adrel) ///
>         cv (race income parenteduc agew1 respeduc respinc)

.        
. estat bootstrap, percentile bc

Bootstrap results                               Number of obs      =      7314
                                                Replications       =       500

      command:  binary_mediation, dv(evercoh) iv(hhstruct) mv(adrel) cv(race income parenteduc agew1 respeduc respinc)
        _bs_1:  r(indir_1)
        _bs_2:  r(tot_ind)
        _bs_3:  r(dir_eff)
        _bs_4:  r(tot_eff)

------------------------------------------------------------------------------
             |    Observed               Bootstrap
             |       Coef.       Bias    Std. Err.  [95% Conf. Interval]
-------------+----------------------------------------------------------------
       _bs_1 |   .00601173  -.0000315   .00163333    .0031361   .0097957   (P)
             |                                        .003367   .0100647  (BC)
       _bs_2 |   .00601173  -.0000315   .00163333    .0031361   .0097957   (P)
             |                                        .003367   .0100647  (BC)
       _bs_3 |   .10223182   -.000063   .01316529    .0764666    .128446   (P)
             |                                       .0778659   .1297743  (BC)
       _bs_4 |   .10824356  -.0000945   .01314362    .0834475   .1347804   (P)
             |                                       .0835382   .1354965  (BC)
------------------------------------------------------------------------------
(P)    percentile confidence interval
(BC)   bias-corrected confidence interval

.  
. binary_mediation, dv(evercoh) mv(adrel) iv(hhstruct) ///
>         cv(race income parenteduc agew1 respeduc respinc)
Logit: adrel on iv (a1 path)

Logistic regression                               Number of obs   =       7314
                                                  LR chi2(7)      =     409.52
                                                  Prob > chi2     =     0.0000
Log likelihood = -4414.5505                       Pseudo R2       =     0.0443

------------------------------------------------------------------------------
       adrel |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    hhstruct |   .1206886   .0270068     4.47   0.000     .0677563    .1736209
        race |   -.169737   .0276822    -6.13   0.000    -.2239932   -.1154808
      income |   .0525551   .0238988     2.20   0.028     .0057143    .0993959
  parenteduc |  -.0627959   .0256909    -2.44   0.015    -.1131491   -.0124426
       agew1 |   .3029958    .017249    17.57   0.000     .2691884    .3368033
    respeduc |  -.0576789    .019877    -2.90   0.004    -.0966371   -.0187208
     respinc |   .0497683   .0238852     2.08   0.037     .0029541    .0965825
       _cons |   -3.79803   .2948662   -12.88   0.000    -4.375958   -3.220103
------------------------------------------------------------------------------
Logit: dv on iv (c path)

Logistic regression                               Number of obs   =       7314
                                                  LR chi2(7)      =     418.40
                                                  Prob > chi2     =     0.0000
Log likelihood =  -4854.404                       Pseudo R2       =     0.0413

------------------------------------------------------------------------------
     evercoh |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    hhstruct |   .1888678   .0246015     7.68   0.000     .1406498    .2370858
        race |  -.0719781   .0265371    -2.71   0.007    -.1239898   -.0199664
      income |   .0100539   .0221388     0.45   0.650    -.0333374    .0534452
  parenteduc |  -.0148689   .0240379    -0.62   0.536    -.0619824    .0322446
       agew1 |  -.0632524   .0157713    -4.01   0.000    -.0941636   -.0323411
    respeduc |   -.251559   .0187565   -13.41   0.000    -.2883211   -.2147968
     respinc |  -.1222125   .0223661    -5.46   0.000    -.1660492   -.0783758
       _cons |   2.046847   .2767139     7.40   0.000     1.504498    2.589197
------------------------------------------------------------------------------
Logit: dv on mv & iv (b & c' paths)

Logistic regression                               Number of obs   =       7314
                                                  LR chi2(8)      =     460.19
                                                  Prob > chi2     =     0.0000
Log likelihood = -4833.5111                       Pseudo R2       =     0.0454

------------------------------------------------------------------------------
     evercoh |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       adrel |   .3428757   .0532173     6.44   0.000     .2385717    .4471796
    hhstruct |   .1814979    .024678     7.35   0.000     .1331299    .2298658
        race |  -.0599992    .026681    -2.25   0.025     -.112293   -.0077055
      income |   .0064338   .0221953     0.29   0.772    -.0370683    .0499358
  parenteduc |  -.0100817   .0241264    -0.42   0.676    -.0573685    .0372051
       agew1 |  -.0853616   .0161993    -5.27   0.000    -.1171116   -.0536116
    respeduc |  -.2490846   .0188213   -13.23   0.000    -.2859737   -.2121954
     respinc |  -.1265046   .0224421    -5.64   0.000    -.1704904   -.0825189
       _cons |   2.154015   .2779551     7.75   0.000     1.609233    2.698797
------------------------------------------------------------------------------

Indirect effects with binary response variable evercoh
        indir_1 = .00601173        (adrel, binary)
total indirect  = .00601173
 direct effect  = .10223182
  total effect  = .10824356
       c_path   = .10680445
proportion of total effect mediated = .05553895
ratio of indirect to direct effect  = .05880491
Binary models use logit regression

It seems as if about 6% (0.055) of effect of family structure on engagement in a cohabiting union is mediated by engagement in an adolescent relationship. And I would assume it was significant as a result of the first part of the output above that has the indirect effect (bs_1), as the confidencen interval includes 0. I just wanted to see if I was on the right track with this. Any help would be greatly appreciated.

Thanks.
Pina
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index