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:
This is the output:
I have tried using factor notation (i.e. 1.y, 2.y etc), however ldecomp does not allow it.
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
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
Comment