Causal Mediation Analysis (Natural Direct and Indirect Effects)
Causal mediation analysis splits a treatment's total effect into a natural indirect effect through a mediator and a natural direct effect, using counterfactual outcomes predicted from mediator and outcome models.
인과 매개분석은 매개변수 모형과 결과 모형으로 반사실 결과를 예측해 처치의 총효과를 매개변수를 거치는 자연 간접효과와 자연 직접효과로 나누는 방법입니다.
Also known as: Causal Mediation with Sensitivity Analysis
다른 이름: 민감도 분석을 둔 인과 매개분석
How much of my treatment's effect on the outcome works through the mediator, and how sensitive is that to unmeasured confounding?
처치 효과 가운데 얼마가 매개변수를 거쳐 나타나는지, 그리고 그 결과가 관측되지 않은 교란에 얼마나 민감한지 알고 싶어요.
The method fits a model for the mediator and a model for the outcome and computes the expected outcome under each treatment value with the mediator set to its distribution under the other treatment value, giving the average causal mediation effect and the average direct effect. Quasi-Bayesian draws of the model coefficients give confidence intervals, and for linear models a sensitivity analysis shows how the mediation effect changes with the correlation between the two error terms.
When to use Causal Mediation Analysis (Natural Direct and Indirect Effects)
- You have a treatment, a measured mediator and an outcome, and want indirect and direct effects.
- The mediator or outcome is binary and a product of coefficients is not meaningful.
- Treatment and mediator may interact.
When to use something else
- The mediator is measured at the same time as the outcome or could be affected by the outcome; strengthen the design with longitudinal data first.
- You only want to test whether an indirect path is non-zero in a linear path model; use classic mediation analysis with bootstrap indirect effects.
Assumptions and requirements
- Sequential ignorability: no unmeasured treatment-outcome, treatment-mediator or mediator-outcome confounding given the covariates.
- No mediator-outcome confounder affected by the treatment.
- Mediator and outcome models (linear or logistic) are correctly specified.
What the analysis reports
- ACME and ADE under control and under treatment, and the total effect, with quasi-Bayesian 95% CIs and p-values
- Proportion mediated with CI
- Sensitivity of the ACME to the error correlation rho, and the rho at which it vanishes (linear models without interaction)
- Effect plot with intervals
- Optional controlled direct effects CDE(m) at chosen mediator values, from an outcome regression with a treatment-by-mediator interaction, with bootstrap confidence intervals
How to report it
The average causal mediation effect was [value] (95% CI [value], [value]), the average direct effect was [value] (95% CI [value], [value]) and the proportion mediated was [value]; the ACME would be zero at rho = [value].
Common variants
자주 쓰는 설정
The same analysis with settings already chosen. Each runs Causal Mediation Analysis (Natural Direct and Indirect Effects) itself, at the same price.
- Causal mediation with a Poisson count outcome — model y set to “poisson”
- Causal mediation with a negative binomial count outcome — model y set to “negbin”
- Causal mediation on the ratio scale — effect scale set to “ratio”
- Conditional causal mediation at chosen covariate values —
- Causal mediation with a count (Poisson) mediator — model m set to “poisson”; model y set to “linear”
- Causal mediation with probit models — model m set to “probit”; model y set to “probit”
- Causal mediation with exponential-mean models — model m set to “expmean”; model y set to “linear”
- Causal mediation with a continuous treatment — treat type set to “continuous”; treat levels set to “None”
- Causal mediation with a multivalued treatment — treat type set to “multivalued”; treat levels set to “None”
- Weighting-based mediation (inverse probability weighting) — estimator set to “weighting”
- Inverse odds ratio weighting (IORW) mediation — estimator set to “iorw”
Related methods
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with statsmodels.
독립 계산. statsmodels 대조 참조 시험 1건 통과.
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Causal Mediation Analysis (Natural Direct and Indirect Effects) on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable, a treatment indicator and predictor (feature) columns
- Price
- 900 credits for one analysis up to 10,000 rows (complexity level 5); larger or wider data costs more. Optional methodologist review: 3600 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.