# 中介模型

中介模型是一种统计模型，它把自变量对结果的效应分解为直接路径和经过中间中介变量的间接路径。该模型的现代形式是因果性的：处理的总体效应被拆分为自然直接效应和自然间接效应，后者也称为平均因果中介效应（ACME），二者均由反事实对比定义，并在明确但不可检验的假设下得到识别。<sup>[1](https://doi.org/10.1214/10-sts321)</sup>

| 关键事实 | 详情 |
|---|---|
| 核心分解 | 总体效应精确分解为 \( \mathrm{TE} = \mathrm{NDE}(0) + \mathrm{NIE}(1) = \mathrm{NDE}(1) + \mathrm{NIE}(0) \)，无需线性假设。<sup>[2](https://www.casrai.org/guides/causal-mediation-analysis)</sup> |
| 关键识别假设 | 序贯可忽略性，分为两部分（处理可忽略性和中介可忽略性）；即使在随机化实验中也无法直接检验。<sup>[3](https://imai.fas.harvard.edu/research/files/BaronKenny.pdf)</sup> |
| 经典回归恒等式 | 在无交互的线性模型中，c = c′ + ab，其中 c′ 为直接效应，ab 为间接效应。<sup>[4](https://pmc.ncbi.nlm.nih.gov/articles/PMC2670477/)</sup> |
| 间接效应的首选检验 | 百分位自助法置信区间；索贝尔检验偏保守，不应再使用。<sup>[5](http://davidakenny.net/cm/mediate.htm)</sup> |
| 功效警示 | 按联合显著性检验校准的样本量，对百分位自助法置信区间仅能提供 79.0% 至 82.2% 的功效。<sup>[6](https://sage.cnpereading.com/doi/10.1177/25152459231156606)</sup> |
| 主要软件 | R 中的 mediation 和 medflex，SPSS/SAS/R 的 PROCESS，SAS CAUSALMED，Stata paramed，Mplus，以及近期的 Python 实现。<sup>[3](https://imai.fas.harvard.edu/research/files/BaronKenny.pdf)</sup><sup> • </sup><sup>[7](https://haskayne.ucalgary.ca/sites/default/files/CCRAM/CCRAM_TR_022_04.pdf)</sup><sup> • </sup><sup>[8](https://go.documentation.sas.com/api/docsets/statug/v_023/content/statug_causalmed_details01.htm)</sup> |

## 工作原理

该模型建立在嵌套反事实 \( Y_{i}(t, M_{i}(t^{*})) \) 之上：即单元 \( i \) 在接受处理 \( t \) 时，若中介取其在 \( t^{*} \) 下所取的值，将会得到的结果。自然间接效应为 \( \delta_{i}(t) \equiv Y_{i}(t, M_{i}(1)) - Y_{i}(t, M_{i}(0)) \)，自然直接效应为 \( \zeta_{i}(t) \)，因此总体效应分解为 \( \tau_{i} = \delta_{i}(t) + \zeta_{i}(1 - t) \)。<sup>[1](https://doi.org/10.1214/10-sts321)</sup> 量 \( Y_{i}(1, M_{i}(0)) \) 是一个跨世界结果，即使在原则上也永远无法观测到，这正是中介识别困难的原因。<sup>[2](https://www.casrai.org/guides/causal-mediation-analysis)</sup>

受控直接效应（CDE）则把中介固定为对所有人选定的水平：\( \mathrm{CDE}(M) = E[Y(1,M)] - E[Y(0,M)] \)，其取值取决于所选的 \( m \)。<sup>[5](http://davidakenny.net/cm/mediate.htm)</sup><sup> • </sup><sup>[8](https://go.documentation.sas.com/api/docsets/statug/v_023/content/statug_causalmed_details01.htm)</sup> 相比之下，自然效应将中介保持在个体自身的潜在中介值上；仅随机化处理并不能识别它们，因为中介—结果混杂可能仍然存在，但在关于该混杂的附加假设下，可以从实验数据中进行估计；间接效应没有受控版本。<sup>[32](https://pmc.ncbi.nlm.nih.gov/articles/PMC3989894/)</sup><sup> • </sup><sup>[9](https://ftp.cs.ucla.edu/pub/stat_ser/r389-reprint.pdf)</sup> 在序贯可忽略性下，自然效应由珀尔的中介公式非参数识别，这是一个适用于非线性系统的两步回归表达式；范德维勒于2014年发表在《流行病学》上的四向分解进一步将总体效应拆分为受控直接效应、参照交互、中介交互和纯间接效应。<sup>[2](https://www.casrai.org/guides/causal-mediation-analysis)</sup><sup> • </sup><sup>[10](https://ftp.cs.ucla.edu/pub/stat_ser/r379-corrected.pdf)</sup><sup> • </sup><sup>[8](https://go.documentation.sas.com/api/docsets/statug/v_023/content/statug_causalmed_details01.htm)</sup>

## 操作步骤

经典的巴伦—肯尼程序运行四个回归步骤：检验总体效应 \( c \)（X 对 Y）、路径 \( a \)（X 对 M）、路径 \( b' \)（控制 X 后 M 对 Y），并将 \( c \) 与 \( c' \) 比较以判断部分中介还是完全中介；线性代数给出 \( c = c' + a \cdot b' \)。<sup>[4](https://pmc.ncbi.nlm.nih.gov/articles/PMC2670477/)</sup> 与对该论文的通俗解读相反，在检验中介之前实际上并不要求总体效应显著。<sup>[11](https://diarium.usal.es/jigartua/files/2012/07/Igartua-Hayes-TSJP-2021-Mediation-Moderation-Conditional-Process-Analysis.pdf)</sup>

现代做法则直接估计间接效应并量化其不确定性。索贝尔检验由迈克尔·E·索贝尔于1982年在《社会学方法论》中提出，它假设乘积 \( a \cdot b \) 服从正态抽样分布，而这一假设通常不成立，使其偏保守且区间覆盖不正确。<sup>[5](http://davidakenny.net/cm/mediate.htm)</sup><sup> • </sup><sup>[11](https://diarium.usal.es/jigartua/files/2012/07/Igartua-Hayes-TSJP-2021-Mediation-Moderation-Conditional-Process-Analysis.pdf)</sup> 推荐的替代方法包括自助法（通常约5,000次重抽样）、蒙特卡洛置信区间和贝叶斯方法。<sup>[5](http://davidakenny.net/cm/mediate.htm)</sup><sup> • </sup><sup>[11](https://diarium.usal.es/jigartua/files/2012/07/Igartua-Hayes-TSJP-2021-Mediation-Moderation-Conditional-Process-Analysis.pdf)</sup> 由于序贯可忽略性无法从观测数据中检验，敏感性分析至关重要：mediation 包中的 medsens 程序报告估计的 ACME 作为 \( \rho \) 的函数，\( \rho \) 是中介方程与结果方程误差之间的相关系数，序贯可忽略性对应于零相关。<sup>[1](https://doi.org/10.1214/10-sts321)</sup><sup> • </sup><sup>[2](https://www.casrai.org/guides/causal-mediation-analysis)</sup>

## 起源

中介分析根植于结构方程建模，可追溯到赖特的路径分析；肯尼的历史叙述肯定了路径分析的贡献，并提到赖特对中介的讨论。<sup>[9](https://ftp.cs.ucla.edu/pub/stat_ser/r389-reprint.pdf)</sup><sup> • </sup><sup>[12](https://davidakenny.net/cm/MediationHistory.html)</sup> 阿尔文和豪泽于1975年在《美国社会学评论》上使用路径分析将相关分解为直接效应和间接效应。<sup>[12](https://davidakenny.net/cm/MediationHistory.html)</sup><sup> • </sup><sup>[13](https://doi.org/10.2307/2094445)</sup> 詹姆斯和布雷特（1984）以及1986年巴伦和肯尼发表在《人格与社会心理学杂志》上关于调节—中介区分的论文，采用了带有四个明确因果假设的四步回归程序，后者的引用次数远超另外两篇。<sup>[12](https://davidakenny.net/cm/MediationHistory.html)</sup><sup> • </sup><sup>[14](https://doi.org/10.1037//0022-3514.51.6.1173)</sup>

因果推断转向始于罗宾斯和格林兰于1992年在《流行病学》上形式化直接效应和间接效应的可识别性与可交换性。<sup>[1](https://doi.org/10.1214/10-sts321)</sup><sup> • </sup><sup>[15](https://doi.org/10.1097/00001648-199203000-00013)</sup> 识别条件终结了自然效应被认为缺乏经验内容的时期，今井、基尔和山本2010年在《统计科学》上的框架，以及今井、基尔和廷利2010年配套发表在《心理学方法》上的论文，阐明了估计和敏感性分析。<sup>[9](https://ftp.cs.ucla.edu/pub/stat_ser/r389-reprint.pdf)</sup><sup> • </sup><sup>[1](https://doi.org/10.1214/10-sts321)</sup><sup> • </sup><sup>[2](https://www.casrai.org/guides/causal-mediation-analysis)</sup> 麦金农及其同事2002年在《心理学方法》上的比较表明，步骤法功效较低，并建议检验间接效应，这推动了自助法的采用。<sup>[12](https://davidakenny.net/cm/MediationHistory.html)</sup><sup> • </sup><sup>[16](https://doi.org/10.1037/1082-989x.7.1.83)</sup>

## 变体

多中介模型有两种形式：平行中介，每个间接效应包含一个中介；序列（顺序）中介，至少一个间接效应包含两个或更多中介；PROCESS 将其实现为模型4和模型6。<sup>[17](https://shklinkenberg.github.io/Statistical-Inference/11-mediation.html)</sup> 阿尔伯特和纳尔逊于2011年在《生物计量学》上将中介公式扩展到因果有序的中介序列。<sup>[18](https://doi.org/10.1111/j.1541-0420.2010.01547.x)</sup>

有调节的中介，即条件过程分析的核心，出现在间接效应随调节变量水平不同而变化时；海耶斯2015年的线性有调节中介指数与检验对此进行了量化，PROCESS 可以检验无 X 与 M 交互的假设，并估计含交互的模型，其中对于模型 \( M = \alpha_{0} + aX + \varepsilon \) 和 \( Y = \beta_{0} + \beta_{1}X + \beta_{2}M + \beta_{3}XM + \varepsilon \)，在 \( X_{\mathrm{ref}} \) 处评估的从 \( X_{\mathrm{ref}} \) 到 \( X_{\mathrm{cf}} \) 对比的自然间接效应为 \( a(\beta_{2} + \beta_{3} \cdot X_{\mathrm{ref}})(X_{\mathrm{cf}} - X_{\mathrm{ref}}) \)。<sup>[19](https://doi.org/10.1080/00273171.2014.962683)</sup><sup> • </sup><sup>[7](https://haskayne.ucalgary.ca/sites/default/files/CCRAM/CCRAM_TR_022_04.pdf)</sup> 普里彻2015年在《心理学年鉴》上的综述涵盖了纵向中介、间接效应的因果推断、离散和非正态变量以及多层中介。<sup>[20](https://www.annualreviews.org/content/journals/10.1146/annurev-psych-010814-015258)</sup> 自然效应模型由斯蒂恩及其同事于2017年在《统计软件杂志》上通过 medflex 包实现，它使用数据复制和人工暴露将中介表述为回归问题。<sup>[21](https://doi.org/10.18637/jss.v076.i11)</sup> 机器学习估计已成为研究的重点：刘及其同事2024年在 arXiv 上的工作表明，六种非参数方法的识别公式可以从仅两个统计目标量中恢复，一步估计量达到 \( \sqrt{n} \) 收敛，<sup>[22](https://arxiv.org/html/2408.14620v1)</sup> 泽纳蒂及其同事于2025年在 AISTATS 上提出了一种用于连续处理下中介分析的双重机器学习算法。<sup>[23](https://proceedings.mlr.press/v258/zenati25a.html)</sup>

## 应用

仅在2021年，就有超过10,000篇跨多个学科发表的论文使用了中介分析，其中超过3,000篇来自心理学。<sup>[6](https://sage.cnpereading.com/doi/10.1177/25152459231156606)</sup> 软件实现支持这项工作：廷利及其同事2014年在《统计软件杂志》上发布的 mediation R 包实现了用于 ACME 和平均直接效应的 mediate() 以及用于敏感性分析的 medsens()，<sup>[3](https://imai.fas.harvard.edu/research/files/BaronKenny.pdf)</sup><sup> • </sup><sup>[24](https://doi.org/10.18637/jss.v059.i05)</sup> PROCESS 可用于 SPSS、SAS 和 R，使用百分位自助法置信区间估计基于回归的条件过程模型，<sup>[7](https://haskayne.ucalgary.ca/sites/default/files/CCRAM/CCRAM_TR_022_04.pdf)</sup> SAS 的 CAUSALMED 过程实现了反事实框架，采用瓦莱里和范德维勒2013年《心理学方法》宏中关于暴露—中介交互的解析结果，<sup>[8](https://go.documentation.sas.com/api/docsets/statug/v_023/content/statug_causalmed_details01.htm)</sup><sup> • </sup><sup>[25](https://doi.org/10.1037/a0031034)</sup> Stata 的 paramed 实现了瓦莱里—范德维勒分解，丹尼尔、德斯塔沃拉和库森斯2011年发表在《Stata杂志》上的 gformula 包通过 g-计算处理时变混杂或中介，<sup>[2](https://www.casrai.org/guides/causal-mediation-analysis)</sup><sup> • </sup><sup>[26](https://doi.org/10.1177/1536867x1201100401)</sup> Mplus 自动为单个中介计算反事实定义的因果效应，这一能力约在7.2版引入，并延续到当前9.1版（2026年5月19日发布），<sup>[27](https://www.statmodel.com/download/Causal.pdf)</sup> 刘及其同事还添加了近期的 Python 实现。<sup>[22](https://arxiv.org/html/2408.14620v1)</sup>

## 局限与替代方案

传统的中介测量是脆弱的：估计的 M 到 Y 路径等于 \( b \) 加上一个依赖于误差项协方差的项，因此只要这些误差项相关，中介就是混杂的，即使在无限样本中也会使间接效应估计产生偏差。<sup>[28](https://journals.sagepub.com/doi/10.1177/25152459211047227)</sup> 随机化处理还不够，因为随机化排除了处理—结果和处理—中介混杂，但不能保证不存在中介—结果混杂。<sup>[27](https://www.statmodel.com/download/Causal.pdf)</sup> 巴伦—肯尼差值法还依赖于误差不相关以及效应恒定的线性（无交互），并且即使参数精确已知，在非线性系统中也会产生有偏结果。<sup>[9](https://ftp.cs.ucla.edu/pub/stat_ser/r389-reprint.pdf)</sup><sup> • </sup><sup>[10](https://ftp.cs.ucla.edu/pub/stat_ser/r379-corrected.pdf)</sup> 平行双实验设计还要求 X 对 Y 的直接效应不依赖于 M。<sup>[28](https://journals.sagepub.com/doi/10.1177/25152459211047227)</sup>

中介的测量误差导致间接效应被低估、直接效应被高估；将中介建模为具有多个指标的潜变量可以减轻这种偏差。<sup>[27](https://www.statmodel.com/download/Causal.pdf)</sup> 自然效应识别依赖于跨世界假设，这些假设既不能经验检验也不能由设计强制实施，并且在存在中间混杂因素时必然失败，中间混杂因素是由处理引起的、同时是中介和结果共同原因的变量；丁和范德维勒2016年在《生物计量学》上的敏感性界以及有机效应或干预效应解决了这一情形。<sup>[22](https://arxiv.org/html/2408.14620v1)</sup><sup> • </sup><sup>[29](https://doi.org/10.1093/biomet/asw012)</sup><sup> • </sup><sup>[30](https://doi.org/10.48550/arxiv.1510.02753)</sup> 对中介进行简单回归调整，随着 X 对 M 以及中间变量对 M 的效应增大，受控直接效应估计的偏差越来越大，而序贯 g-估计和 g-计算在每个模拟情形中都给出了无偏估计和充分覆盖。<sup>[31](https://journals.sagepub.com/doi/10.1177/0962280212461194)</sup> 相对于结构方程建模，传统 SEM 表述无法提供适用于特定统计模型之外的统一定义，而 PROCESS 风格的自助路径模型估计的是基于回归的间接效应，仅在线性、无交互的特殊情形下等于因果目标量。<sup>[3](https://imai.fas.harvard.edu/research/files/BaronKenny.pdf)</sup><sup> • </sup><sup>[2](https://www.casrai.org/guides/causal-mediation-analysis)</sup> 基于设计的替代方案，例如使用工具变量鼓励设计的隐式中介设计，用设计特征取代了一些不可检验的假设。<sup>[28](https://journals.sagepub.com/doi/10.1177/25152459211047227)</sup>

## References

1. [Kosuke Imai, Luke Keele, Teppei Yamamoto (2010). Identification, Inference and Sensitivity Analysis for Causal Mediation Effects. Statistical Science.](https://doi.org/10.1214/10-sts321)
2. [Causal Mediation Analysis: Potential Outcomes, Natural Effects, and Sequential Ignorability (CASRAI guide)](https://www.casrai.org/guides/causal-mediation-analysis)
3. [A General Approach to Causal Mediation Analysis (Imai, Keele, Tingley, Psychological Methods)](https://imai.fas.harvard.edu/research/files/BaronKenny.pdf)
4. [Mediation Analysis: A Retrospective Snapshot of Practice and More Recent Directions (PMC)](https://pmc.ncbi.nlm.nih.gov/articles/PMC2670477/)
5. [SEM: Mediation (David A. Kenny)](http://davidakenny.net/cm/mediate.htm)
6. [When to Use Different Inferential Methods for Power Analysis and Data Analysis for Between-Subjects Mediation (AMPPS, 2023)](https://sage.cnpereading.com/doi/10.1177/25152459231156606)
7. [Counterfactual/Potential Outcomes Causal Mediation Analysis with Treatment by Mediator Interaction Using PROCESS (Hayes, CCRAM technical report)](https://haskayne.ucalgary.ca/sites/default/files/CCRAM/CCRAM_TR_022_04.pdf)
8. [SAS/STAT documentation: CAUSALMED procedure, Causal Mediation Effects](https://go.documentation.sas.com/api/docsets/statug/v_023/content/statug_causalmed_details01.htm)
9. [Interpretation and Identification of Causal Mediation (Pearl, UCLA reprint R-389 / Psychological Methods 2014)](https://ftp.cs.ucla.edu/pub/stat_ser/r389-reprint.pdf)
10. [The Causal Mediation Formula – A Guide to the Assessment of Pathways and Mechanisms (Pearl)](https://ftp.cs.ucla.edu/pub/stat_ser/r379-corrected.pdf)
11. [Mediation, Moderation, and Conditional Process Analysis: Concepts, Computations, and Some Common Confusions (Igartua & Hayes, 2021; author-hosted copy)](https://diarium.usal.es/jigartua/files/2012/07/Igartua-Hayes-TSJP-2021-Mediation-Moderation-Conditional-Process-Analysis.pdf)
12. [Mediation History (David A. Kenny)](https://davidakenny.net/cm/MediationHistory.html)
13. [Duane F. Alwin, Robert M. Hauser (1975). The Decomposition of Effects in Path Analysis. American Sociological Review.](https://doi.org/10.2307/2094445)
14. [Reuben M. Baron, David A. Kenny (1986). The moderator-mediator variable distinction in social psychological research: Conceptual, strategic, and statistical considerations.. Journal of Personality and Social Psychology.](https://doi.org/10.1037//0022-3514.51.6.1173)
15. [James M. Robins, Sander Greenland (1992). Identifiability and Exchangeability for Direct and Indirect Effects. Epidemiology.](https://doi.org/10.1097/00001648-199203000-00013)
16. [David P. MacKinnon and colleagues (2002). A comparison of methods to test mediation and other intervening variable effects.. Psychological Methods.](https://doi.org/10.1037/1082-989x.7.1.83)
17. [Mediation with Regression Analysis – Statistical Inference (course text)](https://shklinkenberg.github.io/Statistical-Inference/11-mediation.html)
18. [Jeffrey M. Albert, Suchitra Nelson (2011). Generalized Causal Mediation Analysis. Biometrics.](https://doi.org/10.1111/j.1541-0420.2010.01547.x)
19. [Andrew F. Hayes (2015). An Index and Test of Linear Moderated Mediation. Multivariate Behavioral Research.](https://doi.org/10.1080/00273171.2014.962683)
20. [Advances in Mediation Analysis: A Survey and Synthesis of New Developments (Preacher, Annual Review of Psychology, 2015)](https://www.annualreviews.org/content/journals/10.1146/annurev-psych-010814-015258)
21. [Johan Steen and colleagues (2017). medflex : An R Package for Flexible Mediation Analysis using Natural Effect Models. Journal of Statistical Software.](https://doi.org/10.18637/jss.v076.i11)
22. [General targeted machine learning for modern causal mediation analysis (Williams & Díaz, 2024; crumble R package)](https://arxiv.org/html/2408.14620v1)
23. [Double Debiased Machine Learning for Mediation Analysis with Continuous Treatments (Zenati et al., AISTATS 2025)](https://proceedings.mlr.press/v258/zenati25a.html)
24. [Dustin Tingley and colleagues (2014). mediation : R Package for Causal Mediation Analysis. Journal of Statistical Software.](https://doi.org/10.18637/jss.v059.i05)
25. [Linda Valeri, Tyler J. VanderWeele (2013). Mediation analysis allowing for exposure–mediator interactions and causal interpretation: Theoretical assumptions and implementation with SAS and SPSS macros.. Psychological Methods.](https://doi.org/10.1037/a0031034)
26. [Rhian M. Daniel, Bianca L. De Stavola, Simon N. Cousens (2011). Gformula: Estimating Causal Effects in the Presence of Time-Varying Confounding or Mediation using the G-Computation Formula. The Stata Journal Promoting communications on statistics and Stata.](https://doi.org/10.1177/1536867x1201100401)
27. [Causal Effects in Mediation Modeling: An Introduction With Applications to Latent Variables (Muthén & Asparouhov, Mplus)](https://www.statmodel.com/download/Causal.pdf)
28. [The Failings of Conventional Mediation Analysis and a Design-Based Alternative (Bullock, Green et al., AMPPS 2021)](https://journals.sagepub.com/doi/10.1177/25152459211047227)
29. [Peng Ding, Tyler J. Vanderweele (2016). Sharp sensitivity bounds for mediation under unmeasured mediator-outcome confounding. Biometrika.](https://doi.org/10.1093/biomet/asw012)
30. [Lok, Judith J (2015). Organic direct and indirect effects with post-treatment common causes of mediator and outcome. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1510.02753)
31. [Estimating controlled direct effects in the presence of intermediate confounding: Comparison of five different methods (Loeys et al., Stat Methods Med Res)](https://journals.sagepub.com/doi/10.1177/0962280212461194)
32. [PMC3989894 (pmc.ncbi.nlm.nih.gov)](https://pmc.ncbi.nlm.nih.gov/articles/PMC3989894/)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026 · Last review: Sep 30, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Multivariate association and dimension reduction › Titles A to Me

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/mediation-model

English original: https://www.edgepedia.org/mediation-model
