中介分析

来自集智百科 - 复杂系统|人工智能|复杂科学|复杂网络|自组织
(重定向自YG1-S6
跳到导航 跳到搜索

处理变量不仅可以直接影响结局,也可以通过中介变量间接影响结局,因此结局变量的潜在结果同时依赖于处理变量和中介变量。总因果作用可分为自然直接作用和自然间接作用。


在统计学中,中介模型试图通过引入第三个假设变量,即中介变量(也称为中介变量、中介变量或中介变量),来识别和解释自变量与因变量之间观察到的关系的基础机制或过程。与自变量和因变量之间的直接因果关系不同,中介模型所描绘的图景是自变量通过影响中介变量(不可观测)进而影响因变量。因此,中介变量的作用是澄清自变量和因变量之间关系的本质。[1]

Baron and Kenny(1986)[2]提出的中介效应(mediation)框架(简称BK框架)在社会心理和消费者行为等诸多社会科学研究中产生了十分深远的影响。


基于回归的分析的传统 BK 框架存在一些局限性。例如,Zhao et al.(2010)[3]指出了BK框架存在的三点问题:

  • 第一,直接效应的缺失不应成为评价中介效应强度的标准;
  • 第二,寻找中介效应无需以X对Y存在显著的净效应为前提;
  • 第三,Sobel z检验的效力并不强,存在改进方式。


近年来,基于现代因果模型的因果中介分析框架缓解了部分问题,成为了中介分析研究热点。

BK 框架下的中介效应分析

Baron and Kenny (1986) [2]提出了形成一个真正的中介关系必须满足的几个条件如下:


1)让因变量对自变量进行回归,以确认自变量是因变量的显著预测因子,即 [math]\displaystyle{ Y=\beta _{{10}}+\beta _{{11}}X+\varepsilon _{1} }[/math] 的回归系数[math]\displaystyle{ β_{11} }[/math] 是显著的。


2)让中介变量对自变量进行回归,确认自变量是中介变量的显著预测因子,即 [math]\displaystyle{ Me=\beta _{{20}}+\beta _{{21}}X+\varepsilon _{2} }[/math] 的回归系数 [math]\displaystyle{ \beta_{21} }[/math]是显著的。如果中介变量与自变量没有关联,那么它就不可能中介任何事物。


3)让因变量对中介和自变量同时进行回归,即 [math]\displaystyle{ Y=\beta _{{30}}+\beta _{{31}}X+\beta _{{32}}Me+\varepsilon _{3} }[/math] 的回归系数 [math]\displaystyle{ \beta_{32}是显著的,并且 \beta_{31} }[/math]的绝对值应该小于自变量的效应 [math]\displaystyle{ \beta_{11} }[/math]。从而确保了中介变量是因变量的重要预测因子,并且使得相对于第一步,自变量对结果的解释性降低。


中介变量可以解释两个变量之间观察到的全部或部分关系,如果中介变量的加入使自变量和因变量之间的相关性降为零,则中介的证据最大,也称为完全中介(full mediation)。而部分中介(partial mediation)是指不仅中介变量与因变量之间存在显著的关系,而且自变量与因变量之间也存在某种直接的关系。


我们采用Sobel’s test[4]来检验中介变量加入后自变量与因变量之间的关系是否显著降低,从而评估中介效应是否显著。然而,这种方式的统计效力(Power)很低。因此,为了有足够的效力检测显著性影响,需要大的样本量。这是因为Sobel检验的关键假设是正态性假设。因为Sobel检验是根据正态分布来评估给定样本的,所以样本规模小和抽样分布的偏态可能会有问题(详见正态分布)。因此,MacKinnon et al .,(2002)[5]所建议的经验法是,检测较小的效应需要1000个样本,检测中等效应需要100个样本,检测较大效应需要50个样本。基于自助法的检验能减少对样本量的依赖,见 Preacher and Hayes(2004)[6]

因果中介分析

固定(fixing)与条件化(conditioning)

中介分析量化了变量参与从原因到其结果的变化传递的程度。它本质上是一个因果概念,因此不能用统计术语来定义。然而,传统上,大量的中介分析是在线性回归的范畴内进行的。统计术语掩盖了所涉及关系的因果特征,这导致了一些困难、偏差(biases)和局限性(limitations)。而基于因果图(causal diagrams)和反事实逻辑的现代因果分析方法缓解了这些困难、偏见和限制。

