Regression-with-Residuals Mediation Analysis
Regression-with-residuals is a mediation approach for settings where a confounder of the mediator and outcome is itself affected by treatment. The treatment-induced confounders are replaced by their residuals from a regression on treatment and baseline covariates, which lets one outcome model yield controlled direct effects and interventional direct and indirect effects.
잔차 회귀는 매개변수와 결과의 교란변수가 처치의 영향을 받는 상황을 위한 매개분석입니다. 처치로 유발된 교란변수를 처치와 기저 공변량에 회귀한 잔차로 바꾸어, 하나의 결과모형에서 통제 직접효과와 개입적 직접·간접효과를 얻습니다.
How much of my treatment's effect goes through the mediator when some confounders of the mediator are themselves changed by the treatment?
매개변수의 교란변수 일부가 처치에 의해 바뀌는데도 처치효과 중 매개변수를 거치는 몫은 얼마일까요?
Baseline covariates are centred and each post-treatment confounder is residualised on treatment and baseline covariates. The outcome is regressed on treatment, mediator, their product, the centred covariates and the residuals, and the mediator on treatment and covariates. Combining the coefficients gives the controlled direct effect at a chosen mediator value and the interventional direct and indirect effects, with bootstrap intervals.
When to use Regression-with-Residuals Mediation Analysis
- A variable affected by treatment confounds the mediator-outcome relationship.
- Outcome and mediator are continuous and linear models are reasonable.
- You want controlled direct effects or interventional effects that remain identified under treatment-induced confounding.
When to use something else
- There is no treatment-induced confounder and you want natural effects: use Causal Mediation Analysis (Natural Direct and Indirect Effects)
- You only need the controlled direct effect with a two-step demediation: use Sequential G-Estimation of Controlled Direct Effects
- The treatment varies over time: use Marginal Structural Model (Time-Varying Treatment)
Assumptions and requirements
- No unmeasured confounding given baseline and post-treatment confounders
- Linear models for the outcome, mediator and each post-treatment confounder
- Treatment-by-mediator interaction captured by a product term
What the analysis reports
- Controlled direct effect at a chosen mediator value
- Interventional direct and indirect effects and their sum
- Proportion mediated
- Bootstrap standard errors and percentile intervals
- Model coefficients
How to report it
The interventional indirect effect through [mediator] was [value] (95% CI [value] to [value]) and the controlled direct effect at [value] was [value].
Related methods
- Sequential G-Estimation of Controlled Direct Effects
- Causal Mediation Analysis (Natural Direct and Indirect Effects)
- Path-Specific Effects with Multiple Ordered Mediators
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with statsmodels and direct computations (formulas, enumeration or simulation) at a stated tolerance of 1e-8.
독립 계산. statsmodels·직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과(허용오차 1e-8).
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 Regression-with-Residuals Mediation Analysis on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable, a treatment indicator and mediator
- Price
- 400 credits for one analysis up to 10,000 rows (complexity level 3); larger or wider data costs more. Optional methodologist review: 1800 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.