# 反事实推断

反事实推断是一种统计方法，它通过将观察到的结果与在不同处理下本会发生的结果进行比较，来估计某种处理或干预的效应。它的基本对象是潜在结果：对于每个单元和每个处理水平，结果在该水平下会取的值。唐纳德·鲁宾（Donald Rubin）将因果效应定义为在共同单元集合上不同处理下潜在结果的比较，而分配机制——每个单元接受处理的概率模型——揭示哪些值被观察到。<sup>[1](https://www.tandfonline.com/doi/abs/10.1198/016214504000001880)</sup>由于一个单元只接受一种处理，因此至多只有一个潜在结果能够被实现和观察到，这个问题被称为“因果推断的根本问题”。<sup>[2](https://assets.cambridge.org/97805218/85881/excerpt/9780521885881_excerpt.pdf)</sup>因此，估计总是将组间比较与关于处理如何分配的假设结合起来。

| 关键事实 | 细节 |
|---|---|
| 个体因果效应 | \( \Delta_{i} = Y_{i}(1) - Y_{i}(0) \)，即同一单元在处理和控制下潜在结果之差<sup>[3](https://web.stanford.edu/%7Eswager/causal_inf_book.pdf)</sup> |
| 总体平均处理效应 | \( \tau = E_{P}[Y_{i}(1) - Y_{i}(0)] \)<sup>[3](https://web.stanford.edu/%7Eswager/causal_inf_book.pdf)</sup> |
| 根本问题 | 每个单元只能观察到 \( Y_{i}(0) \) 和 \( Y_{i}(1) \) 中的一个<sup>[2](https://assets.cambridge.org/97805218/85881/excerpt/9780521885881_excerpt.pdf)</sup> |
| 核心识别假设 | 可交换性（无混淆）、正值性、一致性和无干扰；SUTVA将无干扰与每个处理水平没有不同版本的要求结合起来<sup>[4](https://jech.bmj.com/content/76/11/960)</sup> |
| 双重稳健性质 | 如果倾向模型或结果模型之一被正确设定，AIPW估计量仍保持一致<sup>[5](https://pmc.ncbi.nlm.nih.gov/articles/PMC10201752/)</sup> |
| 当无混淆性不可信时 | 工具变量、双重差分、合成控制和回归断点是主要替代方法<sup>[6](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-114601)</sup> |

## 如何运作

对于二值处理，每个单元 \( i \) 有两个潜在结果：控制下的 \( Y_{i}(0) \) 和接受处理下的 \( Y_{i}(1) \)，因果效应是一种比较，例如差值 \( Y_{i}(1) - Y_{i}(0) \)。<sup>[6](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-114601)</sup>观察到的结果是 \( Y_{i} = Y_{i}(W_{i}) \)，其中 \( W_{i} \) 是接受的处理。<sup>[3](https://web.stanford.edu/%7Eswager/causal_inf_book.pdf)</sup>如果 \( E[Y_{i}(1)] \neq E[Y_{i}(0)] \)，则总体中存在平均因果效应。<sup>[7](https://content.sph.harvard.edu/wwwhsph/sites/1268/2024/04/hernanrobins_WhatIf_26apr24.pdf)</sup>

识别依赖于四个假设。一致性将反事实与观察值联系起来：如果 \( X = x \)，则 \( Y_{x} = Y \)。<sup>[8](https://bayes.cs.ucla.edu/PRIMER/primer-ch4.pdf)</sup>SUTVA要求一个单元的潜在结果不随分配给其他单元的处理而变化，并且每个处理水平没有不同版本。<sup>[4](https://jech.bmj.com/content/76/11/960)</sup><sup> • </sup><sup>[7](https://content.sph.harvard.edu/wwwhsph/sites/1268/2024/04/hernanrobins_WhatIf_26apr24.pdf)</sup>可交换性，或无混淆性，表述为 \( \{Y_{i}(0), Y_{i}(1)\} \perp\!\!\!\perp W_{i} \mid X_{i} \)；罗森鲍姆（Rosenbaum）和鲁宾表明，通过倾向评分 \( e(x) = \Pr(W = 1 \mid x) \)——最粗的平衡评分——以它为条件可保持独立性，这一问题因此变得可处理。<sup>[3](https://web.stanford.edu/%7Eswager/causal_inf_book.pdf)</sup><sup> • </sup><sup>[9](https://ar5iv.labs.arxiv.org/html/2204.02231)</sup>正值性要求每个暴露值对每个协变量组合都有非零概率。<sup>[4](https://jech.bmj.com/content/76/11/960)</sup>

## 如何实施

分配机制是组织原则：分析首先指定处理是如何分配的，以随机化作为典型的无混淆分配，并处理不依从和缺失数据等复杂情况。<sup>[10](https://www.annualreviews.org/content/journals/10.1146/annurev.publhealth.21.1.121)</sup>在流行病学中，指定目标试验——观察性研究所模拟的假设性随机试验——澄清正在估计哪个因果效应。<sup>[4](https://jech.bmj.com/content/76/11/960)</sup>

调整方法分为五大类：标准化、匹配、加权、双重稳健方法和机器学习方法。<sup>[11](https://researchonline.lshtm.ac.uk/id/eprint/4677062/1/Keele-Grieve-2025-So-many-choices-a-guide.pdf)</sup>实践者在不查看结果变量的情况下检查数据中的重叠程度，这比估计器的选择更重要；匹配结合回归通常比单独使用回归、倾向评分或匹配更稳健，是推荐的默认方法。<sup>[12](https://www.cemmap.ac.uk/wp-content/legacy/resources/imbens_wooldridge/lecture_1.pdf)</sup>倾向建模应以足以实现可忽略性的平衡评分为目标，而不是最优预测；C统计量等区分统计量并不表示未测量混杂减少。<sup>[5](https://pmc.ncbi.nlm.nih.gov/articles/PMC10201752/)</sup>

## 起源

该框架的形式化符号出现在1923年一篇用波兰语撰写的论文中，由达布罗夫斯卡（Dabrowska）和斯皮德（Speed）（1990）英译。<sup>[13](https://link.springer.com/article/10.1186/1471-2288-5-28)</sup><sup> • </sup><sup>[14](https://www.stat.berkeley.edu/~census/oxcauser.pdf)</sup>已发表的记述确定了反事实模型扩展到观察性研究中的统计推断的时间，这也使得缺失数据和不依从性的形式化处理成为可能。<sup>[13](https://link.springer.com/article/10.1186/1471-2288-5-28)</sup><sup> • </sup><sup>[6](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-114601)</sup>在鲁宾的表述（称为鲁宾因果模型）中，无法同时观察到两个潜在结果这一问题被称为评估问题。<sup>[2](https://assets.cambridge.org/97805218/85881/excerpt/9780521885881_excerpt.pdf)</sup><sup> • </sup><sup>[15](https://irp.wisc.edu/publications/dps/pdfs/dp134008.pdf)</sup>鲁宾2004年的费希尔讲座展示了他所发展的框架，现代教科书中的阐述见于英本斯（Imbens）和鲁宾2015年的著作。<sup>[1](https://www.tandfonline.com/doi/abs/10.1198/016214504000001880)</sup><sup> • </sup><sup>[16](https://doi.org/10.1017/cbo9781139025751)</sup>

## 变体

匹配为每个处理单元选择一个控制单元，使某个度量最小化，通常是基于全样本协方差矩阵逆的马氏距离度量。<sup>[6](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-114601)</sup>遗传匹配是一种多变量匹配方法，平衡混杂因素和处理前结果的分布，由亚历克西斯·戴蒙德（Alexis Diamond）和贾斯吉特·S·塞洪（Jasjeet S. Sekhon）于2012年发表在《经济学与统计学评论》（The Review of Economics and Statistics）上。<sup>[17](https://doi.org/10.1162/rest_a_00318)</sup>

加权和g方法。倾向评分支持分层、匹配和逆处理概率加权；个体分配概率 \( p_{i} \equiv P(W_{i} \mid X_{i}, Y^{obs}) \) 在奈曼式和贝叶斯推断模式中都起关键作用。<sup>[3](https://web.stanford.edu/%7Eswager/causal_inf_book.pdf)</sup><sup> • </sup><sup>[10](https://www.annualreviews.org/content/journals/10.1146/annurev.publhealth.21.1.121)</sup>G计算（参数g公式）使用回归模型为每个观测预测两个潜在结果，罗宾斯推导了通用递归g计算算法，后来扩展到g估计和带有逆概率加权估计量的边际结构模型；罗宾斯1999年的《综合》（Synthese）论文是边际结构模型的标准参考文献。<sup>[4](https://jech.bmj.com/content/76/11/960)</sup><sup> • </sup><sup>[13](https://link.springer.com/article/10.1186/1471-2288-5-28)</sup><sup> • </sup><sup>[18](https://doi.org/10.1023/a:1005285815569)</sup>

双重稳健估计量。增广逆概率加权（AIPW）估计量将结果回归与倾向评分结合起来，如果两个模型之一（而不一定两者都）被正确设定，则保持一致；它通常与詹姆斯·M·罗宾斯（James M. Robins）和安德烈亚·罗特尼茨基（Andrea Rotnitzky）1995年发表在《美国统计协会杂志》（Journal of the American Statistical Association）上的论文相关联。<sup>[5](https://pmc.ncbi.nlm.nih.gov/articles/PMC10201752/)</sup><sup> • </sup><sup>[19](https://doi.org/10.1080/01621459.1995.10476494)</sup>双重机器学习与维克托·切尔诺茹科夫（Victor Chernozhukov）及其同事2017年的工作相关，将机器学习带入这个框架。<sup>[20](https://doi.org/10.1920/wp.cem.2016.4916)</sup>

合成控制通过用具有相似数据生成过程的控制单元加权来预测处理单元的结果；权重在为正且总和为一的约束下最小化处理前拟合标准。<sup>[21](https://doi.org/10.1257/jel.20191450)</sup><sup> • </sup><sup>[22](https://link.springer.com/article/10.1007/s00181-025-02738-9)</sup>

用于异质性效应的机器学习。用于个体处理效应的随机森林变体包括虚拟双胞胎（Virtual Twins）、反事实森林、反事实合成森林和BART，即贝叶斯加性回归树，由休·A·奇普曼（Hugh A. Chipman）、爱德华·I·乔治（Edward I. George）和罗伯特·E·麦卡洛克（Robert E. McCulloch）于2010年发表在《应用统计学年鉴》（The Annals of Applied Statistics）上。<sup>[23](https://pmc.ncbi.nlm.nih.gov/articles/PMC5920646/)</sup><sup> • </sup><sup>[24](https://doi.org/10.1214/09-aoas285)</sup>

## 应用

合成控制因其可解释性和透明性而在实证经济学和社会科学中得到广泛应用。<sup>[21](https://doi.org/10.1257/jel.20191450)</sup>在英格兰医院按绩效付费的卫生政策评估中，将合成控制、滞后因变量回归和基于过去结果的匹配与双重差分进行了比较。<sup>[25](https://researchonline.lshtm.ac.uk/id/eprint/2572267/1/10742_2016_Article_146.PMC4869762.pdf)</sup>在流行病学中，反事实合成森林被应用于AWARE项目（Project Aware）比较有效性试验，以探索药物使用在性风险中的作用。<sup>[23](https://pmc.ncbi.nlm.nih.gov/articles/PMC5920646/)</sup>

## 局限与替代方法

双重稳健估计量以方差换取稳健性：当两个辅助模型都正确时，AIPW的大样本方差小于IPW，但当只有结果模型正确时，其方差大于直接回归，并且在重叠较差时，使用未修剪IPW权重的DR通常比结果模型估计量更差。<sup>[26](https://www2.stat.duke.edu/~fl35/teaching/640/Chap3.5_Doubly%20Robust%20Estimation.pdf)</sup>正值性违反迫使外推：如果 \( P(W = 0 \mid X = x^{*}) = 1 \)，则在 \( x^{*} \) 处的条件效应估计需要正确设定的结果模型。<sup>[9](https://ar5iv.labs.arxiv.org/html/2204.02231)</sup>未测量混杂无法用数据验证：混杂因素和工具变量方法都依赖不可检验的假设，未测量的生活方式或行为特征带来的隐藏偏倚是非实验研究中持续存在的问题。<sup>[5](https://pmc.ncbi.nlm.nih.gov/articles/PMC10201752/)</sup><sup> • </sup><sup>[11](https://researchonline.lshtm.ac.uk/id/eprint/4677062/1/Keele-Grieve-2025-So-many-choices-a-guide.pdf)</sup>干扰破坏SUTVA；疫苗接种是一个标准例子，因为家庭疫苗接种状况改变了个体感染疾病的可能性。<sup>[9](https://ar5iv.labs.arxiv.org/html/2204.02231)</sup>敏感性分析仅揭示在指定偏倚参数值下的结果范围，而曼斯基（Manski）的部分识别界完全放弃了无混淆性。<sup>[13](https://link.springer.com/article/10.1186/1471-2288-5-28)</sup><sup> • </sup><sup>[15](https://irp.wisc.edu/publications/dps/pdfs/dp134008.pdf)</sup>

当无混淆性不可信时，主要方法是工具变量、双重差分、合成控制和回归断点设计。<sup>[6](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-114601)</sup>IV分析针对依从者的局部平均处理效应而非ATE，弱工具变量使IV估计偏向OLS估计，同时放大标准误。<sup>[4](https://jech.bmj.com/content/76/11/960)</sup><sup> • </sup><sup>[5](https://pmc.ncbi.nlm.nih.gov/articles/PMC10201752/)</sup>双重差分要求平行趋势；在该假设被违反的模拟中，滞后因变量方法给出了偏误最小且效率最高的估计。<sup>[25](https://researchonline.lshtm.ac.uk/id/eprint/2572267/1/10742_2016_Article_146.PMC4869762.pdf)</sup>

结构因果模型观点将潜在结果框架与结构方程模型和图模型结合起来；其do算子通过删除决定 \( X \) 的方程并用常数 \( X = x \) 替换来模拟干预。<sup>[27](https://ftp.cs.ucla.edu/pub/stat_ser/r350-reprint.pdf)</sup>反事实 \( Y_{x}(u) \) 定义为在修改后的子模型 \( M_{x} \) 中 \( Y \) 的解，do演算——三条推断规则——对于从因果图判定 \( P(y \mid do(x)) \) 的可识别性是完备的。<sup>[8](https://bayes.cs.ucla.edu/PRIMER/primer-ch4.pdf)</sup>后门准则提供了一种图形化方法来选择调整集，并蕴含潜在结果推断中使用的条件可忽略性。<sup>[28](https://ftp.cs.ucla.edu/pub/stat_ser/r485.pdf)</sup>

## References

1. [Causal Inference Using Potential Outcomes: Design, Modeling, Decisions (2004 Fisher Lecture)](https://www.tandfonline.com/doi/abs/10.1198/016214504000001880)
2. [Imbens & Rubin, Causal Inference for Statistics, Social, and Biomedical Sciences, Chapter 1 excerpt (Cambridge University Press)](https://assets.cambridge.org/97805218/85881/excerpt/9780521885881_excerpt.pdf)
3. [Wager, Causal Inference: A Statistical Learning Approach](https://web.stanford.edu/%7Eswager/causal_inf_book.pdf)
4. [Causal inference and effect estimation using observational data (Journal of Epidemiology & Community Health glossary)](https://jech.bmj.com/content/76/11/960)
5. [Frameworks for estimating causal effects in observational settings: comparing confounder adjustment and instrumental variables](https://pmc.ncbi.nlm.nih.gov/articles/PMC10201752/)
6. [Causal Inference in the Social Sciences (Annual Review of Statistics and Its Application)](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-114601)
7. [Hernán & Robins, Causal Inference: What If (book PDF)](https://content.sph.harvard.edu/wwwhsph/sites/1268/2024/04/hernanrobins_WhatIf_26apr24.pdf)
8. [Counterfactuals and Their Applications (Pearl, Mackenzie, Primer chapter 4)](https://bayes.cs.ucla.edu/PRIMER/primer-ch4.pdf)
9. [Causal inference: critical developments, past and future](https://ar5iv.labs.arxiv.org/html/2204.02231)
10. [Little & Rubin (2000), Causal Effects in Clinical and Epidemiological Studies Via Potential Outcomes (Annual Review of Public Health)](https://www.annualreviews.org/content/journals/10.1146/annurev.publhealth.21.1.121)
11. [So Many Choices: A Guide to Selecting Among Methods to Adjust for Observed Confounders (Keele & Grieve, 2025)](https://researchonline.lshtm.ac.uk/id/eprint/4677062/1/Keele-Grieve-2025-So-many-choices-a-guide.pdf)
12. [Imbens/Wooldridge, Cemmap Lecture Notes 1 (June 2009)](https://www.cemmap.ac.uk/wp-content/legacy/resources/imbens_wooldridge/lecture_1.pdf)
13. [Causal inference based on counterfactuals (BMC Medical Research Methodology, 2005)](https://link.springer.com/article/10.1186/1471-2288-5-28)
14. [Statistical Models for Causation: What Inferential Leverage Do They Provide? (Freedman)](https://www.stat.berkeley.edu/~census/oxcauser.pdf)
15. [Institute for Research on Poverty discussion paper (Imbens, DP 1340-08)](https://irp.wisc.edu/publications/dps/pdfs/dp134008.pdf)
16. [Guido W. Imbens, Donald B. Rubin (2015). Causal Inference for Statistics, Social, and Biomedical Sciences. Cambridge University Press eBooks.](https://doi.org/10.1017/cbo9781139025751)
17. [Alexis Diamond, Jasjeet S. Sekhon (2012). Genetic Matching for Estimating Causal Effects: A General Multivariate Matching Method for Achieving Balance in Observational Studies. The Review of Economics and Statistics.](https://doi.org/10.1162/rest_a_00318)
18. [James M. Robins (1999). Association, Causation, And Marginal Structural Models. Synthese.](https://doi.org/10.1023/a:1005285815569)
19. [James M. Robins, Andrea Rotnitzky (1995). Semiparametric Efficiency in Multivariate Regression Models with Missing Data. Journal of the American Statistical Association.](https://doi.org/10.1080/01621459.1995.10476494)
20. [Victor Chernozhukov and colleagues (2017). Double machine learning for treatment and causal parameters. .](https://doi.org/10.1920/wp.cem.2016.4916)
21. [Alberto Abadie (2021). Using Synthetic Controls: Feasibility, Data Requirements, and Methodological Aspects. Journal of Economic Literature.](https://doi.org/10.1257/jel.20191450)
22. [A selective review of panel approaches to construct counterfactuals (Empirical Economics, 2025)](https://link.springer.com/article/10.1007/s00181-025-02738-9)
23. [Estimating Individual Treatment Effect in Observational Data Using Random Forest Methods](https://pmc.ncbi.nlm.nih.gov/articles/PMC5920646/)
24. [Hugh A. Chipman, Edward I. George, Robert E. McCulloch (2010). BART: Bayesian additive regression trees. The Annals of Applied Statistics.](https://doi.org/10.1214/09-aoas285)
25. [Estimating causal effects: considering three alternatives to difference-in-differences estimation](https://researchonline.lshtm.ac.uk/id/eprint/2572267/1/10742_2016_Article_146.PMC4869762.pdf)
26. [STA 640, Causal Inference, Chapter 3.5: Doubly Robust Estimation (Duke)](https://www2.stat.duke.edu/~fl35/teaching/640/Chap3.5_Doubly%20Robust%20Estimation.pdf)
27. [Pearl, Causal inference in statistics: An overview (UCLA technical report R-350 / Statistics Surveys reprint)](https://ftp.cs.ucla.edu/pub/stat_ser/r350-reprint.pdf)
28. [Pearl, Causal and Counterfactual Inference (UCLA technical report R-485)](https://ftp.cs.ucla.edu/pub/stat_ser/r485.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 21, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Statistical inference, estimation, sampling, and testing

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/counterfactual-inference

English original: https://www.edgepedia.org/counterfactual-inference
