
Binary-outcome causal mediation by inverse odds-ratio weighting
Source:R/causal_native.R
morie_binary_mediation.RdFits the exposure model \(P(X=1 | M, C)\), weights the exposed by the reciprocal of the exposure-mediator odds ratio, and refits the total-effect outcome model with those weights. The weighted fit is the natural direct effect; the difference from the unweighted total is the natural indirect effect, both on the log-odds scale.
Value
Named list with total, direct, indirect,
or_total, or_direct, or_indirect, se,
ci_low, ci_high, n, B, method.
Details
This is not the linear machinery with a logit swapped in. Logistic
coefficients are not comparable across models – each is scaled by
its own residual variance – so the familiar \(ab\) and
\(c - c'\) decompositions do not hold on the logit scale. That
non-collapsibility is why morie_baron_kenny must not
simply be pointed at a binary outcome.
No standard error is returned unless B > 0: the weights are
themselves estimated, so a model-based standard error understates the
uncertainty.
Mirrors morie.fn.binmed.