# 分布回归

分布回归是一类统计模型，它估计的是给定解释变量时响应变量的整个条件概率分布，而非仅估计其均值。位置、尺度与形状的广义可加模型（GAMLSS）是其中的一个常见框架，它通过将均值、方差、偏度和尾部行为建模为协变量的函数，对线性模型、广义线性模型和广义可加模型进行了扩展。<sup>[1](https://www.nature.com/articles/s43586-026-00498-z)</sup> 这使单一模型能够直接衡量解释变量如何影响变异性、分位数和超限概率，凡是以预测不确定性和极端事件驱动风险评估的场合，这一点都至关重要。<sup>[1](https://www.nature.com/articles/s43586-026-00498-z)</sup> 由于单一模型估计所有分布参数，几乎所有分布泛函——包括分位数和基尼系数这类不平等度量——都可以从拟合的条件分布中一致地导出。<sup>[2](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0226514)</sup>

| 关键事实 | 详情 |
|---|---|
| 建模对象 | 响应的完整条件分布，通过至多四个参数 μ、σ、ν、τ 来刻画，每个参数均可依赖于协变量<sup>[3](https://repository.londonmet.ac.uk/4821/1/GAMLSS%20A%20distributional.pdf.pdf)</sup> |
| 参数角色 | μ 和 σ 通常是位置参数和尺度参数；ν 和 τ 是形状参数，如偏度和峰度<sup>[3](https://repository.londonmet.ac.uk/4821/1/GAMLSS%20A%20distributional.pdf.pdf)</sup> |
| 预测子 | 每个参数有自己的预测子，\( g_{k}(\theta_{k}) = \eta_{k} = h_{k}(X_{k}, \beta_{k}) \)，可包含线性、非线性、空间和随机效应<sup>[4](https://www.gamlss.com/wp-content/uploads/2023/06/Lancaster-booklet.pdf)</sup> |
| 估计 | 带后退拟合的惩罚最大似然、函数梯度提升或贝叶斯 MCMC<sup>[5](https://doi.org/10.1080/10618600.2024.2388604)</sup> |
| 模型选择 | 广义赤池信息准则，\( \mathrm{GAIC}(k) = \mathrm{GD} + k \cdot g_{l} \)，其中 \( k = 2 \) 给出 AIC，\( k = \ln n \) 给出 BIC<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC10369920/)</sup> |
| 评估 | 随机化分位数残差、虫图、PIT 直方图，以及 CRPS 等恰当评分规则<sup>[7](https://publikationen.bibliothek.kit.edu/1000175452/155213635)</sup> |
| 可扩展性 | 批式后退拟合在 50,000 个观测值上需 30–60 分钟，而提升法需 600–1,100 分钟，且可扩展至 10⁷ 个观测值<sup>[5](https://doi.org/10.1080/10618600.2024.2388604)</sup> |

## 工作原理

GAMLSS 模型假定独立观测 \( Y_{i} \) 在给定至多四个分布参数的条件下具有概率（密度）函数 \( f_{Y}(y_{i} \mid \mu_{i}, \sigma_{i}, \nu_{i}, \tau_{i}) \)，而每个参数都可以是解释变量的函数。<sup>[3](https://repository.londonmet.ac.uk/4821/1/GAMLSS%20A%20distributional.pdf.pdf)</sup> 响应分布不必属于指数族；高度偏斜和高峰度的连续分布与离散分布均可接受。<sup>[3](https://repository.londonmet.ac.uk/4821/1/GAMLSS%20A%20distributional.pdf.pdf)</sup> 每个参数 \( k \) 有自己的预测子，\( g_{k}(\theta_{k}) = \eta_{k} = h_{k}(X_{k}, \beta_{k}) \)，其中 \( g_{k} \) 是单调可微的连接函数，\( h_{k} \) 可包含线性项、样条、空间效应和随机效应；若 \( h_{k} \) 为线性，模型退化为线性参数模型。<sup>[4](https://www.gamlss.com/wp-content/uploads/2023/06/Lancaster-booklet.pdf)</sup><sup> • </sup><sup>[8](https://link.springer.com/article/10.1186/s12874-022-01534-8)</sup> 这类模型是半参数的：参数性在于需要对响应作出参数分布假定，半在于参数预测子可以涉及非参数平滑函数。<sup>[4](https://www.gamlss.com/wp-content/uploads/2023/06/Lancaster-booklet.pdf)</sup>

有些作者更偏好“分布回归”这一说法而非 GAMLSS，因为参数往往并不直接是位置、尺度和形状的度量；例如 Dagum 分布有三个参数，其中没有一个是直接的位置度量。<sup>[9](https://ar5iv.labs.arxiv.org/html/1509.05230)</sup>

## 操作流程

实践者首先从庞大的目录中选择一个响应分布；R 包 gamlss.dist 提供了适用于 GAMLSS 的分布。<sup>[10](https://cran.r-project.org/web/packages/gamlss.dist/gamlss.dist.pdf)</sup> 其次，为每个分布参数指定一个预测子。第三，在平滑超参数 \( \lambda_{jk} \) 固定的情况下，通过最大化惩罚似然 \( \ell_{p}(\beta, \gamma) = \ell(\beta, \gamma) - \sum P_{jk} \) 来估计参数 \( \beta_{k} \) 和随机效应 \( \gamma_{jk} \)，其中 \( \ell \) 是对数密度贡献 \( \log f_{Y}(y_{i} \mid \mu_{i}, \sigma_{i}, \nu_{i}, \tau_{i}) \) 之和。<sup>[4](https://www.gamlss.com/wp-content/uploads/2023/06/Lancaster-booklet.pdf)</sup> 最大化采用牛顿–拉夫森或 Fisher 得分算法，可加项通过后退拟合来拟合；Rigby 和 Stasinopoulos 提出了一种基于迭代重加权（惩罚）最小二乘的修正后退拟合算法。<sup>[11](https://ideas.repec.org/a/bla/jorssc/v54y2005i3p507-554.html)</sup><sup> • </sup><sup>[5](https://doi.org/10.1080/10618600.2024.2388604)</sup> 存在两种基本算法：RS 算法和 CG 算法，后者是 Cole 和 Green 算法的推广。<sup>[4](https://www.gamlss.com/wp-content/uploads/2023/06/Lancaster-booklet.pdf)</sup>

对于 \( p > n \) 的高维情形，函数梯度提升执行数据驱动的变量选择、收缩系数并处理多重共线性，同时保持可解释性；提升迭代次数是主要的调优参数，通过交叉验证设定。<sup>[12](https://doi.org/10.1111/j.1467-9876.2011.01033.x)</sup><sup> • </sup><sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC10369920/)</sup> 一种使用 MCMC 并用迭代加权最小二乘构造提议分布的贝叶斯实现，运行于 BayesX 和 R 包 bamlss 中。<sup>[13](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040722-053607)</sup><sup> • </sup><sup>[14](https://doi.org/10.1080/01621459.2014.912955)</sup> 模型比较对后验众数估计使用 AIC、校正 AIC 和 BIC，对 MCMC 拟合使用 DIC 和 WAIC。<sup>[7](https://publikationen.bibliothek.kit.edu/1000175452/155213635)</sup> 模型充分性通过正态化（随机化）分位数残差来检验，借助 QQ 图、PIT 直方图和虫图进行评估；预测性能则在样本外用 CRPS 和对数得分等恰当评分规则来评分。<sup>[7](https://publikationen.bibliothek.kit.edu/1000175452/155213635)</sup><sup> • </sup><sup>[15](https://www2.uibk.ac.at/downloads/c4041030/wpaper/2017-13.pdf)</sup>

## 起源

GAMLSS 框架由 D. Mikis Stasinopoulos 和 Robert A. Rigby 于 2007 年在《统计软件杂志》上提出，他们在文中呈现了这些模型及其 R 实现，作为克服广义线性模型和广义可加模型局限性的一种途径。更早的先驱是 Robert A. Rigby 和 Mikis D. Stasinopoulos（1996）的均值与离散度可加模型工作，它将可加预测子结构应用于均值和离散度。<sup>[16](https://doi.org/10.1007/978-3-642-48425-4_16)</sup> T. J. Cole（1988）用于生长标准的 LMS 方法是另一个先驱，GAMLSS 对其进行了推广。<sup>[13](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040722-053607)</sup>

## 变体

为所有分布参数设置可加预测子的思想，由 Nadja Klein、Thomas Kneib 和 Stefan Lang（2014）在《美国统计协会杂志》上转移到贝叶斯语境中。<sup>[14](https://doi.org/10.1080/01621459.2014.912955)</sup> 贝叶斯结构化可加分布回归将他们的计数数据模型扩展到一般单变量分布，MCMC 推断无需渐近论证即可提供可信区间。<sup>[9](https://ar5iv.labs.arxiv.org/html/1509.05230)</sup> Nikolaus Umlauf、Nadja Klein 和 Achim Zeileis（2017）的 BAMLSS 框架将其打包为模块化的 R 实现。<sup>[17](https://doi.org/10.1080/10618600.2017.1407325)</sup> 分布模型也可在 brms 中使用（后端采用 Stan），以及在 Bambi 中使用——在 Bambi 中可以为响应分布的所有参数指定预测子项，以建模异方差性。<sup>[18](https://cloud.r-project.org/web/packages/brms/vignettes/brms_distreg.html)</sup><sup> • </sup><sup>[19](https://bambinos.github.io/bambi/notebooks/distributional_models.html)</sup> 在机器学习方面，分位数回归森林和分布随机森林以非参数方式估计条件分布。<sup>[1](https://www.nature.com/articles/s43586-026-00498-z)</sup> 半结构化深度分布回归由 David Rügamer、Chris Kolb 和 Nadja Klein（2020）提出，将结构化可加预测子与神经网络结合，代价是计算成本增加。<sup>[20](https://www.research-collection.ethz.ch/server/api/core/bitstreams/a63e8828-a696-4e2e-8a14-b12a2b123532/content)</sup>

可扩展性已有显著进展。批式后退拟合将经典后退拟合与随机梯度下降相结合，由 Nikolaus Umlauf 及其同事（2024）在 bamlss 中实现为 opt_bbfit()；在 50,000 个观测值上每次运行需 30–60 分钟，而 gamboostLSS 提升法需 600–1,100 分钟，它通过平面文件存储处理 10⁷ 个观测值，并展现出优异的变量选择特性。<sup>[5](https://doi.org/10.1080/10618600.2024.2388604)</sup> 在线分布回归由 Simon Hirsch、Jonathan Berrisch 和 Florian Ziel（2024）提出，将在线坐标下降与 GAMLSS 相结合，具备 LASSO、岭和弹性网正则化以及面向流式数据的增量模型选择，实现在 Python 包 ondil 中。<sup>[21](https://doi.org/10.48550/arxiv.2407.08750)</sup><sup> • </sup><sup>[22](https://simon-hirsch.github.io/ondil/)</sup>

## 应用

在临床试验中，分布回归估计处理对均值以外参数的影响；模拟显示，对于非正态、异质的响应，分布模型大幅优于正态模型，而在正态线性模型假定成立时并无劣势；一项应用展示了处理对收缩压方差的有利效应。<sup>[8](https://link.springer.com/article/10.1186/s12874-022-01534-8)</sup> 在经济评价中，GAMLSS 支持对处理在响应分布所有泛函（如分位数和基尼系数）上的效应进行系统分析。<sup>[2](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0226514)</sup> 贝叶斯分布回归已被应用于德国区域收入不平等的研究。<sup>[9](https://ar5iv.labs.arxiv.org/html/1509.05230)</sup>

## 局限与替代方案

GAMLSS 对条件累积分布函数作出完全参数假定，意味着对所有观测值固定响应分布类型，这可能过于严格；设定错误的基于均值的模型可能得出误导性结论，同样的风险也适用于分布假定本身。<sup>[13](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040722-053607)</sup><sup> • </sup><sup>[15](https://www2.uibk.ac.at/downloads/c4041030/wpaper/2017-13.pdf)</sup> 对许多参数分布而言，参数并非中心矩，而是一般的位置、尺度或形状参数，这使估计效应更难解释；模型选择和变量选择也具有挑战性，因为比较所有候选模型不可行。<sup>[13](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040722-053607)</sup> 模拟研究显示，基于似然的置信区间在某些情形下表现不佳，因此应用往往转而依赖自助法推断。<sup>[2](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0226514)</sup>

与分位数回归相比，分布回归直接估计条件分布函数 \( F(y \mid x) \)，而分位数回归估计条件分位数函数，二者互为广义逆。<sup>[23](https://www.eief.it/files/2013/12/wp-29-distributional-vs-quantile-regression.pdf)</sup> 分位数回归避免了显式的分布假定，可应用于离散响应，但离散性可能使估计和推断复杂化，尤其是对二值数据和比例数据；且对每个分位数分别拟合模型存在分位数交叉的风险。<sup>[2](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0226514)</sup><sup> • </sup><sup>[15](https://www2.uibk.ac.at/downloads/c4041030/wpaper/2017-13.pdf)</sup><sup> • </sup><sup>[27](https://pmc.ncbi.nlm.nih.gov/articles/PMC12571108/)</sup> 若假定的分布恰当，GAMLSS 可以提供比分位数回归更精确的估计量，尤其是在数据稀缺的分布尾部；当关注点在于特定分位数时建议用分位数回归，当关注整个条件分布或基尼系数等泛函时建议用 GAMLSS。<sup>[2](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0226514)</sup> 在参数线性设定错误的情形下，分位数回归估计量的积分渐近方差小于分布回归估计量，且直接分布估计量对总体累积分布函数可能不一致，重排是恢复单调性的一种补救办法。<sup>[24](https://eief.it/files/2015/07/wp-06-shape-regressions.pdf)</sup> 条件变换模型和贝叶斯回归联结函数 构成了建模完整条件分布的替代分支。<sup>[25](https://doi.org/10.1111/rssb.12017)</sup><sup> • </sup><sup>[26](https://doi.org/10.1080/07350015.2020.1721295)</sup>

## References

1. [Distributional regression using generalized additive models for location, scale and shape (Nature Reviews Methods Primers)](https://www.nature.com/articles/s43586-026-00498-z)
2. [Treatment effects beyond the mean using distributional regression: Methods and guidance (PLOS One)](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0226514)
3. [GAMLSS: A distributional regression approach (Stasinopoulos, Rigby et al., author repository copy)](https://repository.londonmet.ac.uk/4821/1/GAMLSS%20A%20distributional.pdf.pdf)
4. [GAMLSS booklet (Lancaster, Stasinopoulos, Rigby)](https://www.gamlss.com/wp-content/uploads/2023/06/Lancaster-booklet.pdf)
5. [Nikolaus Umlauf and colleagues (2024). Scalable Estimation for Structured Additive Distributional Regression. Journal of Computational and Graphical Statistics.](https://doi.org/10.1080/10618600.2024.2388604)
6. [Distributional regression modeling via GAMLSS: An overview through a data set from learning analytics (PMC)](https://pmc.ncbi.nlm.nih.gov/articles/PMC10369920/)
7. [bamlss: A Lego Toolbox for Flexible Bayesian Regression (and Beyond) (KIT publication record)](https://publikationen.bibliothek.kit.edu/1000175452/155213635)
8. [Distributional regression in clinical trials: treatment effects on parameters other than the mean (BMC Medical Research Methodology, 2022)](https://link.springer.com/article/10.1186/s12874-022-01534-8)
9. [Bayesian structured additive distributional regression with an application to regional income inequality in Germany (arXiv 1509.05230)](https://ar5iv.labs.arxiv.org/html/1509.05230)
10. [gamlss.dist: Distributions for GAMLSS (CRAN documentation)](https://cran.r-project.org/web/packages/gamlss.dist/gamlss.dist.pdf)
11. [Generalized additive models for location, scale and shape (Rigby & Stasinopoulos, JRSS-C 54(3):507–554, 2005)](https://ideas.repec.org/a/bla/jorssc/v54y2005i3p507-554.html)
12. [Andreas Mayr and colleagues (2012). Generalized Additive Models for Location, Scale and Shape for High Dimensional Data, A Flexible Approach Based on Boosting. Journal of the Royal Statistical Society Series C (Applied Statistics).](https://doi.org/10.1111/j.1467-9876.2011.01033.x)
13. [Distributional Regression for Data Analysis (Annual Review of Statistics and Its Application)](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040722-053607)
14. [Nadja Klein, Thomas Kneib, Stefan Lang (2014). Bayesian Generalized Additive Models for Location, Scale, and Shape for Zero-Inflated and Overdispersed Count Data. Journal of the American Statistical Association.](https://doi.org/10.1080/01621459.2014.912955)
15. [A primer on Bayesian distributional regression (Kneib et al., working paper)](https://www2.uibk.ac.at/downloads/c4041030/wpaper/2017-13.pdf)
16. [Robert A. Rigby, Mikis D. Stasinopoulos (1996). Mean and Dispersion Additive Models. Contributions to statistics.](https://doi.org/10.1007/978-3-642-48425-4_16)
17. [Nikolaus Umlauf, Nadja Klein, Achim Zeileis (2017). BAMLSS: Bayesian Additive Models for Location, Scale, and Shape (and Beyond). Journal of Computational and Graphical Statistics.](https://doi.org/10.1080/10618600.2017.1407325)
18. [Estimating Distributional Models with brms (R package vignette)](https://cloud.r-project.org/web/packages/brms/vignettes/brms_distreg.html)
19. [Distributional models – Bambi (official software documentation)](https://bambinos.github.io/bambi/notebooks/distributional_models.html)
20. [ETH research collection document mentioning SDDR](https://www.research-collection.ethz.ch/server/api/core/bitstreams/a63e8828-a696-4e2e-8a14-b12a2b123532/content)
21. [Hirsch, Simon, Berrisch, Jonathan, Ziel, Florian (2024). Online Distributional Regression. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2407.08750)
22. [ondil: Online Distributional Learning (software documentation)](https://simon-hirsch.github.io/ondil/)
23. [Distributional vs. Quantile Regression (Koenker, Leorato, Peracchi, EIEF Working Paper 29/13, 2013)](https://www.eief.it/files/2013/12/wp-29-distributional-vs-quantile-regression.pdf)
24. [Shape Regressions (EIEF Working Paper 06/15, 2015)](https://eief.it/files/2015/07/wp-06-shape-regressions.pdf)
25. [Torsten Hothorn, Thomas Kneib, Peter Bühlmann (2013). Conditional Transformation Models. Journal of the Royal Statistical Society Series B (Statistical Methodology).](https://doi.org/10.1111/rssb.12017)
26. [Michael Stanley Smith, Nadja Klein (2020). Bayesian Inference for Regression Copulas. Journal of Business and Economic Statistics.](https://doi.org/10.1080/07350015.2020.1721295)
27. [pmc.ncbi.nlm.nih.gov](https://pmc.ncbi.nlm.nih.gov/articles/PMC12571108/)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 25, 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/distributional-regression

English original: https://www.edgepedia.org/distributional-regression
