# 分层分析（统计学）

分层分析通过将数据拆分为混杂因素水平相同的亚组，在各亚组内估计暴露–结局关联，再合并或比较这些估计值，从而控制混杂。它有三个用途：控制混杂、评价效应测量修饰，以及检查关键变量的分布，以核查其有效性并发现处理错误。<sup>[1](http://minato.sip21c.org/epispecial/Chap9.pdf)</sup> 将研究人群划分为具有混杂因素同一水平的层，在各层内进行估计，再跨层合并估计，以获得不受分层变量混杂影响的总体效应。<sup>[2](https://med.libretexts.org/Bookshelves/Nursing/Field_Trials_of_Health_Interventions_-_A_Toolbox_%28Smith_Morrow_and_Ross%29/21%3A_Methods_of_analysis/21.07%3A_Controlling_for_Confounding_Variables)</sup>

| 关键事实 | 细节 |
|---|---|
| 输出 | 各层的估计值以及一个合并（校正）估计值<sup>[2](https://med.libretexts.org/Bookshelves/Nursing/Field_Trials_of_Health_Interventions_-_A_Toolbox_%28Smith_Morrow_and_Ross%29/21%3A_Methods_of_analysis/21.07%3A_Controlling_for_Confounding_Variables)</sup><sup> • </sup><sup>[3](https://jhanley.biostat.mcgill.ca/c634/stratified/R1986_12Stratified%20Analysis.pdf)</sup> |
| 核心合并估计量 | 曼特尔–亨塞尔（Mantel–Haenszel）比值比，即各层求和之比：\( \sum A_{i} \cdot D_{i} / T_{i} \) 除以 \( \sum B_{i} \cdot C_{i} / T_{i} \)<sup>[4](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0058327)</sup> |
| 显著性检验 | 自由度为1的科克伦–曼特尔–亨塞尔（Cochran–Mantel–Haenszel）卡方检验<sup>[2](https://med.libretexts.org/Bookshelves/Nursing/Field_Trials_of_Health_Interventions_-_A_Toolbox_%28Smith_Morrow_and_Ross%29/21%3A_Methods_of_analysis/21.07%3A_Controlling_for_Confounding_Variables)</sup> |
| 合并假设 | 效应在各层间恒定；若存在异质性，则不能合并，但仍可标准化<sup>[1](http://minato.sip21c.org/epispecial/Chap9.pdf)</sup> |
| 稀疏数据容忍度 | 每层可少至两名受试者，前提是没有任何边际合计为零<sup>[3](https://jhanley.biostat.mcgill.ca/c634/stratified/R1986_12Stratified%20Analysis.pdf)</sup> |
| 规模限制 | 十个二分类混杂因素产生 \( 2^{10} = 1{,}024 \) 层，其中一些层数据很少或没有数据<sup>[5](https://www.dovepress.com/control-of-confounding-in-the-analysis-phase-ndash-an-overview-for-cli-peer-reviewed-fulltext-article-CLEP)</sup> |

## 工作原理

以同质层为条件可阻断混杂，因为混杂因素无法在一层内变化。随后合并时，随机变异较小的层别估计值获得更大权重，从而得到总体无混杂的效应估计。<sup>[3](https://jhanley.biostat.mcgill.ca/c634/stratified/R1986_12Stratified%20Analysis.pdf)</sup> 曼特尔–亨塞尔权重与零假设下对数比值比的方差成反比，使合并估计量在层别比值比接近1.0时具有最优加权。<sup>[3](https://jhanley.biostat.mcgill.ca/c634/stratified/R1986_12Stratified%20Analysis.pdf)</sup>

使合并有效的假设是各层存在共同效应。当共同效应假设被违反时，已发表研究在解释上存在分歧：一项分析表明，MH估计量收敛于层别效应参数的加权平均，可理解为直观的标准化汇总；<sup>[6](https://www.degruyterbrill.com/document/doi/10.1515/em-2015-0004/html?lang=en)</sup> 而格林兰表明，在异质性下，MH比值比的渐近期望会随抽样设计中无关特征而变化。<sup>[7](https://onlinelibrary.wiley.com/doi/10.1002/sim.4780010304)</sup>

## 实施方法

标准做法为五步流程：（1）计算粗风险比或比值比；（2）按混杂因素分层并计算层别估计值；（3）评估同质性；（4）若同质，则用曼特尔–亨塞尔公式合并；（5）若异质，则报告层别估计值。<sup>[8](https://www.researchgate.net/publication/45389242_Stratification_for_Confounding_-_Part_1_The_Mantel-Haenszel_Formula)</sup> 流行病学家通常将粗估计与校正估计相差超过10%视为存在有意义的混杂。<sup>[8](https://www.researchgate.net/publication/45389242_Stratification_for_Confounding_-_Part_1_The_Mantel-Haenszel_Formula)</sup>

同质性检验使用伍尔夫检验，该检验将各层各自的比值比与MH比值比比较，采用自由度为（层数−1）的卡方检验；或使用布雷斯洛–戴–塔罗内检验，该检验将观察到的单元格计数与比值比等于MH估计值的拟合计数进行比较。<sup>[9](http://people.umass.edu/biep640w/pdf/4.%20%20Categorical%20Data%20Analysis%20Fall%202024.pdf)</sup> 对于MH比值比，罗宾斯–布雷斯洛–格林兰（Robins–Breslow–Greenland，RBG）方差估计量是首选估计量，因为它在层数少的大样本情形和层数多的稀疏层情形下均一致，在后一情形下它与条件最大似然方差重合。<sup>[10](https://europepmc.org/articles/PMC1270683)</sup> 报告决策规则：若存在交互作用，报告层别估计值；若不存在交互作用但存在混杂，报告汇总校正估计值；若两者均不存在，报告粗估计值。<sup>[11](https://www.sjsu.edu/faculty/gerstman/EpiInfo/stratified.htm)</sup>

## 起源

直接前身是杰罗姆·康菲尔德（Jerome Cornfield）1951年关于从临床数据估计比较率的论文，该文展示了同质单层情形。<sup>[12](https://doi.org/10.1093/jnci/11.6.1269)</sup> 威廉·G·科克伦（William G. Cochran）在《加强常用χ²检验的若干方法》（Biometrics，1954）中提出了基础检验统计量。<sup>[13](https://doi.org/10.2307/3001616)</sup> 内森·曼特尔（Nathan Mantel）与威廉·亨塞尔（William Haenszel）在1959年《JNCI》论文中修改了科克伦的统计量，通过条件置换方差和连续性校正，将其良好性质推广到层规模很小的多层情形。<sup>[14](https://pub.math.leidenuniv.nl/~gillrd/mantel-haenszel.pdf)</sup><sup> • </sup><sup>[15](https://doi.org/10.1093/jnci/22.4.719)</sup> 曼特尔于1963年将该程序推广到自由度为1的卡方检验。<sup>[16](https://doi.org/10.1080/01621459.1963.10500879)</sup> 随后是方差方面的工作：豪克（Hauck）于1979年推导出MH估计量的大样本方差，<sup>[17](https://doi.org/10.2307/2530114)</sup> 布雷斯洛（Breslow）于1981年分析了数据稀疏时的比值比估计量，<sup>[18](https://doi.org/10.1093/biomet/68.1.73)</sup> 格林兰与罗宾斯于1985年给出稀疏数据一致的MH风险比和风险差估计量，<sup>[19](https://doi.org/10.2307/2530643)</sup> 罗宾斯、布雷斯洛与格林兰于1986年提出双重一致的RBG方差估计量。<sup>[20](https://doi.org/10.2307/2531052)</sup>

## 变体

科克伦–曼特尔–亨塞尔检验这一名称涵盖两种检验：科克伦检验使用固定组样本量下的无条件方差，而曼特尔–亨塞尔检验使用将行边际与列边际均视为固定的条件方差；渐近上两种方差等价。<sup>[21](https://www.ncss.com/wp-content/themes/ncss/pdf/Procedures/PASS/Tests_for_Two_Proportions_in_a_Stratified_Design-Cochran-Mantel-Haenszel_Test.pdf)</sup> MH风险差是层别风险差 \(\hat{\delta}_k = n_{11k}/n_{.1k} - n_{10k}/n_{.0k}\) 的加权平均，佐藤方差估计量现为SAS默认。<sup>[22](https://arxiv.org/html/2408.12541v1)</sup> 当每个失效时间对应一层时，CMH统计量变为对数秩检验。<sup>[14](https://pub.math.leidenuniv.nl/~gillrd/mantel-haenszel.pdf)</sup> 一项2024年分析表明，在超总体框架下，即使没有共同风险差假设，MH风险差估计量在随机试验中仍能一致地估计平均处理效应，且在大层与稀疏层渐近下均成立。<sup>[22](https://arxiv.org/html/2408.12541v1)</sup> 在观察性研究方面，一种2026年的核平滑估计量消除了倾向评分分层估计量的残余混杂，同时保留其稳健性，并具有双重稳健变体。<sup>[23](https://doi.org/10.1177/09622802261432998)</sup> 主分层由弗兰加基斯与鲁宾于2002年提出，<sup>[24](https://doi.org/10.1111/j.0006-341x.2002.00021.x)</sup> 2025年一个半参数框架对其进行了扩展，该框架使用不要求单调性的比值比敏感性参数。<sup>[25](https://arxiv.org/pdf/2501.17514)</sup>

## 应用

曼特尔–亨塞尔公式将层别效应估计合并为总体校正估计；MH风险比用于识别风险的设计，如队列研究，而MH比值比常用于病例对照研究。<sup>[8](https://www.researchgate.net/publication/45389242_Stratification_for_Confounding_-_Part_1_The_Mantel-Haenszel_Formula)</sup> 在随机试验中，分层随机化要求进行分层分析：在标准误计算中忽略分层会使标准误向上偏倚，导致置信区间过宽、I类错误过低和检验效能降低。<sup>[26](https://link.springer.com/article/10.1186/s12874-025-02670-7)</sup> 在试验中，层数应保持较少，通常为二到八层，并由预后价值决定。<sup>[27](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/Stratified-Cox-model-SIM-2012-.pdf)</sup> 分层分析与荟萃分析密切相关：罗斯曼及其同事将风险差、风险比、率比和比值比的MH合并呈现为荟萃分析式合并，<sup>[28](https://www.metafor-project.org/doku.php/analyses:rothman2008)</sup> 分子关联荟萃分析按吸烟或用药等特征分层，并依据I²统计量在各层内选择固定效应（MH）或随机效应（德西蒙尼安–莱尔德）模型。<sup>[29](https://www.springermedizin.de/advanced-stratification-analyses-in-molecular-association-meta-a/18061616)</sup>

## 局限与替代方法

混杂是需要消除的偏倚，而效应修饰是需要报告的发现；当存在交互作用时，仍应酌情控制混杂因素，但不应将修饰因素本身当作混杂因素处理，效应应按层报告，或采用另一种明确定义的汇总方式报告，因为单一的合并指标会掩盖效应修饰，而交互作用依赖于尺度。<sup>[3](https://jhanley.biostat.mcgill.ca/c634/stratified/R1986_12Stratified%20Analysis.pdf)</sup><sup> • </sup><sup>[11](https://www.sjsu.edu/faculty/gerstman/EpiInfo/stratified.htm)</sup> 当存在一个以上混杂因素时，该方法变得繁琐且需要大样本，而将连续混杂因素分类会产生残余混杂。<sup>[8](https://www.researchgate.net/publication/45389242_Stratification_for_Confounding_-_Part_1_The_Mantel-Haenszel_Formula)</sup> 经典MH方法仅适用于具有有限数量离散层的混杂因素，限制了其在连续或高维混杂因素分析中的应用。<sup>[4](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0058327)</sup> 与回归相比，MH方法在暴露与结局上是对称的，而逻辑回归不是；多变量模型可一次校正多个混杂因素，克服了分层的主要局限，不过对非线性混杂因素效应进行线性建模会产生残余混杂。<sup>[4](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0058327)</sup><sup> • </sup><sup>[5](https://www.dovepress.com/control-of-confounding-in-the-analysis-phase-ndash-an-overview-for-cli-peer-reviewed-fulltext-article-CLEP)</sup> 倾向评分方法提供两种与分层相近的替代方法：按估计倾向评分的分位数进行子分类，以及逆概率加权。<sup>[30](https://doi.org/10.1002/sim.1903)</sup> 所有分析阶段方法，包括分层，都依赖于不存在未知、未测量或残余混杂这一假设。<sup>[5](https://www.dovepress.com/control-of-confounding-in-the-analysis-phase-ndash-an-overview-for-cli-peer-reviewed-fulltext-article-CLEP)</sup> 美国统计协会肿瘤学估计目标（即统计分析旨在估计的特定量）工作组（2025）澄清，分层分析可针对条件估计目标或边际估计目标；对于二分类终点，只有风险差具有明确定义的估计目标，即层别风险差的平均；CMH风险比和比值比针对条件估计目标，尽管曼特尔–亨塞尔比值比是层别效应的加权平均。<sup>[26](https://link.springer.com/article/10.1186/s12874-025-02670-7)</sup><sup> • </sup><sup>[32](https://pmc.ncbi.nlm.nih.gov/articles/PMC9005055/)</sup><sup> • </sup><sup>[33](https://www.cambridge.org/core/books/abs/essential-epidemiology/mantelhaenszel-method-for-calculating-pooled-odds-ratios/BD57FBDB97391ACE21F6FAD6CDD1820E)</sup> 一项2026年模拟研究发现，在大样本条件下，分层回归能很好地控制I类错误，而当组间基线系数不同且协变量相关时，交互作用回归则不能；该研究建议不要将分层估计与交互作用检验进行混合报告。<sup>[31](https://link.springer.com/article/10.1186/s12874-026-02795-3)</sup>

## References

1. [Chapter 9. Stratified Analysis (epidemiology textbook chapter, Minato Nakazawa)](http://minato.sip21c.org/epispecial/Chap9.pdf)
2. [21.07: Controlling for Confounding Variables (med.libretexts.org)](https://med.libretexts.org/Bookshelves/Nursing/Field_Trials_of_Health_Interventions_-_A_Toolbox_%28Smith_Morrow_and_Ross%29/21%3A_Methods_of_analysis/21.07%3A_Controlling_for_Confounding_Variables)
3. [Modern Epidemiology, Chapter 12: Stratified Analysis (Rothman 1986)](https://jhanley.biostat.mcgill.ca/c634/stratified/R1986_12Stratified%20Analysis.pdf)
4. [The Mantel-Haenszel Procedure Revisited: Models and Generalizations (PLOS ONE, 2013)](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0058327)
5. [Control of confounding in the analysis phase - an overview for clinicians (Clinical Epidemiology)](https://www.dovepress.com/control-of-confounding-in-the-analysis-phase-ndash-an-overview-for-cli-peer-reviewed-fulltext-article-CLEP)
6. [A Note on the Mantel-Haenszel Estimators When the Common Effect Assumption Is Violated (Epidemiologic Methods)](https://www.degruyterbrill.com/document/doi/10.1515/em-2015-0004/html?lang=en)
7. [Interpretation and estimation of summary ratios under heterogeneity (Greenland, Statistics in Medicine 1982)](https://onlinelibrary.wiley.com/doi/10.1002/sim.4780010304)
8. [Stratification for Confounding, Part 1: The Mantel-Haenszel Formula (peer-reviewed tutorial; publisher copy not retrieved)](https://www.researchgate.net/publication/45389242_Stratification_for_Confounding_-_Part_1_The_Mantel-Haenszel_Formula)
9. [Categorical Data Analysis, Fall 2024 (UMass BIEP640W course notes)](http://people.umass.edu/biep640w/pdf/4.%20%20Categorical%20Data%20Analysis%20Fall%202024.pdf)
10. [An easy approach to the Robins-Breslow-Greenland variance estimator](https://europepmc.org/articles/PMC1270683)
11. [Data Analysis with Epi Info, Stratified Analysis (Gerstman, SJSU)](https://www.sjsu.edu/faculty/gerstman/EpiInfo/stratified.htm)
12. [J CORNFIELD (1951). A Method of Estimating Comparative Rates from Clinical Data. Applications to Cancer of the Lung, Breast, and Cervix. JNCI Journal of the National Cancer Institute.](https://doi.org/10.1093/jnci/11.6.1269)
13. [William G. Cochran (1954). Some Methods for Strengthening the Common χ 2 Tests. Biometrics.](https://doi.org/10.2307/3001616)
14. [The Cochran-Mantel-Haenszel test and the Lucia de Berk case (Richard D. Gill)](https://pub.math.leidenuniv.nl/~gillrd/mantel-haenszel.pdf)
15. [Nathan Mantel, William Haenszel (1959). Statistical Aspects of the Analysis of Data From Retrospective Studies of Disease. JNCI Journal of the National Cancer Institute.](https://doi.org/10.1093/jnci/22.4.719)
16. [Nathan Mantel (1963). Chi-Square Tests with One Degree of Freedom; Extensions of the Mantel-Haenszel Procedure. Journal of the American Statistical Association.](https://doi.org/10.1080/01621459.1963.10500879)
17. [Walter W. Hauck (1979). The Large Sample Variance of the Mantel-Haenszel Estimator of a Common Odds Ratio. Biometrics.](https://doi.org/10.2307/2530114)
18. [NORMAN BRESLOW (1981). Odds ratio estimators when the data are sparse. Biometrika.](https://doi.org/10.1093/biomet/68.1.73)
19. [Sander Greenland, James M. Robins (1985). Estimation of a Common Effect Parameter from Sparse Follow-Up Data. Biometrics.](https://doi.org/10.2307/2530643)
20. [James Robins, Norman Breslow, Sander Greenland (1986). Estimators of the Mantel-Haenszel Variance Consistent in Both Sparse Data and Large-Strata Limiting Models. Biometrics.](https://doi.org/10.2307/2531052)
21. [Tests for Two Proportions in a Stratified Design (Cochran-Mantel-Haenszel Test), PASS/NCSS documentation](https://www.ncss.com/wp-content/themes/ncss/pdf/Procedures/PASS/Tests_for_Two_Proportions_in_a_Stratified_Design-Cochran-Mantel-Haenszel_Test.pdf)
22. [Clarifying the Role of the Mantel-Haenszel Risk Difference Estimator in Randomized Clinical Trials (2024)](https://arxiv.org/html/2408.12541v1)
23. [Eliminating residual confounding in the stratified estimator via smoothing along with the propensity score (Statistical Methods in Medical Research, 2026)](https://doi.org/10.1177/09622802261432998)
24. [Constantine E. Frangakis, Donald B. Rubin (2002). Principal Stratification in Causal Inference. Biometrics.](https://doi.org/10.1111/j.0006-341x.2002.00021.x)
25. [Semiparametric principal stratification analysis beyond monotonicity (2025 preprint)](https://arxiv.org/pdf/2501.17514)
26. [Current practice on covariate adjustment and stratified analysis, ASA oncology estimand working group (BMC Medical Research Methodology, 2025)](https://link.springer.com/article/10.1186/s12874-025-02670-7)
27. [An efficient alternative to the stratified Cox model analysis (Mehrotra et al., 2012)](https://med.stanford.edu/content/dam/sm/dbds/documents/biostats-workshop/Stratified-Cox-model-SIM-2012-.pdf)
28. [Rothman et al. (2008) chapter 15 replicated with the metafor package](https://www.metafor-project.org/doku.php/analyses:rothman2008)
29. [Advanced stratification analyses in molecular association meta-analysis: methodology and application](https://www.springermedizin.de/advanced-stratification-analyses-in-molecular-association-meta-a/18061616)
30. [Jared K. Lunceford, Marie Davidian (2004). Stratification and weighting via the propensity score in estimation of causal treatment effects: a comparative study. Statistics in Medicine.](https://doi.org/10.1002/sim.1903)
31. [Common reporting errors in subgroup analysis: a comparison of interaction and stratified regression models (BMC Medical Research Methodology, 2026)](https://link.springer.com/article/10.1186/s12874-026-02795-3)
32. [pmc.ncbi.nlm.nih.gov](https://pmc.ncbi.nlm.nih.gov/articles/PMC9005055/)
33. [The Mantel-Haenszel method for calculating pooled odds ratios (Appendix 6) - Essential Epidemiology](https://www.cambridge.org/core/books/abs/essential-epidemiology/mantelhaenszel-method-for-calculating-pooled-odds-ratios/BD57FBDB97391ACE21F6FAD6CDD1820E)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Oct 15, 2026 · Last review: Sep 30, 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/stratified-analysis-statistics

English original: https://www.edgepedia.org/stratified-analysis-statistics