这些困难的根源在于,在方法上,根据在回归方程中添加第三个变量所引起的变化来定义中介。虽然这种统计上的变化是伴随中介效应而来的附带现象。但这样的做法未能充分捕捉到中介分析的本质,即量化因果关系。


因果方法的基本前提是,当我们试图估计自变量X对因变量 [math]\displaystyle{ Y }[/math] 的直接影响时,并不总是适合对中介[math]\displaystyle{ M }[/math] 进行“控制”(见上图)。对M进行“控制”的经典理论是,如果我们成功地阻止了[math]\displaystyle{ M }[/math] 的变化,那么我们在[math]\displaystyle{ Y }[/math] 中测量的任何变化都只能归因于X的变化,然后我们就有理由宣布观察到的效果是“[math]\displaystyle{ X }[/math][math]\displaystyle{ Y }[/math] 的直接影响”。不幸的是,“控制[math]\displaystyle{ M }[/math]”并不能从物理上阻止[math]\displaystyle{ M }[/math]的改变;它只是把分析者的注意力集中在相等 [math]\displaystyle{ M }[/math] 值的情况下。而且,概率论的语言没有表示“阻止[math]\displaystyle{ M }[/math]改变”或“物理上保持[math]\displaystyle{ M }[/math]不变”的符号。唯一的运算是“以…为条件”(conditioning),这是当我们“控制” [math]\displaystyle{ M }[/math] 时所做的。或者为[math]\displaystyle{ Y }[/math] 的方程添加 [math]\displaystyle{ M }[/math] 作为其中的一个回归变量。 结果是,与在物理上保持 [math]\displaystyle{ M }[/math] 不变(例如[math]\displaystyle{ M = m }[/math] )并将 [math]\displaystyle{ X = 1 }[/math][math]\displaystyle{ Y }[/math] 的单位 与[math]\displaystyle{ X = 0 }[/math][math]\displaystyle{ Y }[/math] 的单位进行比较的方法不同,我们允许 [math]\displaystyle{ M }[/math]变化但忽略所有使得 [math]\displaystyle{ M = m }[/math] 的其他单位。这两个操作除了没有遗漏变量的情况,本质上是不同的,产生不同的结果[7][8]

举例来说,假设 [math]\displaystyle{ M }[/math][math]\displaystyle{ Y }[/math] 的误差项是相关的。在这种情况下,通过对 [math]\displaystyle{ Y }[/math][math]\displaystyle{ X }[/math][math]\displaystyle{ M }[/math] 上进行回归,就无法对结构系数 [math]\displaystyle{ B }[/math][math]\displaystyle{ A }[/math] (在 [math]\displaystyle{ M }[/math][math]\displaystyle{ Y }[/math] 之间,在 [math]\displaystyle{ Y }[/math][math]\displaystyle{ X }[/math] 之间) 进行估计。事实上,即使当 [math]\displaystyle{ C }[/math] 等于 0 的时候,回归斜率也可能不等于 0 。这有两种后果。首先必须设计新的策略来估计结构系数 [math]\displaystyle{ A }[/math][math]\displaystyle{ B }[/math][math]\displaystyle{ C }[/math] 。其次,直接和间接效应的基本定义必须超越回归分析,并且应该采用类似于“固定M”的操作,而不是“在 [math]\displaystyle{ M }[/math] 的条件下”的操作。

数学定义

Pearl(1994)[8]中定义了这样一个运算符 [math]\displaystyle{ do(M = m) }[/math],它的作用是去除[math]\displaystyle{ M }[/math] 的方程,代之以一个常数[math]\displaystyle{ m }[/math] 。例如,如果基本中介模型由以下方程组成: [math]\displaystyle{ {\displaystyle X=f(\varepsilon _{1}),M=g(X,\varepsilon _{2}),Y=h(X,M,\varepsilon _{3}),} }[/math] 那么应用了[math]\displaystyle{ do(M = m) }[/math]运算的模型将会变为: [math]\displaystyle{ {\displaystyle X=f(\varepsilon _{1}),M=m,Y=h(X,m,\varepsilon _{3})} }[/math] 同时,应用了[math]\displaystyle{ do(X = x) }[/math]运算的模型会变为: [math]\displaystyle{ {\displaystyle X=x,M=g(x,\varepsilon _{2}),Y=h(x,M,\varepsilon _{3})} }[/math] 其中函数 f 和 g 以及误差项 [math]\displaystyle{ ε1 }[/math][math]\displaystyle{ ε3 }[/math] 的分布保持不变。如果我们进一步将 [math]\displaystyle{ do(X = x) }[/math]得到的变量 [math]\displaystyle{ M }[/math][math]\displaystyle{ Y }[/math] 分别重新命名为 [math]\displaystyle{ M(x) }[/math][math]\displaystyle{ Y(x) }[/math] ,我们得到了所谓的“潜在结果(potential outcome)”[9]或“结构反事实(structural counterfactuals)”[10]



