# 限制最大似然

限制最大似然（Restricted maximum likelihood, REML）是估计线性混合模型中方差组分的一种方法，它所最大化的似然经过调整，使其不包含关于模型固定效应的任何信息。由于估计仅基于误差对比——即数据中不含固定效应的线性组合——REML 避免了普通最大似然（ML）在同一数据中同时估计固定效应时所产生的方差估计下偏。<sup>[1](https://www.ncbi.nlm.nih.gov/books/NBK583962/)</sup> REML 是系谱选择试验中的首选方法<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC8986777/)</sup>，也是 GCTA 等工具中基因组遗传力估计的基础。<sup>[3](https://www.cell.com/ajhg/pdf/S0002-9297%2810%2900598-7.pdf)</sup> 在家畜育种中，其主流最大化算法为平均信息（AI）REML。<sup>[4](https://gsejournal.biomedcentral.com/counter/pdf/10.1186/1297-9686-29-2-97.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 估计对象 | 混合模型的方差组分，通过一个对固定效应不变的似然来估计<sup>[1](https://www.ncbi.nlm.nih.gov/books/NBK583962/)</sup> |
| 偏倚校正 | 在回归中，ML 将残差平方和除以 \( n \)；无偏估计量则除以 \( n - t \)，以计入 \( t \) 个被估计的固定效应<sup>[5](https://royalsocietypublishing.org/doi/10.1098/rspb.2007.1417)</sup> |
| 平衡数据 | 对于平衡数据，REML 估计量与 ANOVA（矩法）估计量一致，而 Hartley 和 Rao 的 ML 估计量不具备这一性质<sup>[6](https://www.stat.cmu.edu/technometrics/70-79/VOL-18-01/v1801031.pdf)</sup> |
| 主要算法 | AI-REML 是一种拟牛顿法，使用观测信息与期望信息的平均值，是家畜育种中最常用的方差组分方法<sup>[7](https://journals.plos.org/plosone/article/file?id=10.1371%2Fjournal.pone.0080821&type=printable)</sup> |
| 基因组应用 | GCTA 通过在 SNP 衍生的遗传关系矩阵上使用 REML，估计全基因组所有 SNP 所解释的方差<sup>[3](https://www.cell.com/ajhg/pdf/S0002-9297%2810%2900598-7.pdf)</sup> |
| 规模（2025） | 蒙特卡洛单步基因组 REML 达到了与精确 ss-GREML 相同的估计值，而计算时间仅为后者的 14%，内存仅为 1%<sup>[8](https://link.springer.com/article/10.1186/s12711-025-01006-9)</sup> |

## 工作原理

在线性混合模型中，数据的边际分布为 \( y \sim N(X \cdot \beta, V) \)，其中 \( V \) 依赖于待估计的方差组分 \( \theta \)。<sup>[9](https://www.sciencedirect.com/science/article/pii/S0022030293775694)</sup> 普通 ML 最大化全部 \( y \) 的似然，因此方差估计会受到同时拟合的固定效应的影响。由于 ML 未计入估计固定效应系数时所损失的自由度，其方差组分估计量偏向零；在独立聚类混合模型中，当聚类数相对于固定效应数较少时，这种偏倚可能很严重。<sup>[10](https://arxiv.org/pdf/2402.12719)</sup> 经典的例证是含 \( t \) 个回归变量的线性回归：无偏残差方差为 \( S/(n-t) \)，而 ML 给出 \( S/n \)，与回归变量个数无关。<sup>[5](https://royalsocietypublishing.org/doi/10.1098/rspb.2007.1417)</sup> 在从多元正态数据估计方差的最简单情形中，ML 将离差平方和除以 \( n \)，而 REML 除以 \( n-1 \)。<sup>[11](https://ecommons.cornell.edu/server/api/core/bitstreams/42522d2e-30a3-48e6-a627-3147887f35bc/content)</sup>

这种限制在于最大化误差对比的似然而非数据本身的似然。Patterson 解释说，他使用的是一组误差对比——即不提供固定效应信息的比较——所构成的似然，而不是数据的完整似然。<sup>[5](https://royalsocietypublishing.org/doi/10.1098/rspb.2007.1417)</sup> 形式上，限制似然对应于满足 \( F \cdot X = 0 \) 的最大数目 \( n - p - 1 \) 个线性独立误差对比 \( F \cdot y \) 所关联的似然，并且对固定效应参数不变。<sup>[1](https://www.ncbi.nlm.nih.gov/books/NBK583962/)</sup> 等价地，REML 最大化满足 \( K' \cdot X = 0 \) 且不含固定效应的 \( N-r \) 个线性独立线性组合 \( K' \cdot y \) 的似然。<sup>[11](https://ecommons.cornell.edu/server/api/core/bitstreams/42522d2e-30a3-48e6-a627-3147887f35bc/content)</sup> 一种便利的计算形式为

\[ \ell_{R}(\theta \mid y) = -\tfrac{1}{2}\log|X^{T} \cdot V^{-1} \cdot X| - \tfrac{1}{2}\log|V| - \tfrac{1}{2}(y - X \cdot \tilde{\beta})^{T} \cdot V^{-1} \cdot (y - X \cdot \tilde{\beta}), \]

其中 \( \tilde{\beta} = (X^{T} \cdot V^{-1} \cdot X)^{-1} \cdot X^{T} \cdot V^{-1} \cdot y \) 是固定效应的广义最小二乘估计。<sup>[1](https://www.ncbi.nlm.nih.gov/books/NBK583962/)</sup> 由此得到的估计量对模型的固定效应不变，且不含固定效应的估计值。<sup>[6](https://www.stat.cmu.edu/technometrics/70-79/VOL-18-01/v1801031.pdf)</sup>

## 如何实现

REML 估计方程没有解析解，必须用数值方法求解。<sup>[6](https://www.stat.cmu.edu/technometrics/70-79/VOL-18-01/v1801031.pdf)</sup> 标准的最大化方法包括牛顿–拉弗森法和 Fisher 得分法、EM 算法，以及 lme4 包中的工具；一旦将 REML 方差估计代入 BLUP 方程，所得的预测即为估计或经验最佳线性无偏预测（EBLUP）。<sup>[1](https://www.ncbi.nlm.nih.gov/books/NBK583962/)</sup>

平均信息算法是一种拟牛顿法，只需似然的一阶导数，用观测信息矩阵与期望信息矩阵的平均值替代二阶导数；人们发现它在计算上远优于无导数方法。<sup>[4](https://gsejournal.biomedcentral.com/counter/pdf/10.1186/1297-9686-29-2-97.pdf)</sup> 在 AI 迭代中，更新为 \( \mathrm{vech}(\theta^{(i+1)}) = \mathrm{vech}(\theta^{i}) - \Delta^{i} \)，其中 \( \Delta^{i} = AI(\theta^{i})^{-1}(\nabla(\theta^{i})) \)，\( \nabla \) 为 \( -2\ell(\theta) \) 的梯度。<sup>[8](https://link.springer.com/article/10.1186/s12711-025-01006-9)</sup> 对于极大或复杂的模型，蒙特卡洛 EM REML 在计算上颇具吸引力，但如同典型的 EM 算法一样收敛缓慢；而蒙特卡洛牛顿–拉弗森法和蒙特卡洛 AI REML 改善了收敛性，并附带给出标准误。<sup>[7](https://journals.plos.org/plosone/article/file?id=10.1371%2Fjournal.pone.0080821&type=printable)</sup>

## 起源

将 REML 推广到不平衡数据和一般混合模型、从而得到不含固定效应的估计量，是由 R. R. Corbeil 和 S. R. Searle 于 1976 年在《Technometrics》上提出的。<sup>[12](https://doi.org/10.2307/1267913)</sup> 他们推广了一个此前仅限于平衡数据和全随机效应模型的程序，改编了 Patterson 和 Thompson 变换，该变换将似然划分为完全不含固定效应的部分和另一部分。<sup>[6](https://www.stat.cmu.edu/technometrics/70-79/VOL-18-01/v1801031.pdf)</sup> 该方法用于不平衡数据，描述了从不平衡数据中通过限制最大似然同时估计由若干遗传和环境效应引起的方差组分，其估计值通过显式求值似然而获得。<sup>[13](https://hal.science/hal-00893806/document)</sup> 作者本人最初称之为改进的 ML 方法；后来它被称为限制最大似然。<sup>[5](https://royalsocietypublishing.org/doi/10.1098/rspb.2007.1417)</sup> 对于平衡 ANOVA 模型，此前已有部分进展。<sup>[10](https://arxiv.org/pdf/2402.12719)</sup> 其他推导方式，包括借助贝叶斯论证通过积分似然给出的表述，都得到相同的目标函数。<sup>[10](https://arxiv.org/pdf/2402.12719)</sup>

## 变体

有名称的算法变体包括 AI-REML，Gilmour、Thompson 及其同事在 1995 年《Genetics Selection Evolution》的一篇论文中将其描述为一种拟牛顿算法，<sup>[4](https://gsejournal.biomedcentral.com/counter/pdf/10.1186/1297-9686-29-2-97.pdf)</sup> AI 技术被归功于由澳大利亚（Arthur Gilmour 和 Brian Cullis）与英国（Simon Harding 和 Robin Thompson）统计学家组成的团队。<sup>[14](https://www.stats.net.au/Maths_REML_manual.pdf)</sup> 蒙特卡洛变体（MC EM、MC 牛顿–拉弗森、MC AI）将 REML 扩展到大型数据集和复杂模型。<sup>[7](https://journals.plos.org/plosone/article/file?id=10.1371%2Fjournal.pone.0080821&type=printable)</sup> 蒙特卡洛单步基因组 REML（MC-ss-GREML）在单步 GBLUP 模型下反复模拟育种值，并求解混合模型方程以近似涉及预测误差方差的迹；在一个三性状肉牛生长模型中，它给出的估计值与精确 ss-GREML 无差异，而计算时间仅为 14%，内存仅为 1%。<sup>[8](https://link.springer.com/article/10.1186/s12711-025-01006-9)</sup> 实现包括 ASReml（其 REML 程序使用平均信息算法）<sup>[15](https://asreml.kb.vsni.co.uk/wp-content/uploads/sites/3/ASReml-R-Reference-Manual-4.2.pdf)</sup>、用于基因组分析的 GCTA<sup>[3](https://www.cell.com/ajhg/pdf/S0002-9297%2810%2900598-7.pdf)</sup>、lme4<sup>[1](https://www.ncbi.nlm.nih.gov/books/NBK583962/)</sup>，以及 MPH，后者使用 Fisher 得分法、由 Fisher 信息矩阵给出标准误，并用信赖域狗腿法处理因 \( V \) 非正定而导致的收敛失败。<sup>[16](https://pmc.ncbi.nlm.nih.gov/articles/PMC11093526/)</sup>

## 应用

REML 是遗传分析中的重要方法，有助于在动物和植物育种中常用的多变量线性混合模型内进行方差组分估计。<sup>[17](https://repository.rothamsted.ac.uk/id/eprint/33311/1/s12711-024-00939-x.pdf)</sup> 在人类遗传学中，由杨剑及其同事于 2010 年在《The American Journal of Human Genetics》上提出的 GCTA，通过在遗传关系矩阵上使用 REML 估计全基因组所有 SNP 所解释的方差，而非检验单个 SNP 的关联，从而应对缺失遗传力问题。<sup>[18](https://doi.org/10.1016/j.ajhg.2010.11.011)</sup> 在植物育种中，高斯混合模型中基于 REML 的方差组分推断已与包括 BOLT-LMM、FaST-LMM、gaston、GEMMA 和 GridLMM 在内的工具进行了基准比较。<sup>[19](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1009659)</sup> 该方法在系谱选择试验中总体上也是标准方法。<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC8986777/)</sup> 美国奶牛基因组评估的结果显示，当遗传力降低约 50% 至 70% 时预测偏倚减小，表明在强烈基因组选择下，仅用系谱模型估计的遗传力被高估，而为此类群体估计方差组分时忽略基因组信息会产生有偏估计。<sup>[17](https://repository.rothamsted.ac.uk/id/eprint/33311/1/s12711-024-00939-x.pdf)</sup>

## 局限与替代方法

边界估计是一个已知特征：基于似然的方差组分估计是一个受约束的非线性最大化问题，因此最优值可能位于零边界上，而简单地将无约束的负估计截断可能具有可疑的统计性质。<sup>[23](https://ecommons.cornell.edu/bitstream/1813/31601/1/BU-1029-M.pdf)</sup><sup> • </sup><sup>[6](https://www.stat.cmu.edu/technometrics/70-79/VOL-18-01/v1801031.pdf)</sup> 在基因组背景下，如果模型指定的协方差结构不能很好地描述真实模型，似然误指定可能使方差组分估计量产生偏倚。<sup>[20](https://gsejournal.biomedcentral.com/articles/10.1186/s12711-018-0411-0)</sup> REML 的渐近理论在固定部分协变量的温和条件下成立，无需假定数据正态或球对称；在此情形下 REML 与 ML 估计量渐近相关，因此偏倚差异在小样本中最为重要。<sup>[21](https://onlinelibrary.wiley.com/doi/10.1111/j.1467-842X.1994.tb00636.x)</sup> 与 ANOVA（矩法）估计量相比——后者易于计算且在平衡条件下无偏——ANOVA 估计量可能为负，且缺乏可推导的解析分布，而 REML 则隐含地计入了与固定效应相关的自由度。<sup>[11](https://ecommons.cornell.edu/server/api/core/bitstreams/42522d2e-30a3-48e6-a627-3147887f35bc/content)</sup> REML 本身也不估计固定效应，且只有当固定效应结构相同时，限制似然才可在模型间进行比较。<sup>[22](https://psoerensen.github.io/qgnotes/REML.pdf)</sup>

## References

1. [Linear Mixed Models, Multivariate Statistical Machine Learning Methods for Genomic Prediction (NCBI Bookshelf)](https://www.ncbi.nlm.nih.gov/books/NBK583962/)
2. [Evaluation of alternative methods for estimating the precision of REML-based estimates of variance components and heritability](https://pmc.ncbi.nlm.nih.gov/articles/PMC8986777/)
3. [S0002 9297(10)00598 7 (cell.com)](https://www.cell.com/ajhg/pdf/S0002-9297%2810%2900598-7.pdf)
4. [Average information REML: a quasi-Newton algorithm (Genetics Selection Evolution 29(2):97)](https://gsejournal.biomedcentral.com/counter/pdf/10.1186/1297-9686-29-2-97.pdf)
5. [Estimation of quantitative genetic parameters (Thompson, Philosophical Transactions / PMC2392985)](https://royalsocietypublishing.org/doi/10.1098/rspb.2007.1417)
6. [Restricted Maximum Likelihood (REML) Estimation of Variance Components in the Mixed Model (Corbeil & Searle, Technometrics 18(1), 1976)](https://www.stat.cmu.edu/technometrics/70-79/VOL-18-01/v1801031.pdf)
7. [Methods for Restricted Maximum Likelihood Estimation (Monte Carlo Newton-type REML, PLOS ONE)](https://journals.plos.org/plosone/article/file?id=10.1371%2Fjournal.pone.0080821&type=printable)
8. [Estimation of (co)variance components for very large datasets and complex single-step genomic models (Genetics Selection Evolution, 2025)](https://link.springer.com/article/10.1186/s12711-025-01006-9)
9. [A Simple Argument Showing How to Derive Restricted Maximum Likelihood (Computational Statistics & Data Analysis)](https://www.sciencedirect.com/science/article/pii/S0022030293775694)
10. [Restricted Maximum Likelihood Estimation in Generalized Linear Mixed Models (arXiv 2402.12719, 2024 historical/methodological review; html v1 merged)](https://arxiv.org/pdf/2402.12719)
11. [An Overview of Variance Component Estimation (Searle, Cornell)](https://ecommons.cornell.edu/server/api/core/bitstreams/42522d2e-30a3-48e6-a627-3147887f35bc/content)
12. [R. R. Corbeil, S. R. Searle (1976). Restricted Maximum Likelihood (REML) Estimation of Variance Components in the Mixed Model. Technometrics.](https://doi.org/10.2307/1267913)
13. [Simultaneous estimation of variance components by REML (Patterson & Thompson 1971, Biometrika, repository copy via HAL)](https://hal.science/hal-00893806/document)
14. [An introduction to REML (VSN International technical manual)](https://www.stats.net.au/Maths_REML_manual.pdf)
15. [ASReml-R Reference Manual 4.2](https://asreml.kb.vsni.co.uk/wp-content/uploads/sites/3/ASReml-R-Reference-Manual-4.2.pdf)
16. [MPH: fast REML for large-scale genome partitioning of quantitative genetic variation (2024)](https://pmc.ncbi.nlm.nih.gov/articles/PMC11093526/)
17. [A computationally efficient algorithm to leverage average information REML for (co)variance component estimation in the genomic era (Genetics Selection Evolution, 2024)](https://repository.rothamsted.ac.uk/id/eprint/33311/1/s12711-024-00939-x.pdf)
18. [Jian Yang and colleagues (2010). GCTA: A Tool for Genome-wide Complex Trait Analysis. The American Journal of Human Genetics.](https://doi.org/10.1016/j.ajhg.2010.11.011)
19. [Efficient ReML inference in variance component mixed models using a Min-Max algorithm (PLOS Computational Biology)](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1009659)
20. [Understanding the potential bias of variance components estimators when using genomic models (Genetics Selection Evolution, 2018)](https://gsejournal.biomedcentral.com/articles/10.1186/s12711-018-0411-0)
21. [Asymptotic properties of REML estimates for hierarchical mixed linear models (Richardson & Welsh, ANZJS, 1994)](https://onlinelibrary.wiley.com/doi/10.1111/j.1467-842X.1994.tb00636.x)
22. [An introduction to REML (quantitative genetics lecture notes, P. Sørensen)](https://psoerensen.github.io/qgnotes/REML.pdf)
23. [Mbbg0wg0z0t (exa.ai)](https://ecommons.cornell.edu/bitstream/1813/31601/1/BU-1029-M.pdf)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026 · Last review: Sep 30, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Statistical inference, estimation, sampling, and testing › Estimation theory and estimator families

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/restricted-maximum-likelihood

English original: https://www.edgepedia.org/restricted-maximum-likelihood
