# 工具变量分析

工具变量（instrumental variables, IV）分析是一种统计方法，通过利用一个变量——即工具——来从观察性数据中估计因果效应，该变量改变暴露，但没有其他通往结局的路径，从而规避未测量的混杂。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup> 该方法在计量经济学中用于处理无法将处理可信地视为随机分配的情境，如今则被用于任何自然发生的变异（如遗传变异）可以替代随机化的场合。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup> 其当代最重要的用途是消除遗漏变量偏倚，正如随机试验免除了对协变量的大量控制一样。<sup>[2](https://econ.lse.ac.uk/staff/spischke/mhe/ex_ch4.pdf)</sup>

**关键事实**

- **IV估计的是什么**：工具-结局关联与工具-暴露关联之比；对于二值工具，这就是Wald估计量。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup>
- **有效性条件**：相关性（工具与暴露相关）、独立性（与结局没有未控制的共同原因）以及排他性限制（工具仅通过暴露影响结局）。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup>
- **点识别**：三个核心假设只能识别边界；通常需要第四个假设（如单调性或恒定效应）才能获得点估计。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup>
- **标准估计量**：两阶段最小二乘法（2SLS）：先将暴露对工具做回归，再将结局对拟合的暴露做回归，使用能校正标准误的软件。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup>
- **工具强度**：第一阶段偏F大于10是传统阈值，但该规则在恰好识别情形下理论支持有限，现代实践更倾向于稳健检验。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup>
- **解释**：在单调性下，线性IV识别的是依从者的平均效应，即局部平均处理效应（LATE）。<sup>[3](https://faculty.wharton.upenn.edu/wp-content/uploads/2014/07/Tutorials_in_Biostatistics_Instrumental_Variable_Methods_for_Causal_Inference.pdf)</sup>
- **主要应用**：经济学（自然实验、教育回报）和孟德尔随机化，后者使用遗传变异作为工具。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup>

## 工作原理

核心思想是一个比值。设 \( z \) 为工具，\( x \) 为内生暴露，\( y \) 为结局。所关注的系数是 \( y \) 对 \( z \) 的总体回归（简约式）与 \( x \) 对 \( z \) 的总体回归（第一阶段）之比，前提是第一阶段非零。<sup>[2](https://econ.lse.ac.uk/staff/spischke/mhe/ex_ch4.pdf)</sup> 工具使暴露发生移动，而暴露的变化则勾勒出对结局的效应。

一个有效的工具必须满足三个条件。第一，相关性：工具与干预相关，形式上 \( \rho_{Z,X} \neq 0 \)。第二，独立性：它与结局没有未控制的共同原因，形式上对于结构误差 \( u \) 有 \( \rho_{Z,u} = 0 \)。第三，排他性限制：工具仅通过干预影响结局。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup><sup> • </sup><sup>[4](https://www.econometrics-with-r.org/12.1-TIVEWASRAASI.html)</sup> 用图形语言来说，有效性是两个独立的主张：从工具到暴露的一条开放路径（可在数据中检验），以及所有其他路径均被阻断（无法仅从观测数据验证，必须用领域理论来辩护）。<sup>[5](https://www.luischanci.com/documents/Econometrics/IV.pdf)</sup> 排他性限制在反事实记号中形式化为：对所有 \( i \)，\( Y_i^{z,d} = Y_i^{z',d} \)：在保持所接受的处理固定为 \( d \) 的情况下，改变工具不改变结局。<sup>[3](https://faculty.wharton.upenn.edu/wp-content/uploads/2014/07/Tutorials_in_Biostatistics_Instrumental_Variable_Methods_for_Causal_Inference.pdf)</sup>

仅凭这三个假设只能识别处理效应的边界，而非点估计；因此大多数研究额外加入第四个点识别假设，如单调性、恒定效应或NOSH（其他假设不会同时被违背）。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup><sup> • </sup><sup>[3](https://faculty.wharton.upenn.edu/wp-content/uploads/2014/07/Tutorials_in_Biostatistics_Instrumental_Variable_Methods_for_Causal_Inference.pdf)</sup> 在二值工具和二值处理下，单调性将受试者分为四个潜在依从类别：从不接受者、始终接受者、违背者与依从者。在LATE假设（独立性、排他性、相关性和单调性）下，线性IV仅识别依从者的平均因果效应，即依从者平均因果效应，也称为局部平均处理效应。<sup>[3](https://faculty.wharton.upenn.edu/wp-content/uploads/2014/07/Tutorials_in_Biostatistics_Instrumental_Variable_Methods_for_Causal_Inference.pdf)</sup><sup> • </sup><sup>[6](https://docs.iza.org/dp18684.pdf)</sup>

## 如何操作

工作流程始于选择并辩护一个工具，因为相关性可检验而排他性不可检验。<sup>[5](https://www.luischanci.com/documents/Econometrics/IV.pdf)</sup> 随后两阶段最小二乘法分两步进行：第一阶段将内生变量对工具做OLS回归，第二阶段将结局对拟合值做OLS回归；拟合暴露上的系数即为2SLS估计量。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup><sup> • </sup><sup>[7](https://cameron.econ.ucdavis.edu/bgpe2013/bgpev2_ivgmm.pdf)</sup> 矩阵形式为，

\[ \hat{\beta}_{2SLS} = (X' P_Z X)^{-1} X' P_Z y, \qquad P_Z = Z (Z'Z)^{-1} Z', \]

在单一工具情形下，这简化为 \( Z \) 与 \( Y \) 的样本协方差与 \( Z \) 与 \( X \) 的样本协方差之比。<sup>[5](https://www.luischanci.com/documents/Econometrics/IV.pdf)</sup><sup> • </sup><sup>[4](https://www.econometrics-with-r.org/12.1-TIVEWASRAASI.html)</sup> 手动运行第二阶段得到的标准误无效，因为它忽略了第一阶段的估计误差；Stata中的ivreg2或R中AER包的ivreg等专用程序会自动计算正确的标准误。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup><sup> • </sup><sup>[4](https://www.econometrics-with-r.org/12.1-TIVEWASRAASI.html)</sup>

当工具数量多于内生回归变量时，可以检验过度识别约束：将2SLS残差对所有外生变量做回归得到的统计量 \( N \times R^2 \) 服从 \( \chi^2 \) 分布（Stata的estat overid），基于GMM的Hansen J检验也起同样作用。<sup>[8](http://agrodep.org/sites/default/files/Chapter2_Instrumental_variables_rev.pdf)</sup><sup> • </sup><sup>[7](https://cameron.econ.ucdavis.edu/bgpe2013/bgpev2_ivgmm.pdf)</sup> Hausman检验正式比较OLS和IV估计，以评估回归变量是否内生。<sup>[9](https://muller.scholars.harvard.edu/sites/g/files/omnuum1856/files/muller/files/muller_winship_morgan_instrumental_variables.pdf)</sup>

工具强度由第一阶段偏F统计量判断，它类似于随机试验中的样本量：传统上认为大于10即足够强，不太可能产生弱工具偏倚，尽管它并不保证有足够的功效。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup> Stock和Yogo（2005）用Cragg-Donald统计量的临界值将其形式化，对于单一内生回归变量，该统计量就是第一阶段F。<sup>[10](https://eprints.whiterose.ac.uk/id/eprint/158225/5/IMM%20How%20to%20use%20IV%20in%20addressing%20endogeneity.pdf)</sup><sup> • </sup><sup>[11](https://www.nber.org/system/files/working_papers/t0284/t0284.pdf)</sup> 当误差存在异方差或聚类时，不应将同方差F与这些临界值比较；应优先使用Montiel Olea和Pflueger（2013）的有效F统计量。<sup>[12](https://www.annualreviews.org/content/journals/10.1146/annurev-economics-092123-111021)</sup> 近期研究认为 \( F > 10 \) 的标准过低，因为当F仅为10时，2SLS检验统计量的功效非常低，且该规则在恰好识别的单一工具情形下没有理论依据。<sup>[13](https://ideas.repec.org/a/eee/econom/v235y2023i2p1625-1653.html)</sup><sup> • </sup><sup>[14](https://www.aeaweb.org/articles?id=10.1257%2Fjep.20251464)</sup>

## 起源

<sup>[15](https://doi.org/10.1257/089533003769204416)</sup><sup> • </sup><sup>[16](https://scholar.harvard.edu/stock/content/history-iv-regression)</sup><sup> • </sup><sup>[17](https://economics.mit.edu/sites/default/files/publications/Instrumental%20Variables%20and%20the%20Search%20for%20Identifi.pdf)</sup> Sewall Wright曾在1925年对玉米和生猪周期的分析中使用过工具变量，但那里所有回归变量都是外生的，因此IV并无必要。<sup>[15](https://doi.org/10.1257/089533003769204416)</sup>

Tinbergen（1930）显然不知道附录B，独立给出了IV估计量的完全信息推导。<sup>[18](https://doi.org/10.1007/bf01318500)</sup> Wright的进展未被后续文献注意到，直到20世纪40年代，工具变量及相关方法才被重新发现并扩展；使一个方程发生移动的变量在后来的工作中被称为工具变量。<sup>[17](https://economics.mit.edu/sites/default/files/publications/Instrumental%20Variables%20and%20the%20Search%20for%20Identifi.pdf)</sup><sup> • </sup><sup>[2](https://econ.lse.ac.uk/staff/spischke/mhe/ex_ch4.pdf)</sup> 现代复兴则通过自然实验设计而来。<sup>[17](https://economics.mit.edu/sites/default/files/publications/Instrumental%20Variables%20and%20the%20Search%20for%20Identifi.pdf)</sup>

## 变体

**Wald估计量**是工具-结局关联与工具-干预关联之比；对于二值工具，它是结局均值之差除以处理均值之差，\( [E(y \mid z=1) - E(y \mid z=0)] / [E(d \mid z=1) - E(d \mid z=0)] \)，一个计算示例给出 \( -0.01 / 0.1 = -0.1 \)。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup><sup> • </sup><sup>[9](https://muller.scholars.harvard.edu/sites/g/files/omnuum1856/files/muller/files/muller_winship_morgan_instrumental_variables.pdf)</sup> 该估计量可追溯至Wald 1940年关于两变量均含误差时拟合直线的论文。<sup>[19](https://doi.org/10.1214/aoms/1177731868)</sup> 在恰好识别情形下，IV估计量为 \( (Z'X)^{-1} Z'y \)；当工具数量多于回归变量时，2SLS或广义矩方法（GMM）将它们组合起来。<sup>[7](https://cameron.econ.ucdavis.edu/bgpe2013/bgpev2_ivgmm.pdf)</sup>

**LIML及相关估计量。** 当存在多个工具且识别较弱时，有限信息最大似然（LIML）估计量在小样本中可能比2SLS更有效；Fuller 1977年对LIML估计量的修正进一步调整了其性质。<sup>[10](https://eprints.whiterose.ac.uk/id/eprint/158225/5/IMM%20How%20to%20use%20IV%20in%20addressing%20endogeneity.pdf)</sup><sup> • </sup><sup>[20](https://doi.org/10.2307/1912683)</sup> 在流行病学实践中，分类还包括两阶段残差纳入（2SRI，或控制函数）估计量、GMM、结构均值模型和双变量概率单位模型，其中GMM和结构均值模型通常更为稳健。<sup>[21](https://www.walshmedicalmedia.com/open-access/instrumental-variable-analysis-in-epidemiologic-studies-an-overview-of-the-estimation-methods-2153-2435-1000353.pdf)</sup>

**两样本与孟德尔随机化估计量。** 两样本IV在一个样本中估计工具-暴露关联，在另一个样本中估计工具-结局关联，当结局罕见或难以测量时可提高功效。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup> 在使用多个遗传变异的孟德尔随机化中，逆方差加权（IVW）估计量组合各变异特异的Wald比值，而当超过半数工具有效时，加权中位数估计量具有一致性。<sup>[22](https://arxiv.org/html/2407.19558v1)</sup> 基于Lasso的选择方法可以容纳部分无效工具。<sup>[23](https://doi.org/10.1080/01621459.2018.1498346)</sup>

## 应用

在经济学中，IV是自然实验设计的基础：Wright最初的供需弹性，以及通过税收驱动的价格变异估计的香烟需求（2SLS弹性为−1.08，第一阶段销售税解释了约47%的价格变异）。<sup>[4](https://www.econometrics-with-r.org/12.1-TIVEWASRAASI.html)</sup><sup> • </sup><sup>[17](https://economics.mit.edu/sites/default/files/publications/Instrumental%20Variables%20and%20the%20Search%20for%20Identifi.pdf)</sup> 孟德尔随机化使用遗传变异作为工具，是IV分析最常见的应用之一，近期有关于无效IV估计量和弱变异偏倚的方法学工作。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)</sup> 政治学也广泛采用了IV；一项复制研究考察了该领域已发表的IV设计。<sup>[24](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/70A232CA0CD55FE8B97E93543CDD6361/S1047198724000020a.pdf/how-much-should-we-trust-instrumental-variable-estimates-in-political-science-practical-advice-based-on-67-replicated-studies.pdf)</sup>

## 局限与替代方案

**弱工具。** 当工具-暴露相关性接近零时，IV估计量可能严重偏倚，t检验无法控制检验水准，置信区间覆盖不足；2SLS在有限样本中偏向OLS，而轻微排他性违背造成的偏倚随工具强度增加而减小，且不随样本量增大而缩小。<sup>[12](https://www.annualreviews.org/content/journals/10.1146/annurev-economics-092123-111021)</sup><sup> • </sup><sup>[5](https://www.luischanci.com/documents/Econometrics/IV.pdf)</sup><sup> • </sup><sup>[9](https://muller.scholars.harvard.edu/sites/g/files/omnuum1856/files/muller/files/muller_winship_morgan_instrumental_variables.pdf)</sup> 弱工具与无效性相互叠加：轻微的排他性违背结合较弱的第一阶段可以产生严重偏倚的估计，而在工具无效时，2SLS的渐近偏倚可能大大超过OLS偏倚。<sup>[22](https://arxiv.org/html/2407.19558v1)</sup><sup> • </sup><sup>[24](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/70A232CA0CD55FE8B97E93543CDD6361/S1047198724000020a.pdf/how-much-should-we-trust-instrumental-variable-estimates-in-political-science-practical-advice-based-on-67-replicated-studies.pdf)</sup> 经验记录令人警醒：在复制的政治学设计中，70项中有68项（97%）的2SLS估计绝对值大于朴素OLS，24项（34%）至少大五倍，这一模式主要归因于弱工具加上排他性失效。<sup>[24](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/70A232CA0CD55FE8B97E93543CDD6361/S1047198724000020a.pdf/how-much-should-we-trust-instrumental-variable-estimates-in-political-science-practical-advice-based-on-67-replicated-studies.pdf)</sup> 2SLS标准误恰恰在估计受OLS偏倚污染最严重之处被人为地缩小，而当F在10到20之间时，OLS往往比2SLS更接近真相。<sup>[12](https://www.annualreviews.org/content/journals/10.1146/annurev-economics-092123-111021)</sup><sup> • </sup><sup>[13](https://ideas.repec.org/a/eee/econom/v235y2023i2p1625-1653.html)</sup>

**有效性检验。** 从Balke-Pearl不等式导出的正式检验可以拒绝工具有效性，但从根本上无法确认它，即使数据无限。<sup>[6](https://docs.iza.org/dp18684.pdf)</sup> 在孟德尔随机化中，多效性——许多遗传标记具有多种生物学功能——使得排他性限制对许多变异不成立。<sup>[22](https://arxiv.org/html/2407.19558v1)</sup> 当过度识别检验否证基线模型时，通过运行L个不同的2SLS回归计算出的证伪自适应集报告了与部分工具无效相容的估计范围。<sup>[25](https://econ.la.psu.edu/wp-content/uploads/sites/5/2023/05/AlexandrePoirier.pdf)</sup>

**推断与替代方案。** Anderson-Rubin检验于1949年提出，在任意弱工具下仍然有效，即使工具很强也应使用它代替t检验；Lee、McCrary、Moreira和Porter（2022）的tF程序在恰好识别情形下无论工具强度如何都能给出有效的t比率置信区间。<sup>[26](https://doi.org/10.1214/aoms/1177730090)</sup><sup> • </sup><sup>[12](https://www.annualreviews.org/content/journals/10.1146/annurev-economics-092123-111021)</sup><sup> • </sup><sup>[27](https://doi.org/10.1257/aer.20211063)</sup><sup> • </sup><sup>[14](https://www.aeaweb.org/articles?id=10.1257%2Fjep.20251464)</sup>

## References

1. [Reading and conducting instrumental variable studies: guide, glossary, and checklist (BMJ, 2024)](https://pmc.ncbi.nlm.nih.gov/articles/PMC11472180/)
2. [Instrumental Variables in Action (Mostly Harmless Econometrics, Ch. 4, Angrist & Pischke)](https://econ.lse.ac.uk/staff/spischke/mhe/ex_ch4.pdf)
3. [Tutorial in Biostatistics: Instrumental Variable Methods for Causal Inference (Statistics in Medicine)](https://faculty.wharton.upenn.edu/wp-content/uploads/2014/07/Tutorials_in_Biostatistics_Instrumental_Variable_Methods_for_Causal_Inference.pdf)
4. [Introduction to Econometrics with R, 12.1: The IV Estimator with a Single Regressor and a Single Instrument](https://www.econometrics-with-r.org/12.1-TIVEWASRAASI.html)
5. [Instrumental Variables lecture notes (Chanci)](https://www.luischanci.com/documents/Econometrics/IV.pdf)
6. [A Practical Guide to Instrumental Variables Methods with Heterogeneous Treatment Effects (IZA DP 18684)](https://docs.iza.org/dp18684.pdf)
7. [IV, 2SLS and GMM (Cameron, BGPE course notes)](https://cameron.econ.ucdavis.edu/bgpe2013/bgpev2_ivgmm.pdf)
8. [Instrumental-variables estimation (AGRODEP chapter)](http://agrodep.org/sites/default/files/Chapter2_Instrumental_variables_rev.pdf)
9. [Instrumental Variables (SAGE Handbook of Regression Analysis and Causal Inference chapter)](https://muller.scholars.harvard.edu/sites/g/files/omnuum1856/files/muller/files/muller_winship_morgan_instrumental_variables.pdf)
10. [How to use instrumental variables in addressing endogeneity? A step-by-step procedure for non-specialists](https://eprints.whiterose.ac.uk/id/eprint/158225/5/IMM%20How%20to%20use%20IV%20in%20addressing%20endogeneity.pdf)
11. [Testing for Weak Instruments in Linear IV Regression (Stock & Yogo, NBER Technical Working Paper 0284)](https://www.nber.org/system/files/working_papers/t0284/t0284.pdf)
12. [Weak Instruments in Instrumental Variables Regression: Theory and Practice (Annual Review of Economics; Andrews, Stock & Sun; NBER-version excerpts merged from author copy)](https://www.annualreviews.org/content/journals/10.1146/annurev-economics-092123-111021)
13. [Instrument strength in IV estimation and inference: A guide to theory and practice (Keane & Neal, Journal of Econometrics, 2023)](https://ideas.repec.org/a/eee/econom/v235y2023i2p1625-1653.html)
14. [Correct (and Incorrect) Inference with a Single Instrumental Variable (Journal of Economic Perspectives, 2026)](https://www.aeaweb.org/articles?id=10.1257%2Fjep.20251464)
15. [James H Stock, Francesco Trebbi (2003). Retrospectives: Who Invented Instrumental Variable Regression?. The Journal of Economic Perspectives.](https://doi.org/10.1257/089533003769204416)
16. [The History of IV Regression (James Stock, Harvard)](https://scholar.harvard.edu/stock/content/history-iv-regression)
17. [Instrumental Variables and the Search for Identification: From Supply and Demand to Natural Experiments (Angrist & Krueger, 2001)](https://economics.mit.edu/sites/default/files/publications/Instrumental%20Variables%20and%20the%20Search%20for%20Identifi.pdf)
18. [J. Tinbergen (1930). Bestimmung und Deutung von Angebotskurven Ein Beispiel. Zeitschrift für Nationalökonomie.](https://doi.org/10.1007/bf01318500)
19. [Abraham Wald (1940). The Fitting of Straight Lines if Both Variables are Subject to Error. The Annals of Mathematical Statistics.](https://doi.org/10.1214/aoms/1177731868)
20. [Wayne A. Fuller (1977). Some Properties of a Modification of the Limited Information Estimator. Econometrica.](https://doi.org/10.2307/1912683)
21. [Instrumental Variable Analysis in Epidemiologic Studies: An Overview of the Estimation Methods](https://www.walshmedicalmedia.com/open-access/instrumental-variable-analysis-in-epidemiologic-studies-an-overview-of-the-estimation-methods-2153-2435-1000353.pdf)
22. [Identification and Inference with Invalid Instruments (Kang et al. review, 2024)](https://arxiv.org/html/2407.19558v1)
23. [Frank Windmeijer and colleagues (2018). On the Use of the Lasso for Instrumental Variables Estimation with Some Invalid Instruments. Journal of the American Statistical Association.](https://doi.org/10.1080/01621459.2018.1498346)
24. [How Much Should We Trust Instrumental Variable Estimates in Political Science? Practical Advice Based on 67 Replicated Studies](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/70A232CA0CD55FE8B97E93543CDD6361/S1047198724000020a.pdf/how-much-should-we-trust-instrumental-variable-estimates-in-political-science-practical-advice-based-on-67-replicated-studies.pdf)
25. [Salvaging Falsified Instrumental Variable Models (Masten & Poirier)](https://econ.la.psu.edu/wp-content/uploads/sites/5/2023/05/AlexandrePoirier.pdf)
26. [T. W. Anderson, Herman Rubin (1949). Estimation of the Parameters of a Single Equation in a Complete System of Stochastic Equations. The Annals of Mathematical Statistics.](https://doi.org/10.1214/aoms/1177730090)
27. [David S. Lee and colleagues (2022). Valid t-ratio Inference for IV. American Economic Review.](https://doi.org/10.1257/aer.20211063)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 21, 2026; Oct 25, 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/instrumental-variables-analysis

English original: https://www.edgepedia.org/instrumental-variables-analysis