这些新变量为定义直接和间接效应提供了便利的描述符号。具体来说,定义了从 [math]\displaystyle{ X = 0 }[/math][math]\displaystyle{ X = 1 }[/math]变化的四种效应:

(a) 总体效应 – [math]\displaystyle{ TE=E[Y(1)-Y(0)] }[/math]

(b) 受控直接效应 - [math]\displaystyle{ CDE(m)=E[Y(1,m)-Y(0,m)] }[/math]

(c) 自然直接效应 - [math]\displaystyle{ NDE=E[Y(1,M(0))-Y(0,M(0))] }[/math]

(d) 自然间接效应 [math]\displaystyle{ NIE = E [Y(0,M(1)) - Y(0,M(0))] }[/math]


其中 [math]\displaystyle{ E[\cdot ] }[/math] 表示对误差项的期望,这些效应有如下一些解释: - [math]\displaystyle{ TE }[/math] 表示的 [math]\displaystyle{ X }[/math][math]\displaystyle{ Y }[/math]的总体因果效应。 - [math]\displaystyle{ CDE }[/math] 表示在某个条件 [math]\displaystyle{ M=m }[/math]下,[math]\displaystyle{ X }[/math][math]\displaystyle{ Y }[/math]的因果效应。 - [math]\displaystyle{ NDE }[/math] 表示 [math]\displaystyle{ X }[/math][math]\displaystyle{ Y }[/math]的直接产生的因果效应。 - [math]\displaystyle{ NIE }[/math]表示 [math]\displaystyle{ X }[/math][math]\displaystyle{ Y }[/math]的通过中介变量 [math]\displaystyle{ M }[/math]产生的因果效应。 - 对于解释 [math]\displaystyle{ X }[/math][math]\displaystyle{ Y }[/math]之间的效应,两个效应的差[math]\displaystyle{ TE-NDE }[/math] 度量的是中介变量在何种程度上是必要的。而 [math]\displaystyle{ NIE }[/math] 度量的是引入中介变量在充分性。 间接效应的受控版本并不存在,因为没有办法通过将一个变量固定到一个常量来屏蔽直接效应。 根据这些定义,总体效应可以如下分解 [math]\displaystyle{ TE=NDE-NIE_{r} }[/math] 其中 [math]\displaystyle{ NIE_r }[/math]表示在 [math]\displaystyle{ NIE }[/math] 的定义中进行 [math]\displaystyle{ X = 1 }[/math][math]\displaystyle{ X = 0 }[/math]的反向转换;线性系统中总体效应等于直接效应与间接效应之和,即负的反转间接效应等于间接效应 [math]\displaystyle{ -NIE_r = NIE }[/math]。这些定义的力量在于它们的普适性;它们适用于具有任意非线性相互作用,任意干扰之间的依赖关系,以及连续变量和离散变量的模型。

中介效应公式

在线性分析中,所有的效应由结构系数的乘积决定,给出 [math]\displaystyle{ {\displaystyle {\begin{aligned}TE&=C+AB\\CDE(m)&=NDE=C,{\text{ independent of }}m\\NIE&=AB.\end{aligned}}} }[/math] 因此,当模型被识别时,所有的效应都是可估计的。在非线性系统中,估计直接和间接效应需要更严格的条件,如不存在混杂因子(即 [math]\displaystyle{ ε_1、ε_2、ε_3 }[/math] 相互独立),可推导出如下公式 [math]\displaystyle{ {\displaystyle {\begin{aligned}TE&=E(Y\mid X=1)-E(Y\mid X=0)\\CDE(m)&=E(Y\mid X=1,M=m)-E(Y\mid X=0,M=m)\\NDE&=\sum _{m}[E(Y|X=1,M=m)-E(Y\mid X=0,M=m)]P(M=m\mid X=0)\\NIE&=\sum _{m}[P(M=m\mid X=1)-P(M=m\mid X=0)]E(Y\mid X=0,M=m).\end{aligned}}} }[/math] 后两个方程被称为中介公式[11][12][13]


