Announcement

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

  • Direct and indirect effects in multinomial logit using 'ldecomp'

    Hi all,

    I am trying to decompose the total effect in an mlogit model into direct and indirect effects. In my study part of the effects of sex (x) on different types of employment (y) is mediated by education level (m).

    Sex is binary (0/1), type of employment (unordered categories) and education is continuous.

    To do this I am using the “ldecomp” command by Maarten Buis. However, in the very helpful example provided here http://maartenbuis.nl/publications/ldecomp.html the outcome is binary (logistic regression). Is there anyway to adjust my code so that I can decompose the effects for each possible type of employment outcome. Please see below my code:

    Code:
    svy: gsem (m <- i.x)(y <- m i.x, mlogit)
    ldecomp y, direct(x) indirect(m)  or
    This is the output:

    Code:
    (running _ldecomp on estimation sample)
    
    Bootstrap replications (50)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
    ..................................................    50
    
    Bootstrap results                               Number of obs     =      5,567
                                                    Replications      =         50
    ------------------------------------------------------------------------------
                 |   Observed   Bootstrap                         Normal-based
                 | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    1/0          |
           total |   1.724955   .1492544     6.30   0.000     1.455882    2.043757
       indirect1 |   .9684451    .011254    -2.76   0.006      .946637    .9907557
         direct1 |   1.781159    .153967     6.68   0.000     1.503568    2.109999
       indirect2 |   .9664629   .0112598    -2.93   0.003     .9446442    .9887857
         direct2 |   1.784812   .1547924     6.68   0.000     1.505809     2.11551
    ------------------------------------------------------------------------------
    Note: Estimates are transformed only in the first equation.
    in equation i/j (comparing groups i and j)
    let the fist subscript of Odds be the distribution of the the indirect variable
    let the second subscript of Odds be the conditional probabilities
    Method 1: Indirect effect = Odds_ij/Odds_jj
              Direct effect = Odds_ii/Odds_ij
    Method 2: Indirect effect = Odds_ii/Odds_ji
              Direct effect = Odds_ji/Odds_jj
    I have tried using factor notation (i.e. 1.y, 2.y etc), however ldecomp does not allow it.

  • #2
    I have managed to decompose the total effects into indirect and direct effects using the KHB method & Kim Baum's khb command (https://www.stata.com/statalist/arch.../msg00846.html)

    Code:
    khb mlogit y i.x || m, outcome(3) c(z1 z2 z3)
    Code:
    -----------------------------------------------------------------------------
               y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    0.x          |  (base outcome)
    -------------+----------------------------------------------------------------
    1.x          |
         Reduced |   1.055716   .1119354     9.43   0.000     .8363266    1.275105
            Full |   1.057116   .1119393     9.44   0.000     .8377188    1.276513
            Diff |     -.0014   .0053165    -0.26   0.792    -.0118201    .0090201
    ------------------------------------------------------------------------------
    Although I was still hoping there was a way to achieve this using ldecomp

    Comment

    Working...
    X