# 障碍模型

障碍模型是一种针对含大量零值的计数数据的两部分回归模型：一个成分建模计数是否为零或为正，第二个成分用零截断的分布建模正计数。它为零修正数据而设计——这类数据中零的个数多于或少于泊松等标准计数模型的预期；同样的思路可推广到半连续数据。<sup>[1](https://library-drupal.internal.lib.virginia.edu/data/articles/getting-started-with-hurdle-models)</sup><sup> • </sup><sup>[2](https://onlinelibrary.wiley.com/doi/10.1002/sim.7050)</sup> 该模型是零点处的点质量与截断计数分布（如截断泊松或截断负二项）的两成分混合。<sup>[3](https://link.springer.com/article/10.1186/s40488-021-00121-4)</sup> 其名称来自这样的解释：只有越过一个阈值即“障碍”之后，才会出现正计数；二项概率决定计数为零还是为正，零截断计数模型则决定正值部分。<sup>[4](https://ageconsearch.umn.edu/nanna/record/116071/files/sjart_st0040.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 结构 | 二值零/非零过程，加上针对正值的零截断计数过程<sup>[1](https://library-drupal.internal.lib.virginia.edu/data/articles/getting-started-with-hurdle-models)</sup> |
| 零值 | 所有零值来自单一结构来源，不同于允许两个来源的零膨胀模型<sup>[5](https://search.r-project.org/CRAN/refmans/pscl/html/hurdle.html)</sup> |
| 估计 | 最大似然；两个成分可分别最大化<sup>[6](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup> |
| 软件 | R 中的 `pscl::hurdle()` 和 `countreg`；statsmodels（Python）中的 `HurdleCountModel`；通过 brms/Stan 进行贝叶斯拟合<sup>[6](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup><sup> • </sup><sup>[7](https://www.statsmodels.org/stable/examples/notebooks/generated/count_hurdle.html)</sup> |
| 相对 ZIP/ZINB 的主要优势 | 既能处理零膨胀，也能处理零紧缩<sup>[3](https://link.springer.com/article/10.1186/s40488-021-00121-4)</sup> |
| 典型用途 | 医疗服务利用、生态学、消费者购买、保险理赔、犯罪学<sup>[8](https://arxiv.org/pdf/2411.12086)</sup> |

## 工作原理

该模型将一个在 \( y = 1 \) 处左截断的计数模型 \( f_{\text{count}}(y; x, \beta) \) 与一个在 \( y = 1 \) 处右删失的零障碍模型 \( f_{\text{zero}}(y; z, \gamma) \) 结合起来。当 \( y = 0 \) 时，密度为 \( f_{\text{zero}}(0; z, \gamma) \)；当 \( y > 0 \) 时，密度为 \( (1 - f_{\text{zero}}(0; z, \gamma)) \cdot f_{\text{count}}(y; x, \beta) / (1 - f_{\text{count}}(0; x, \beta)) \)。<sup>[6](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup><sup> • </sup><sup>[9](https://www.zeileis.org/papers/ERCIM-2015.pdf)</sup> 分母 \( 1 - f_{\text{count}}(0; x, \beta) \) 去除了零点处的概率质量，因此计数成分只描述正值；这就是计数部分使用零截断分布的原因。<sup>[6](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup>

等价地，所有零值由一个二值过程生成：\( y_i = 0 \) 的概率为 \( \pi_i \)，\( y_i = 1, 2, 3, \ldots \) 的概率为 \( 1 - \pi_i \)，而正计数服从零截断计数分布。<sup>[10](https://www.tqmp.org/RegularArticles/vol19-1/p001/p001.pdf)</sup> 概率 \( \pi_{+} = 1 - \pi_{0} \) 是越过障碍并产生非零计数的概率；该模型也称为两部分模型。<sup>[11](https://www.kent.ac.uk/smsas/personal/msr/webfiles/zip/ibc_fin.pdf)</sup> 总体均值遵循回归关系 \( \log(\mu_i) = x_{i}\beta + \log(1 - f_{\text{zero}}(0; z_i, \gamma)) - \log(1 - f_{\text{count}}(0; x_i, \beta)) \)，因此障碍成分会平移计数过程的均值。<sup>[6](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup>

## 实现方法

在 R 中，标准工具是 `hurdle()` 函数，最初位于 pscl 包中，现由 countreg 维护。主要参数有 `dist`（计数分布）、`zero.dist`（障碍分布）和 `link`（障碍连接函数）；默认是二项（logit）零过程和泊松计数过程。<sup>[6](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup><sup> • </sup><sup>[1](https://library-drupal.internal.lib.virginia.edu/data/articles/getting-started-with-hurdle-models)</sup> 所有参数均用 `optim` 通过最大似然估计；默认情况下两个成分在两次 `optim` 调用中分别估计，标准误来自数值导出的黑塞矩阵。<sup>[5](https://search.r-project.org/CRAN/refmans/pscl/html/hurdle.html)</sup> fastglm 包提供了更快的实现：两部分因具有独立似然而联合估计，负二项离散度由 C++ 中的内层一维 Brent 最大似然估计。<sup>[12](https://jaredhuling.org/fastglm/reference/fastglm_hurdle.html)</sup>

在 Python 中，statsmodels 提供 `HurdleCountModel`，零模型和计数模型均支持泊松和负二项分布；尚不支持 logit、probit 和 GLM-二项零模型。该模型通过分别拟合零模型和截断计数模型来估计，得到分块对角协方差矩阵；联合估计尚未实现。<sup>[7](https://www.statsmodels.org/stable/examples/notebooks/generated/count_hurdle.html)</sup> 贝叶斯工作流在 brms 中拟合同样的两部分，brms 与 Stan 接口，通过哈密顿蒙特卡洛进行后验计算。<sup>[13](https://arxiv.org/html/2608.09725v1)</sup>

有两种有用的设定检验。在两部分使用相同回归量和计数族的情况下，检验 \( \beta = \gamma \) 可检验究竟是否需要障碍；而泊松-泊松障碍模型在参数相等时嵌套标准泊松模型，从而给出一个针对泊松的简单 Wald 检验。<sup>[6](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup><sup> • </sup><sup>[7](https://www.statsmodels.org/stable/examples/notebooks/generated/count_hurdle.html)</sup>

## 起源

计数数据的障碍模型由约翰·马拉希（John Mullahy）在《某些修正计数数据模型的设定与检验》（"Specification and testing of some modified count data models"，《计量经济学杂志》，1986 年）中提出。<sup>[14](https://doi.org/10.1016/0304-4076%2886%2990002-3)</sup> 计量经济学和统计学文献一致认为，该论文提出了用于计数数据的这一模型。<sup>[6](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup><sup> • </sup><sup>[3](https://link.springer.com/article/10.1186/s40488-021-00121-4)</sup> 该方法与健康经济学中用于连续响应的两部分模型类似，后者将二值的 0/1+ 决策与正值结果的模型结合起来。<sup>[15](https://www.econ.uzh.ch/apps/workingpapers/wp/econwp151.pdf)</sup>

## 变体

计数成分可以是泊松、负二项或几何分布，障碍成分可以是二项分布（使用 logit、probit、cloglog 或 cauchit 连接）或删失计数分布（泊松、负二项或几何）；几何分布是大小参数为 1 的负二项分布。<sup>[5](https://search.r-project.org/CRAN/refmans/pscl/html/hurdle.html)</sup> 二项 logit 障碍与删失几何障碍导致相同的似然函数和系数估计。<sup>[6](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup> 删失负二项零障碍只有在至少一个非常数回归量的真实系数不为零时才可识别。<sup>[5](https://search.r-project.org/CRAN/refmans/pscl/html/hurdle.html)</sup> 存在贝叶斯和分层扩展，包括用于聚类计数的多水平异质障碍模型<sup>[16](https://pmc.ncbi.nlm.nih.gov/articles/PMC9870003/)</sup>以及通过马尔可夫链蒙特卡洛估计的贝叶斯负二项 logit 障碍模型。<sup>[17](https://link.springer.com/article/10.1186/s40537-021-00452-8)</sup> hurdlebb R 包为带结构零的有界离散比例拟合贝叶斯两部分障碍 Beta-二项模型，面向含大量零值和过度离散比例的复杂调查数据。<sup>[18](https://github.com/joonho112/hurdlebb)</sup> 一个较新的变体是 HM Nayem 和 B. M. Golam Kibria（2025 年，《Stats》）的岭-障碍负二项模型，它在截断计数成分上加入 L2 正则化，以同时应对零膨胀、过度离散和多重共线性。<sup>[19](https://doi.org/10.3390/stats8040102)</sup>

## 应用

障碍泊松和障碍负二项模型广泛用于生态与环境科学（物种计数）、经济学（消费者购买）、保险（理赔数据）和犯罪学中的零膨胀数据。<sup>[8](https://arxiv.org/pdf/2411.12086)</sup> 在健康经济学中，已为医疗服务利用开发了动态障碍模型，将是否使用的二值决策与就诊次数的截断计数模型结合起来。<sup>[15](https://www.econ.uzh.ch/apps/workingpapers/wp/econwp151.pdf)</sup> 一个贝叶斯负二项 logit 障碍模型被应用于 2016 年埃塞俄比亚 DHS 的吸烟强度数据，其中 94.2% 的受访者报告每日零支香烟；按 AIC 和 Vuong 检验，零膨胀负二项和负二项 logit 障碍模型拟合最好。<sup>[17](https://link.springer.com/article/10.1186/s40537-021-00452-8)</sup>

## 局限与替代方案

零膨胀模型允许零值来自两个来源——结构零和抽样零，而障碍模型仅通过零点处的点质量加上在零以上截断的分布来解释结构零。<sup>[8](https://arxiv.org/pdf/2411.12086)</sup><sup> • </sup><sup>[5](https://search.r-project.org/CRAN/refmans/pscl/html/hurdle.html)</sup> 当障碍概率超过计数模型产生抽样零的概率时，数据是零膨胀的；低于时则是零紧缩的。<sup>[3](https://link.springer.com/article/10.1186/s40488-021-00121-4)</sup> 这一区别在实践中很重要：零膨胀模型无法处理零紧缩，会为逻辑斯蒂成分返回无穷估计，而障碍模型可以。<sup>[3](https://link.springer.com/article/10.1186/s40488-021-00121-4)</sup> Stan 文档总结了同样的观点：障碍模型更灵活，因为零结果既可紧缩也可膨胀，而且无需显式混合即可直接编程，使用伯努利零部分和在 1 以下截断的泊松。<sup>[20](https://mc-stan.org/docs/2_20/stan-users-guide/zero-inflated-section.html)</sup>

半连续数据的一种替代方案是托比特（Tobit）模型，它将零视为来自单一潜在高斯过程的删失观测。当二值过程使用 probit 连接时，托比特模型是障碍模型的特例。在模拟研究中，障碍模型更灵活、更稳健；当零表示实际不存在而非删失时，托比特估计可能有偏，截距更负、时间效应被夸大、随机截距和残差标准差被夸大。<sup>[13](https://arxiv.org/html/2608.09725v1)</sup> 障碍模型的代价是额外参数，包括单独的固定效应、方差成分和跨成分相关，这增加计算负担，可能需要更大样本，并在零值稀疏时使模型不稳定。<sup>[13](https://arxiv.org/html/2608.09725v1)</sup>

模型选择通常用 AIC（按 \( \mathrm{AIC} = -2\log(L) + 2q \) 计算）和 Vuong 检验，后者在 5% 水平上的统计量临界值为 1.96，用于比较零膨胀与障碍拟合。<sup>[3](https://link.springer.com/article/10.1186/s40488-021-00121-4)</sup>

## References

1. [Getting Started with Hurdle Models, UVA Library](https://library-drupal.internal.lib.virginia.edu/data/articles/getting-started-with-hurdle-models)
2. [Modeling zero-modified count and semicontinuous data in health services research Part 1: background and overview](https://onlinelibrary.wiley.com/doi/10.1002/sim.7050)
3. [A comparison of zero-inflated and hurdle models for modeling zero-inflated count data](https://link.springer.com/article/10.1186/s40488-021-00121-4)
4. [Stata Journal article on hurdle and truncated count models](https://ageconsearch.umn.edu/nanna/record/116071/files/sjart_st0040.pdf)
5. [R documentation: hurdle, Hurdle Models for Count Data Regression (pscl)](https://search.r-project.org/CRAN/refmans/pscl/html/hurdle.html)
6. [Regression Models for Count Data in R (Zeileis, Kleiber, Jackman), pscl vignette](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)
7. [Hurdle and truncated count models, statsmodels documentation](https://www.statsmodels.org/stable/examples/notebooks/generated/count_hurdle.html)
8. [Zero-inflated and hurdle models for count data (arXiv preprint, November 2024)](https://arxiv.org/pdf/2411.12086)
9. [Count Data Regression with Excess Zeros: A Flexible Framework Using the GLM Toolbox (Zeileis, ERCIM-2015)](https://www.zeileis.org/papers/ERCIM-2015.pdf)
10. [Regression models for count data with excess zeros: A comparison using survey data (TQMP)](https://www.tqmp.org/RegularArticles/vol19-1/p001/p001.pdf)
11. [Models for count data with many zeros](https://www.kent.ac.uk/smsas/personal/msr/webfiles/zip/ibc_fin.pdf)
12. [fastglm_hurdle, fastglm R package documentation](https://jaredhuling.org/fastglm/reference/fastglm_hurdle.html)
13. [Comparing Tobit and Two-Part Hurdle Models for Semi-Continuous Longitudinal Data with an Application to Clonal Hematopoiesis](https://arxiv.org/html/2608.09725v1)
14. [Specification and testing of some modified count data models (Journal of Econometrics, 1986)](https://doi.org/10.1016/0304-4076%2886%2990002-3)
15. [A Dynamic Hurdle Model for Zero-Inflated Count Data: With an Application to Health Care Utilization](https://www.econ.uzh.ch/apps/workingpapers/wp/econwp151.pdf)
16. [Addressing overdispersion and zero-inflation for clustered count data via new multilevel heterogenous hurdle models](https://pmc.ncbi.nlm.nih.gov/articles/PMC9870003/)
17. [Bayesian negative binomial logit hurdle and zero-inflated model for characterizing smoking intensity (Journal of Big Data, 2021)](https://link.springer.com/article/10.1186/s40537-021-00452-8)
18. [hurdlebb: Bayesian two-part hurdle Beta-Binomial models (GitHub package)](https://github.com/joonho112/hurdlebb)
19. [HM Nayem, B. M. Golam Kibria (2025). The Ridge-Hurdle Negative Binomial Regression Model: A Novel Solution for Zero-Inflated Counts in the Presence of Multicollinearity. Stats.](https://doi.org/10.3390/stats8040102)
20. [Stan User's Guide: Zero-Inflated and Hurdle Models](https://mc-stan.org/docs/2_20/stan-users-guide/zero-inflated-section.html)

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

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

Copyright 2026 Edgepedia

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

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

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