已成为许多中介研究的估计对象。他们给出了直接和间接效应的无分布假设(distribution-free)表达式,并证明,尽管误差分布和函数[math]\displaystyle{ f }[/math], [math]\displaystyle{ g }[/math], [math]\displaystyle{ h }[/math] 的性质难以确定,中介效应仍然可以通过使用回归方法利用数据来估计。调节中介和中介调节的分析属于因果中介分析的特例。中介公式确定了各种相互作用系数如何贡献于中介的必要和充分成分。

简单案例

假设模型采用这种形式 [math]\displaystyle{ {\displaystyle {\begin{aligned}X&=\varepsilon _{1}\\M&=b_{0}+b_{1}X+\varepsilon _{2}\\Y&=c_{0}+c_{1}X+c_{2}M+c_{3}XM+\varepsilon _{3}\end{aligned}}} }[/math] 其中,参数 [math]\displaystyle{ c_{3} }[/math] 量化了 M 对 X 对 Y 的影响的修正程度。即使所有参数都是从数据中估计出来的,仍然不清楚是哪些参数组合度量了 X 对 Y 的直接和间接影响,或者,更实际的是,如何评估由中介解释的总体效应 TE 的比例以及应归功于中介效应的 TE 的比例。在线性分析中,前者被 [math]\displaystyle{ b_{1}c_{2}/TE }[/math]所捕获,后者被差值 [math]\displaystyle{ (TE-c_{1})/TE }[/math] 所捕获,并且这两个量重合。然而,在存在交互的情况下,每个部分都需要单独的分析。如中介公式所规定的那样,其结果是: [math]\displaystyle{ {\begin{aligned}NDE&=c_{1}+b_{0}c_{3}\\NIE&=b_{1}c_{2}\\TE&=c_{1}+b_{0}c_{3}+b_{1}(c_{2}+c_{3})\\&=NDE+NIE+b_{1}c_{3}.\end{aligned}} }[/math] 因此,对于中介变量来说足够输出的部分是 [math]\displaystyle{ {\displaystyle {\frac {NIE}{TE}}={\frac {b_{1}c_{2}}{c_{1}+b_{0}c_{3}+b_{1}(c_{2}+c_{3})}},} }[/math]

而需要中介的部分是 [math]\displaystyle{ {\displaystyle 1-{\frac {NDE}{TE}}={\frac {b_{1}(c_{2}+c_{3})}{c_{1}+b_{0}c_{3}+b_{1}(c_{2}+c_{3})}}.} }[/math]

这些分数涉及模型参数的微妙的组合,并且可以在中介公式的帮助下机械地构造。值得注意的是,由于交互作用,即使参数 [math]\displaystyle{ c_{1} }[/math] 为 0,直接效应也可以存在。而且,即使直接和间接效应都为 0,总效应也可以存在。 这说明孤立地估计参数几乎无法告诉我们中介的效果。更一般地说,中介和调节是交织在一起的,不能分开评估。

