Announcement

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

  • How to display the P value of the mediation with khb command?

    Hi all,

    Recently I read a paper published in JAMA Pediatrics(doi:10.1001/jamapediatrics.2019.1212), the authors provide the P value of the mediating variables using the -khb- command in Stata (Table 2, listed below).
    Click image for larger version

Name:	Table 2 Conf_Pct.jpg
Views:	1
Size:	67.1 KB
ID:	1505465



    I want to estimate the the P value in Summary of confounding part(Conf_Pct column) and Components of Difference part(P_Reduced column), as illustrated in Table 2, but didnot know how.

    The -khb- is a user-written program and can be installed by command:

    Code:
    . net sj 13-1 st0236_2
    . net install st0236_2   // INSTALLATION FILES
    . net get st0236_2       // ANCILLARY FILES, including dlsy_khb.dta and khb.do
    Below is my codes and results, can anyone offer any clue?

    Code:
    . use dlsy_khb.dta
    
    . khb logit univ fses || abil intact boy, disentangle summary verbose
    
    (omitted)
    
    Logistic regression                             Number of obs     =      1,896
                                                    LR chi2(4)        =     216.87
                                                    Prob > chi2       =     0.0000
    Log likelihood = -468.31516                     Pseudo R2         =     0.1880
    
    ------------------------------------------------------------------------------
            univ |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            fses |   .3817324   .0778061     4.91   0.000     .2292353    .5342295
            abil |   1.065516    .106775     9.98   0.000     .8562405    1.274791
          intact |    1.08391   .7386558     1.47   0.142    -.3638292    2.531648
             boy |   .9821406   .1848351     5.31   0.000     .6198704    1.344411
           _cons |  -4.462997   .7479123    -5.97   0.000    -5.928878   -2.997116
    ------------------------------------------------------------------------------
    
    (omitted)
    
    Logistic regression                             Number of obs     =      1,896
                                                    LR chi2(4)        =     216.87
                                                    Prob > chi2       =     0.0000
    Log likelihood = -468.31516                     Pseudo R2         =     0.1880
    
    ------------------------------------------------------------------------------
            univ |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            fses |   .5805281   .0786111     7.38   0.000     .4264531    .7346031
        __000001 |   1.065516    .106775     9.98   0.000     .8562405    1.274791
        __000002 |    1.08391   .7386558     1.47   0.142    -.3638292    2.531648
        __000003 |   .9821406   .1848351     5.31   0.000     .6198704    1.344411
           _cons |  -2.945969    .124697   -23.63   0.000    -3.190371   -2.701568
    ------------------------------------------------------------------------------
    
    Decomposition using the KHB-Method
    
    Model-Type:  logit                                 Number of obs     =    1896
    Variables of Interest: fses                        Pseudo R2         =    0.19
    Z-variable(s): abil intact boy
    ------------------------------------------------------------------------------
            univ |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    fses         |
         Reduced |   .5805281   .0786111     7.38   0.000     .4264531    .7346031
            Full |   .3817324   .0778061     4.91   0.000     .2292353    .5342295
            Diff |   .1987956   .0359394     5.53   0.000     .1283557    .2692355
    ------------------------------------------------------------------------------
    
    Summary of confounding
    
            Variable | Conf_ratio    Conf_Pct   Resc_Fact  
        -------------+-------------------------------------
                fses |  1.5207722       34.24   1.1317064  
        ---------------------------------------------------
    
    Components of Difference
    
          Z-Variable |      Coef    Std_Err     P_Diff  P_Reduced  
        -------------+---------------------------------------------
        fses         |                                            
                abil |  .1661177   .0301003      83.56      28.61  
              intact |   .020142   .0144611      10.13       3.47  
                 boy |  .0125359    .011524       6.31       2.16  
        -----------------------------------------------------------
    Thank you all in advance!

    The Table 2 detailed in the following article:
    Easterlin MC, Chung PJ, Leng M, Dudovitz R. Association of Team Sports Participation With Long-term Mental Health Outcomes Among Individuals Exposed to Adverse Childhood Experiences. JAMA Pediatr. Published online May 28, 2019.
    https://jamanetwork.com/journals/jam...stract/2734743

    The user-written program -khb-, created by Ulrich Kohler, Kristian Bernt Karlson, and Anders Holm, and detailed in the following article:
    Kohler, U., K.B. Karlson, and A. Holm. 2011. "Comparing Coefficients of Nested Nonlinear Probability Models." Stata Journal, 11(3): 420-38.
    https://www.stata-journal.com/sjpdf....iclenum=st0236
    Last edited by Qiguo Lian; 30 Jun 2019, 02:51.

  • #2
    This is just a guess: in the "Components of Difference" table you have a coefficient and its standard error. You could calculate the p-value of the ratio, i.e., z=b/se from the corresponding standard normal distribution.

    Best
    Daniel

    Comment


    • #3
      Originally posted by daniel klein View Post
      This is just a guess: in the "Components of Difference" table you have a coefficient and its standard error. You could calculate the p-value of the ratio, i.e., z=b/se from the corresponding standard normal distribution.

      Best
      Daniel
      According to the developer of -khb-, the paper may report the p-value of the indirect effect alongside the confounding percentages.

      Comment

      Working...
      X