# 零膨胀模型

零膨胀模型是一种用于计数数据的双分量混合模型，它将一个代表只能取零的观测值的零点质量，与一个同样可能偶然产生零的标准计数分布（如泊松分布或负二项分布）结合在一起<sup>[1](https://www.stat.cmu.edu/technometrics/90-00/vol-34-01/v3401001.pdf)</sup><sup> • </sup><sup>[2](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup>。Lambert于1992年在Mullahy早期工作的基础上将其引入计数回归，它是处理零值多于普通计数模型所预测数量的计数数据的工具之一<sup>[1](https://www.stat.cmu.edu/technometrics/90-00/vol-34-01/v3401001.pdf)</sup><sup> • </sup><sup>[2](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup>。

| 关键事实 | 详情 |
|---|---|
| 混合结构 | 以概率p，唯一可能的观测值为0；以概率1 − p，观测到一个泊松(λ)（或负二项）变量<sup>[1](https://www.stat.cmu.edu/technometrics/90-00/vol-34-01/v3401001.pdf)</sup> |
| 两组系数块 | p（“完美零”状态）和λ均可依赖于协变量，因此模型报告一个针对零状态的logit/probit块和一个单独的计数块<sup>[1](https://www.stat.cmu.edu/technometrics/90-00/vol-34-01/v3401001.pdf)</sup> |
| ZIP与ZINB | ZINB在计数分量上增加一个离散参数以处理过度离散（方差大于均值）<sup>[3](https://link.springer.com/article/10.3758/s13428-026-03036-7)</sup> |
| 估计 | 通过EM算法或直接梯度方法进行最大似然估计；R的pscl包使用optim，以EM算法或glm.fit得到的结果作为起始值，并基于Hessian矩阵计算标准误<sup>[1](https://www.stat.cmu.edu/technometrics/90-00/vol-34-01/v3401001.pdf)</sup><sup> • </sup><sup>[4](https://search.r-project.org/CRAN/refmans/pscl/html/zeroinfl.html)</sup> |
| Vuong检验的地位 | 未校正的Vuong检验偏向零膨胀模型，在ZIP与泊松模型的比较中不再被认为有效<sup>[5](https://stats.oarc.ucla.edu/r/dae/zip/)</sup><sup> • </sup><sup>[6](https://ideas.repec.org/a/tsj/stataj/v13y2013i4p810-835.html)</sup> |
| 模拟研究的警示 | 即使数据是从零膨胀分布模拟生成的，AIC仍更支持普通负二项模型，且处理系数的偏倚在不同零膨胀率之间差异甚微<sup>[7](https://trialsjournal.biomedcentral.com/articles/10.1186/s13063-023-07648-8)</sup> |
| 典型数据 | 2019年马来西亚全国健康与发病率调查中，90%的成年人报告零次门诊就诊<sup>[8](https://link.springer.com/article/10.1186/s12874-022-01733-3)</sup> |

## 超额零值与它们的来源

“超额零值”是指零计数的数量多于拟合的计数模型所预测的数量。这一概念是相对于某个模型而言的，并非数据本身的固有属性：负二项分布的尾部比泊松分布更重，通常能吸收大部分表观超额零值（Warton 2005）<sup>[9](https://tidyecology.com/posts/zero-inflated-count-models/)</sup>。零值本身分为两类。结构零出现在某观测值在该时间范围内根本不可能出现非零计数的情况下，例如某受试者不存在所关注行为的风险；随机（抽样）零则出现在本可以观测到非零计数但因抽样变异而未能观测到时<sup>[10](https://pmc.ncbi.nlm.nih.gov/articles/PMC11807933/)</sup><sup> • </sup><sup>[11](https://pmc.ncbi.nlm.nih.gov/articles/PMC4194007/)</sup>。Blasco-Moreno及其同事细化了这一分类，增加了虚假零，这类零源于观察者或设计错误<sup>[9](https://tidyecology.com/posts/zero-inflated-count-models/)</sup>。

检测通常在拟合候选模型之后进行。R的performance包中的check_zeroinflation()函数比较观测到的零频率与预测的零频率；比值接近1表明模型对零值拟合良好，而观测零值超过预测零值则意味着模型对零值拟合不足，表明存在零膨胀<sup>[10](https://pmc.ncbi.nlm.nih.gov/articles/PMC11807933/)</sup><sup> • </sup><sup>[12](https://github.com/easystats/performance/blob/master/man/check_zeroinflation.Rd)</sup>。悬挂根ogram图，通过topmodels包中的rootogram()函数绘制，以图形方式评估计数模型的拟合；在一篇应用教程中，泊松模型对零值拟合不足，而负二项模型拟合得好得多<sup>[10](https://pmc.ncbi.nlm.nih.gov/articles/PMC11807933/)</sup>。

忽视零膨胀的实际代价已被量化：在存在零膨胀的情况下，泊松模型未能控制第一类错误率，产生了比预期更多的假阳性<sup>[13](https://ar5iv.labs.arxiv.org/html/2301.12674)</sup>。

## 模型结构与解释

零膨胀泊松（ZIP）模型假设以概率p唯一可能的观测值为0，以概率1 − p观测到一个泊松(λ)随机变量<sup>[1](https://www.stat.cmu.edu/technometrics/90-00/vol-34-01/v3401001.pdf)</sup>。p和λ均可依赖于协变量<sup>[1](https://www.stat.cmu.edu/technometrics/90-00/vol-34-01/v3401001.pdf)</sup>。在pscl的表述中，均值方程为

\[ \mu_i = \pi_i \cdot 0 + (1 - \pi_i) \cdot \exp(x_i^{\top} \beta), \]

其中\( \pi_i = f_{\mathrm{zero}}(0; z_i, \gamma) \)是零状态的拟合概率，用二值logit或probit建模，可包含自身的回归变量<sup>[2](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup>。零膨胀负二项（ZINB）是相同的构造，只是计数分量换为负二项分布，增加了一个离散参数，使其在方差超过均值时更为灵活<sup>[3](https://link.springer.com/article/10.3758/s13428-026-03036-7)</sup>。

**解读系数。** 两个块回答不同的问题。在零膨胀模型中，零分量系数描述协变量与始终为零状态概率的关联，而在栅栏模型中，它们描述协变量与非零计数概率的关联<sup>[10](https://pmc.ncbi.nlm.nih.gov/articles/PMC11807933/)</sup>。由于零和计数两半描述的是相反的事件，它们可能带有相反的符号，因此系数应按其目标而非符号来解读<sup>[9](https://tidyecology.com/posts/zero-inflated-count-models/)</sup>。在大多数应用中，协变量对均值的影响是主要目标，而对超额零值本身的建模是次要的<sup>[14](https://onlinelibrary.wiley.com/doi/10.1111/insr.12479)</sup>。

边际化零膨胀模型（mZIP、mZINB）直接解决了这一解释负担：它们对总体平均计数建模，使解释类似于经零膨胀校正的标准[泊松回归](https://www.edgepedia.org/zh/poisson-regression)<sup>[3](https://link.springer.com/article/10.3758/s13428-026-03036-7)</sup>。

## 估计与软件

ZIP回归通过最大似然估计拟合。Lambert提出了EM算法，最大似然估计在大样本下近似服从正态分布；模拟研究表明，基于似然比检验的置信区间比基于近似正态性的置信区间表现更好<sup>[1](https://www.stat.cmu.edu/technometrics/90-00/vol-34-01/v3401001.pdf)</sup>。Greene在相关的超额零值模型中的经验是，带线搜索的直接梯度方法比EM更高效，且没有出现异常的校准问题<sup>[15](https://archive.nyu.edu/bitstream/2451/26263/2/94-10.pdf)</sup>。

软件覆盖范围广泛：

- **R**：pscl的zeroinfl使用optim通过最大似然估计所有参数，起始值来自EM算法或glm.fit（默认），标准误来自Hessian矩阵；它支持泊松、几何和负二项计数与二项膨胀<sup>[4](https://search.r-project.org/CRAN/refmans/pscl/html/zeroinfl.html)</sup><sup> • </sup><sup>[2](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)</sup>。glmmTMB处理传统的ZIP和ZINB，mzim包实现边际化零膨胀模型，此前SAS或Stata中缺乏统一实现<sup>[3](https://link.springer.com/article/10.3758/s13428-026-03036-7)</sup>。零膨胀回归的四个主要包是zic、pscl、VGAM和gamlss；COZIGAM已从CRAN归档，自2012年以来未更新<sup>[14](https://onlinelibrary.wiley.com/doi/10.1111/insr.12479)</sup>。
- **Stata**：zip命令拟合一个模型，其中超额零值来自logit或probit模型，其余计数来自泊松模型；zinb是负二项对应版本<sup>[16](https://www.stata.com/manuals/rzip.pdf)</sup>。
- **SAS**：PROC GENMOD实现传统的零膨胀模型<sup>[3](https://link.springer.com/article/10.3758/s13428-026-03036-7)</sup>。
- **Genstat**：R0INFLATED通过EM算法拟合ZIP、ZIB和ZINB，或者使用Welsh及其同事的条件模型，计数状态采用截断计数分布<sup>[17](https://genstat.kb.vsni.co.uk/knowledge-base/r0inflat/)</sup>。

## 零膨胀模型与栅栏模型

两个模型族都处理超额零值，但结构上有所不同。零膨胀模型将零点质量与一个同样允许零处非零概率的标准计数分布结合：点质量解释结构零，计数分布建模抽样零。栅栏模型则将计数分布在零以上截断，因此所有零都来自第一分量<sup>[18](https://arxiv.org/pdf/2411.12086)</sup>。当理论表明超额零值由独立过程产生，且计数分量本身也能产生零时，使用零膨胀模型<sup>[19](https://stats.oarc.ucla.edu/wp-content/uploads/2024/03/Zero_inf_2024_2.html)</sup>。

选择会改变解释。在栅栏模型中，零分量是跨过栅栏（非零计数）的概率；在零膨胀模型中，它是始终为零状态的概率<sup>[10](https://pmc.ncbi.nlm.nih.gov/articles/PMC11807933/)</sup>。从概念上讲，零膨胀模型适用于存在有风险和无风险两个亚群的设定，其中有风险者仍然可能出现抽样零<sup>[3](https://link.springer.com/article/10.3758/s13428-026-03036-7)</sup><sup> • </sup><sup>[11](https://pmc.ncbi.nlm.nih.gov/articles/PMC4194007/)</sup>。两个模型族在形式上是相关的：使用1979年至1988年国会对最高法院裁决回应的数据，King的栅栏事件计数模型和Greene的零膨胀泊松模型均被证明是一般化双机制模型的特例<sup>[20](https://ideas.repec.org/a/sae/somere/v26y1998i3p368-400.html)</sup>。软件通常将它们并列处理；例如Statgraphics同时拟合零膨胀模型和栅栏模型，两个分量中可使用相同或不同的预测变量<sup>[21](https://www.statgraphics.com/hubfs/Zero%20Inflated%20Count%20Regression.pdf)</sup>。

## 诊断与模型选择

**Vuong检验。** 比较泊松模型和零膨胀泊松模型的未校正Vuong检验长期被用作一种检查手段，但在此比较中不再被认为有效<sup>[5](https://stats.oarc.ucla.edu/r/dae/zip/)</sup>。Wilson表明，零膨胀模型与其普通对应模型不满足Vuong检验对非嵌套模型所假设的条件，因此将其用于这一特定比较是无效的，且可能表现不稳定<sup>[9](https://tidyecology.com/posts/zero-inflated-count-models/)</sup>。另外，Stata的未校正Vuong检验偏向于支持零膨胀模型，即使生成过程中不存在零膨胀，因为Stata未实现Vuong对参数数量不同的校正；基于Akaike和Schwarz（BIC）准则的校正Vuong统计量后来被提出并在[蒙特卡洛](https://www.edgepedia.org/zh/monte-carlo)研究中得到验证<sup>[6](https://ideas.repec.org/a/tsj/stataj/v13y2013i4p810-835.html)</sup>。Jansakul和Hinde推导的ZIP模型零膨胀得分检验提供了另一条途径<sup>[22](https://mediatum.ub.tum.de/doc/1097580/711615.pdf)</sup>。

**信息准则。** AIC和BIC是通常的备选方案。在一个250个观测值的Stata示例中，泊松模型的AIC为2630.356，BIC为2640.92，而ZIP模型的AIC为1713.403，BIC为1734.532，因此ZIP拟合更好<sup>[16](https://www.stata.com/manuals/rzip.pdf)</sup>。准则可能相互冲突：在一篇应用教程中，零增广负二项模型的AIC略好，但朴素负二项的BIC更好，最终出于简约性选择了朴素负二项<sup>[10](https://pmc.ncbi.nlm.nih.gov/articles/PMC11807933/)</sup>。应用研究仍然报告正的校正Vuong值作为零膨胀的证据；在马来西亚门诊分析中，零膨胀模型具有最小的对数似然、AIC和BIC，以及正的校正Vuong值，并且在选择准则、最小RMSE和较高R²方面都是拟合最好的模型<sup>[8](https://link.springer.com/article/10.1186/s12874-022-01733-3)</sup>。

## 数据说话

模拟证据降低了对零膨胀模型的热情。一项发表于Trials的研究将样本量从60变化到800，发现无论零膨胀率如何，传统负二项模型与其零膨胀对应模型在边际处理组系数的偏倚方面差异甚微；即使结果变量是从零膨胀分布模拟生成的，AIC仍更支持负二项模型<sup>[7](https://trialsjournal.biomedcentral.com/articles/10.1186/s13063-023-07648-8)</sup>。数据非零部分的均值和偏度比零计数百分比更能预测模型偏好，且结果不受样本量影响<sup>[7](https://trialsjournal.biomedcentral.com/articles/10.1186/s13063-023-07648-8)</sup>。另一项模拟将N从100变化到500，零率从0.2变化到0.8；当干预对零部分和计数部分的效应方向一致时，边际化ZIP的统计功效最高，其次是原始尺度上的线性模型、负二项和ZIP<sup>[13](https://ar5iv.labs.arxiv.org/html/2301.12674)</sup>。

关于样本量，UCLA的指南是零膨胀泊松模型不推荐用于小样本，尽管文献中对何为小样本并无明确定义<sup>[5](https://stats.oarc.ucla.edu/r/dae/zip/)</sup>。生态学比较研究（Gray 2005；Warton 2005；Sileshi 2008）发现普通负二项模型常常“胜出”，其次是零膨胀负二项，而泊松和零膨胀泊松可能拟合不佳<sup>[23](https://statistics4ecologists-v2a.netlify.app/zimodels)</sup>。

## 应用

零膨胀模型和栅栏模型广泛应用于生态学、环境科学、经济学、保险理赔数据和犯罪学<sup>[18](https://arxiv.org/pdf/2411.12086)</sup>。Lambert最初的应用是印刷电路板上的焊接缺陷实验，其中两种条件产生的平均缺陷数大致相同，但在完美状态的可能性和非完美状态的均值上存在差异，因此ZIP不仅显示了哪些条件降低了均值，还揭示了原因<sup>[1](https://www.stat.cmu.edu/technometrics/90-00/vol-34-01/v3401001.pdf)</sup>。在健康研究中，ZIP已用青少年女孩HIV风险性行为数据进行了说明，并附有SAS和Stata示例代码<sup>[11](https://pmc.ncbi.nlm.nih.gov/articles/PMC4194007/)</sup>，还应用于2019年马来西亚全国健康与发病率调查中的门诊利用情况，其中90%的成年人报告零次就诊，8.35%报告一次，1.04%报告两次<sup>[8](https://link.springer.com/article/10.1186/s12874-022-01733-3)</sup>。其他被提及的设定包括学生缺课天数、并非人人持有保险的人群中的保险理赔、制造缺陷和野生动物计数<sup>[21](https://www.statgraphics.com/hubfs/Zero%20Inflated%20Count%20Regression.pdf)</sup>。

## References

1. [Diane Lambert (1992). Zero-Inflated Poisson Regression, With an Application to Defects in Manufacturing. Technometrics.](https://www.stat.cmu.edu/technometrics/90-00/vol-34-01/v3401001.pdf)
2. [Zeileis, Kleiber, Jackman. Regression Models for Count Data in R (pscl vignette).](https://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf)
3. [Estimating marginal effects with zero-inflated models: A tutorial with the R package mzim. Behavior Research Methods.](https://link.springer.com/article/10.3758/s13428-026-03036-7)
4. [zeroinfl: Zero-inflated Count Data Regression (pscl documentation).](https://search.r-project.org/CRAN/refmans/pscl/html/zeroinfl.html)
5. [UCLA OARC — Zero-Inflated Poisson Regression | R Data Analysis Examples.](https://stats.oarc.ucla.edu/r/dae/zip/)
6. [Testing for zero inflation in count models: Bias correction for the Vuong test. Stata Journal 13(4).](https://ideas.repec.org/a/tsj/stataj/v13y2013i4p810-835.html)
7. [Evaluation of negative binomial and zero-inflated negative binomial models for the analysis of zero-inflated count data. Trials.](https://trialsjournal.biomedcentral.com/articles/10.1186/s13063-023-07648-8)
8. [Count data models for outpatient health services utilisation (Malaysian NHMS 2019). BMC Medical Research Methodology.](https://link.springer.com/article/10.1186/s12874-022-01733-3)
9. [Zero-inflated and hurdle models for ecological counts. Tidy Ecology.](https://tidyecology.com/posts/zero-inflated-count-models/)
10. [Modelling Count Data in Psychological Research: An Applied Tutorial.](https://pmc.ncbi.nlm.nih.gov/articles/PMC11807933/)
11. [Structural zeroes and zero-inflated models.](https://pmc.ncbi.nlm.nih.gov/articles/PMC4194007/)
12. [check_zeroinflation function documentation (performance package).](https://github.com/easystats/performance/blob/master/man/check_zeroinflation.Rd)
13. [A simulation study of the performance of statistical models for count outcomes with excessive zeros.](https://ar5iv.labs.arxiv.org/html/2301.12674)
14. [Modelling Excess Zeros in Count Data: A New Perspective on Modelling Approaches. International Statistical Review.](https://onlinelibrary.wiley.com/doi/10.1111/insr.12479)
15. [Accounting for Excess Zeros and Sample Selection (NYU working paper).](https://archive.nyu.edu/bitstream/2451/26263/2/94-10.pdf)
16. [Stata zip manual — Zero-inflated Poisson.](https://www.stata.com/manuals/rzip.pdf)
17. [Genstat R0INFLATED procedure — Knowledge Base 2024.](https://genstat.kb.vsni.co.uk/knowledge-base/r0inflat/)
18. [Zero-inflated and hurdle models (arXiv preprint, Nov 2024).](https://arxiv.org/pdf/2411.12086)
19. [Zero-Inflated and Hurdle Models for Count Data (UCLA OARC, 2024).](https://stats.oarc.ucla.edu/wp-content/uploads/2024/03/Zero_inf_2024_2.html)
20. [An Analytic and Empirical Examination of Zero-Inflated and Hurdle Poisson Specifications (Zorn, 1998).](https://ideas.repec.org/a/sae/somere/v26y1998i3p368-400.html)
21. [Statgraphics — Zero Inflated Count Regression procedure.](https://www.statgraphics.com/hubfs/Zero%20Inflated%20Count%20Regression.pdf)
22. [Zero-inflated generalized Poisson regression models: Asymptotic theory and applications.](https://mediatum.ub.tum.de/doc/1097580/711615.pdf)
23. [Chapter 17 Models for zero-inflated data. Statistics for Ecologists.](https://statistics4ecologists-v2a.netlify.app/zimodels)
24. [Nonparametric Bayesian latent class model for longitudinal zero-inflated count data. Journal of Nonparametric Statistics (2025).](https://www.tandfonline.com/doi/full/10.1080/10485252.2025.2576122)
25. [Power analysis for zero-inflated Poisson and negative binomial generalized linear models using Monte Carlo simulation (2024).](https://www.tandfonline.com/doi/abs/10.1080/00949655.2024.2440796)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 10, 2026 · Edited: Oct 10, 2026; Oct 11, 2026 · Last review: Oct 10, 2026*

Topic: 社会与历史 › 经济与商业 › 经济学 › Economic theory and methods › Econometrics and quantitative methods › Discrete and limited dependent variable methods

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/zero-inflated-model

English original: https://www.edgepedia.org/zero-inflated-model