参考文献

  1. MacKinnon, D. P. (2008). Introduction to Statistical Mediation Analysis. New York: Erlbaum.
  2. 2.0 2.1 Baron RM, Kenny DA. The moderator-mediator variable distinction in social psychological research: conceptual, strategic, and statistical considerations. J Pers Soc Psychol. 1986 Dec;51(6):1173-82. doi: 10.1037//0022-3514.51.6.1173. PMID: 3806354.
  3. Zhao X, Lynch Jr J G, Chen Q. Reconsidering Baron and Kenny: Myths and truths about mediation analysis[J]. Journal of consumer research, 2010, 37(2): 197-206.
  4. Jump up to: a b Sobel, M. E. (1982). "Asymptotic confidence intervals for indirect effects in structural equation models". Sociological Methodology. 13: 290–312. doi:10.2307/270723. JSTOR 270723.
  5. MacKinnon, D. P.; Lockwood, C. M.; Lockwood, J. M.; West, S. G.; Sheets, V. (2002). "A comparison of methods to test mediation and other intervening variable effects". Psychological Methods. 7 (1): 83–104. doi:10.1037/1082-989x.7.1.83. PMC 2819363. PMID 11928892.
  6. Preacher, K.J., Hayes, A.F. SPSS and SAS procedures for estimating indirect effects in simple mediation models. Behavior Research Methods, Instruments, & Computers 36, 717–731 (2004). https://doi.org/10.3758/BF03206553
  7. Robins, J.M.; Greenland, S. (1992). "Identifiability and exchangeability for direct and indirect effects". Epidemiology. 3 (2): 143–155. doi:10.1097/00001648-199203000-00013. PMID 1576220.
  8. 8.0 8.1 Jump up to: a b Pearl, Judea (1994). Lopez de Mantaras, R.; Poole, D. (eds.). "A probabilistic calculus of actions". Uncertainty in Artificial Intelligence 10. San Mateo, CA: Morgan Kaufmann. 1302: 454–462. arXiv:1302.6835. Bibcode:2013arXiv1302.6835P.
  9. Rubin, D.B. (1974). "Estimating causal effects of treatments in randomized and nonrandomized studies". Journal of Educational Psychology. 66 (5): 688–701. doi:10.1037/h0037350.
  10. Balke, A.; Pearl, J. (1995). Besnard, P.; Hanks, S. (eds.). "Counterfactuals and Policy Analysis in Structural Models". Uncertainty in Artificial Intelligence 11. San Francisco, CA: Morgan Kaufmann. 1302: 11–18. arXiv:1302.4929. Bibcode:2013arXiv1302.4929B.
  11. Jump up to: a b Pearl, Judea (2009). "Causal inference in statistics: An overview" (PDF). Statistics Surveys. 3: 96–146. doi:10.1214/09-ss057.
  12. Jump up to: a b Vansteelandt, Stijn; Bekaert, Maarten; Lange, Theis (2012). "Imputation strategies for the estimation of natural direct and indirect effects". Epidemiologic Methods. 1 (1, Article 7). doi:10.1515/2161-962X.1014.
  13. Jump up to: a b Albert, Jeffrey (2012). "Distribution-Free Mediation Analysis for Nonlinear Models with Confounding". Epidemiology. 23 (6): 879–888. doi:10.1097/ede.0b013e31826c2bb9. PMC 3773310. PMID 23007042.

其他推荐论文和资料

编者推荐

书籍推荐

《统计因果推理入门》封面

这本书非常适合初学者入门因果科学,这里面涉及到对结构因果模型的详细定义和阐述,非常清晰易懂。


课程推荐

这个视频内容来自集智俱乐部读书会-因果科学与Causal AI读书会第一季内容的分享,主题是“中介分析和路径因果效应”,由ThoughtWorks高级咨询师兼东南亚市场技术总监徐培以及辅仁大学心理系在读硕士原显智来进行分享。分享的主题分别是可识别性问题以及在中介效应中的可识别性问题。


这个视频内容来自集智俱乐部读书会-因果科学与Causal AI读书会第一季内容的分享,这主题是“中介分析和路径因果效应(论文解读)”,由毕业于北京大学数学学院陆怡舟以及北京大学数学科学学院在读博士胡文杰来进行分享。分别探讨了关于路径效应中的半参数估计方法和基于干预方法的中介分析。


文章总结

北京师范大学的莎莎同学分享在CSDN上的一篇文章,金额充好了如何用中介效应进行分析。


因果科学:连接统计学、机器学习与自动推理的新兴交叉领域

因果观念新革命?万字长文,解读复杂系统背后的暗因果

周晓华:因果推断的数学基础和在医学中的应用


相关路径

  • 因果科学与Casual AI读书会必读参考文献列表,这个是根据读书会中解读的论文,做的一个分类和筛选,方便大家梳理整个框架和内容。
  • 因果推断方法概述,这个路径对因果在哲学方面的探讨,以及因果在机器学习方面应用的分析。
  • 因果科学和 Causal AI入门路径,这条路径解释了因果科学是什么以及它的发展脉络。此路径将分为三个部分进行展开,第一部分是因果科学的基本定义及其哲学基础,第二部分是统计领域中的因果推断,第三个部分是机器学习中的因果(Causal AI)。
  • 复杂网络动力学系统重构文献,这个路径是张江老师梳理了网络动力学重构问题,描述了动力学建模的常用方法和模型,并介绍了一些经典且重要的论文,这也是复杂系统自动建模读书会的主要论文来源,所以大部分都有解读视频。




本中文词条由徐培用户参与编译,龚鹤扬参与审校,思无涯咿呀咿呀编辑,欢迎在讨论页面留言。


本词条内容源自wikipedia及公开资料,遵守 CC3.0协议。