# 一般线性模型

**一般线性模型**（general linear model, GLM）是写作 \( Y = X\beta + \varepsilon \) 的统计框架，其中观测到的结果向量 \( Y \) 被表示为设计矩阵 \( X \) 中已知预测变量的线性组合与随机误差 \( \varepsilon \) 之和，线性组合的系数为未知向量 \( \beta \)；任何能写成这种形式的模型都是一般线性模型<sup>[1](https://02403.compute.dtu.dk/enotes/chapter9-glm-Python.pdf)</sup>。该框架涵盖了一族在研究中常规应用的模型，包括 t 检验、方差分析（ANOVA）、协方差分析（ANCOVA）以及一系列多元方法，全部通过普通最小二乘法进行估计<sup>[2](https://royalsocietypublishing.org/rsos/article/13/2/250076/480406/Sources-of-bias-in-general-linear-models)</sup>。线性最小二乘回归由高斯（Carl Friedrich Gauss）、勒让德（Adrien Marie Legendre），可能还有阿德里安（Robert Adrain）分别于德国、法国和美国在十八世纪末至十九世纪初发展起来<sup>[3](https://www.itl.nist.gov/div898/handbook/pmd/section1/pmd141.htm)</sup>；在相关分析、t 检验和方差分析于 1890 年至 1920 年间发展起来之后，后续工作认识到这些方法不过是一个一般模型的特殊情形<sup>[4](https://stats.libretexts.org/Bookshelves/Applied_Statistics/Mikes_Biostatistics_Book_(Dohm)/12%3A_One-way_Analysis_of_Variance/12.7%3A_Many_tests_one_model)</sup>。

| 关键事实 | 详情 |
|---|---|
| 定义形式 | \( Y = X\beta + \varepsilon \)，\( \varepsilon \sim N(0, \sigma^2 I) \)；任何能写成此形式的模型都是一般线性模型<sup>[1](https://02403.compute.dtu.dk/enotes/chapter9-glm-Python.pdf)</sup> |
| 特殊情形 | t 检验、方差分析、协方差分析、多元方差分析、简单回归与多元回归，其区别仅在于预测变量的类型和结果变量的数目<sup>[2](https://royalsocietypublishing.org/rsos/article/13/2/250076/480406/Sources-of-bias-in-general-linear-models)</sup><sup> • </sup><sup>[5](https://www.lesahoffman.com/CLDP944/CLDP944_Lecture02a_Review_GLM.pdf)</sup> |
| 普通最小二乘估计量 | \( \hat{\beta} = (X^{\mathrm{T}}X)^{-1}X^{\mathrm{T}}Y \)，其方差-协方差矩阵为 \( \sigma^2 (X^{\mathrm{T}}X)^{-1} \)<sup>[1](https://02403.compute.dtu.dk/enotes/chapter9-glm-Python.pdf)</sup> |
| 最优性 | 在 \( \{y, X\beta, I_n\} \) 下，普通最小二乘估计量是最佳线性无偏估计量（BLUE）；这就是高斯-马尔可夫定理<sup>[6](https://encyclopediaofmath.org/wiki/Best_linear_unbiased_estimation_in_linear_models)</sup> |
| 核心假设 | 误差服从正态分布、方差恒定、不相关（意味着独立）、均值为零<sup>[1](https://02403.compute.dtu.dk/enotes/chapter9-glm-Python.pdf)</sup><sup> • </sup><sup>[7](https://stats.oarc.ucla.edu/wp-content/uploads/2022/03/generalized_linear_new.html)</sup> |
| 名称陷阱 | 广义线性模型（英文名称中的 general 带有后缀“-ized”）是一个不同的、更大的框架；混淆两者是已有记载的隐患<sup>[8](https://mspeekenbrink.github.io/sdam-book/ch-generalized-linear-models.html)</sup> |
| 高维局限 | 当参数维数超过样本量时，经典的 F 统计量无法使用，因为 \( X^{\mathrm{T}}X \) 变为奇异矩阵<sup>[9](https://link.springer.com/article/10.1007/s10260-026-00834-3)</sup> |

## 数学表述

在标准表述中，\( Y \) 是 \( n \times 1 \) 的观测响应向量，\( X \) 是 \( n \times p \) 的固定常数设计矩阵，\( \beta \) 是 \( p \times 1 \) 的固定但未知的参数向量，\( \varepsilon \) 是 \( n \times 1 \) 的未观测随机误差向量；该模型之所以被称为线性，是因为 \( Y \) 的均值对 \( \beta \) 是线性的<sup>[10](https://people.stat.sc.edu/Tebbs/stat714/f10notes.pdf)</sup>。在高斯-马尔可夫模型中，\( X \) 是已知的 \( n \times p \) 模型矩阵，\( y \) 是可观测的 \( n \) 维随机向量，\( \varepsilon \) 的期望为 0，协方差为 \( \sigma^2 V \)，其中 \( V \) 已知且可能奇异<sup>[6](https://encyclopediaofmath.org/wiki/Best_linear_unbiased_estimation_in_linear_models)</sup>。逐案例来看，每个观测 \( i \) 有一个条件分布 \( [y_i \mid x_i] \)，其中 \( p \) 个回归参数 \( \beta \) 在所有案例上恒定，而误差变量随案例变化<sup>[11](https://ocw.mit.edu/courses/18-655-mathematical-statistics-spring-2016/b36cbb44af02cddb9dc42d92b767c462_MIT18_655S16_LecNote19.pdf)</sup>；等价地，假定 \( Y_i \) 服从均值为 \( \mu_i \)、方差为 \( \sigma^2 \) 的正态分布，其中 \( \mu_i = x_i'\beta \) 是 \( p \) 个预测变量的线性函数<sup>[12](https://grodri.github.io/glms/notes/a2s1.html)</sup>。

**各部分的含义。** 在简单线性回归 \( y = \beta_x x + \beta_0 + \varepsilon \) 中，系数 \( \beta_x \) 给出 \( x \) 每变化一个单位时 \( y \) 的期望变化量，\( \beta_0 \) 是总体偏移量<sup>[13](https://statsthinking21.github.io/statsthinking21-core-site/the-general-linear-model.html)</sup>。在一般线性回归中，协变量是 \( d \) 维向量，因此观测到 \( (Y_1, X_1), \ldots, (Y_n, X_n) \)，其中 \( X_i \in \mathbb{R}^d \)，模型写作 \( y \in \mathbb{R}^n \)、\( X \in \mathbb{R}^{n \times d} \)、\( \beta \in \mathbb{R}^d \)<sup>[14](https://www.stat.cmu.edu/~siva/teaching/700/lec17.pdf)</sup>。

**回归设计与方差分析设计。** “回归”一词通常用于矩阵 \( X \) 满秩的模型，而“方差分析”一词专指 \( X \) 仅含零和一的模型；两者都是同一个共同框架的特殊实例<sup>[10](https://people.stat.sc.edu/Tebbs/stat714/f10notes.pdf)</sup>。在设计矩阵中添加特殊构造的回归变量可以表达组别归属，从而实现方差分析，将简单回归扩展为一般线性模型中的多元回归<sup>[15](https://textbook.nipraxis.org/glm_intro.html)</sup>。方差分析的单因素、析因、重复测量和协方差分析形式，无非是多元相关/回归分析<sup>[16](https://www.tqmp.org/RegularArticles/vol04-2/p065/p065.pdf)</sup>。

## 假设与估计

形式化假设通常表述为关于结果变量条件分布的四个条件：（A1）条件均值的线性性 \( E\{Y_i \mid X\} = x_i\beta \)；（A2）同方差性，对所有 \( i \) 有 \( \mathrm{Var}\{Y_i \mid X\} = \sigma^2 \)；（A3）不相关性，对 \( i \neq j \) 有 \( \mathrm{Cov}\{Y_i, Y_j \mid X\} = 0 \)；（A4）正态性<sup>[17](https://pmc.ncbi.nlm.nih.gov/articles/PMC2820257/)</sup>。在经典表述中，误差项具有零均值、独立性、恒定方差和正态分布 \( \varepsilon \sim N(0, \sigma^2) \)<sup>[18](https://stats.oarc.ucla.edu/wp-content/uploads/2025/03/Generalized_Linear_Model_2025.html)</sup>。

**普通最小二乘法。** 假定 \( X^{\mathrm{T}}X \) 可逆且 \( Y \sim N(X\beta, \sigma^2 I) \)，则最小二乘估计量为 \( \hat{\beta} = (X^{\mathrm{T}}X)^{-1}X^{\mathrm{T}}Y \)，这是一个重要的估计量，满足 \( E[\hat{\beta}] = \beta \)，方差-协方差矩阵为 \( \sigma^2 (X^{\mathrm{T}}X)^{-1} \)<sup>[1](https://02403.compute.dtu.dk/enotes/chapter9-glm-Python.pdf)</sup>。普通最小二乘法最小化误差平方和，具有代数解，使得参数可以解析计算而非迭代计算<sup>[18](https://stats.oarc.ucla.edu/wp-content/uploads/2025/03/Generalized_Linear_Model_2025.html)</sup>。

**普通最小二乘法为何是最佳线性无偏估计量。** 无偏线性估计量 \( Gy \) 是 \( X\beta \) 的最佳线性无偏估计量（BLUE），当且仅当它在所有线性无偏估计量中具有 Löwner 偏序下的最小协方差矩阵；\( Gy \) 是 BLUE 当且仅当 \( G \) 满足基本方程 \( G(X : VX^{\perp}) = (X : 0) \)<sup>[6](https://encyclopediaofmath.org/wiki/Best_linear_unbiased_estimation_in_linear_models)</sup>。在模型 \( \{y, X\beta, I_n\} \) 下，\( X\beta \) 的普通最小二乘估计量显然是 BLUE；这一结果即高斯-马尔可夫定理<sup>[6](https://encyclopediaofmath.org/wiki/Best_linear_unbiased_estimation_in_linear_models)</sup>。2021 年的一篇论述证明了最小二乘估计量在均方误差意义下是最佳无偏线性估计量，并逼近理论极限<sup>[19](https://ar5iv.labs.arxiv.org/html/2105.04240)</sup>。最大似然也用作估计方法，固定效应通常通过 Wald 检验来检验，即使用估计量与其标准误之比<sup>[5](https://www.lesahoffman.com/CLDP944/CLDP944_Lecture02a_Review_GLM.pdf)</sup>。

**假设不满足时。** 普通最小二乘法的性质依赖于其统计假设；离群值或强影响案例也可能损害估计和推断<sup>[2](https://royalsocietypublishing.org/rsos/article/13/2/250076/480406/Sources-of-bias-in-general-linear-models)</sup>。当出现离群值、重尾分布或其他非正态特征时，经典估计量可能丧失大部分可靠性，产生有偏的参数估计和错误率过高的假设检验<sup>[20](https://cran.r-project.org/web/packages/heplots/vignettes/Robust.html)</sup>。正态性假设是参数统计检验所需要的，尤其是在小样本中；对于大样本量则并非必需<sup>[7](https://stats.oarc.ucla.edu/wp-content/uploads/2022/03/generalized_linear_new.html)</sup>。一份研究生课程讲义指出，对于非正态结果变量，最小二乘法完全不能使用<sup>[5](https://www.lesahoffman.com/CLDP944/CLDP944_Lecture02a_Review_GLM.pdf)</sup>，而 UCLA 的咨询材料则认为正态性主要影响小样本检验；实际的理解是，正态性决定的是小样本检验的有效性，而非估计的代数运算。

## 推断与模型评估

**t 检验与 F 检验。** 回归参数的 t 统计量是估计量除以其标准误，对零假设 \( \beta = 0 \) 进行检验，自由度为 \( N - p \)<sup>[13](https://statsthinking21.github.io/statsthinking21-core-site/the-general-linear-model.html)</sup>。对假设 \( \beta_{i,0} = 0 \) 的部分 t 检验与 III 型方差分析检验是等价的，即 \( t_{\mathrm{obs},i}^2 = F_i \)<sup>[1](https://02403.compute.dtu.dk/enotes/chapter9-glm-Python.pdf)</sup>。F 检验统计量为 \( F = \mathrm{MSH}/\mathrm{MSE} \)<sup>[21](https://store.fmi.uni-sofia.bg/fmi/statist/education/textbook/eng/stglm.html)</sup>。在所有一般线性模型情形中，推断统计量——t 值或 F 值——都来自对误差（残差）向量的分析，该向量具有相应的自由度<sup>[22](https://www.saskoer.ca/introtoappliedstatsforpsych/chapter/17-2-the-general-linear-model-glm-for-univariate-statistics/)</sup>。

关于自由度的说明：各文献对这些检验的误差自由度说法不一。NCSS 和索菲亚大学的材料给出误差自由度为 \( n - p - 1 \)，截距、模型、误差和校正总计的自由度分别为 1、\( p \)、\( n - p - 1 \) 和 \( n - 1 \)<sup>[23](https://www.ncss.com/wp-content/themes/ncss/pdf/Procedures/NCSS/General_Linear_Models-GLM_for_Fixed_Factors.pdf)</sup><sup> • </sup><sup>[21](https://store.fmi.uni-sofia.bg/fmi/statist/education/textbook/eng/stglm.html)</sup>，而 DTU 讲义和开放教材使用 \( N - p \)<sup>[1](https://02403.compute.dtu.dk/enotes/chapter9-glm-Python.pdf)</sup><sup> • </sup><sup>[13](https://statsthinking21.github.io/statsthinking21-core-site/the-general-linear-model.html)</sup>。差异反映了截距是否计入 \( p \) 个拟合参数之中，因此读者在报告自由度之前应核查所用软件或教材的参数计数方式。

**R² 与调整 R²。** \( R^2 \) 即决定系数，等于 \( \mathrm{SS}_{\mathrm{model}}/\mathrm{SS}_{\mathrm{total}} = 1 - \mathrm{SS}_{\mathrm{error}}/\mathrm{SS}_{\mathrm{total}} \)；只有一个预测变量时等于相关系数的平方，在通常的含截距模型中，其范围从零（无线性关系）到一（完全线性关系）<sup>[13](https://statsthinking21.github.io/statsthinking21-core-site/the-general-linear-model.html)</sup><sup> • </sup><sup>[23](https://www.ncss.com/wp-content/themes/ncss/pdf/Procedures/NCSS/General_Linear_Models-GLM_for_Fixed_Factors.pdf)</sup>。调整 R 方通过将残差均方误差除以总均方误差并从 1 中减去该结果来计算<sup>[4](https://stats.libretexts.org/Bookshelves/Applied_Statistics/Mikes_Biostatistics_Book_(Dohm)/12%3A_One-way_Analysis_of_Variance/12.7%3A_Many_tests_one_model)</sup>。模型的标准误是均方误差的平方根，其中均方误差为 SSE 除以自由度 \( N - p \)；斜率估计量的标准误是模型标准误除以 \( x \) 对其均值的偏差平方和的平方根<sup>[13](https://statsthinking21.github.io/statsthinking21-core-site/the-general-linear-model.html)</sup>。

## 线性框架内的扩展

**艾特肯模型与加权拟合。** 高斯-马尔可夫模型假定 \( E(\varepsilon) = 0 \) 且 \( \mathrm{cov}(\varepsilon) = \sigma^2 I \)；艾特肯模型将其放宽为 \( \mathrm{cov}(\varepsilon) = \sigma^2 V \)，其中 \( V \) 已知；一般线性混合模型则允许 \( \mathrm{cov}(\varepsilon) = \Sigma(\theta) \) 依赖于未知参数<sup>[10](https://people.stat.sc.edu/Tebbs/stat714/f10notes.pdf)</sup>。在 \( X \) 秩为 \( p \) 的普通线性模型中，广义最小二乘估计量最小化 \( (y - X\beta)^{\mathrm{T}}\Omega^{-1}(y - X\beta) \)<sup>[24](http://www2.stat.duke.edu/~pdh10/Teaching/721/Materials/notes.pdf)</sup>。该估计量也称为加权最小二乘估计量，尽管当 \( \Omega \) 为对角矩阵时这个术语更为恰当<sup>[24](http://www2.stat.duke.edu/~pdh10/Teaching/721/Materials/notes.pdf)</sup>。对于相关数据，一般线性模型假定 \( E(Y_i \mid X_i) = X_i\beta \)，即一个 \( (n_i \times p) \) 设计矩阵乘以一个 \( (p \times 1) \) 系数向量，加权最小二乘法产生的估计量最小化一个加权目标函数<sup>[25](https://faculty.washington.edu/heagerty/Courses/b571/handouts/LM-WLS%2BEDA.pdf)</sup>。

**混合模型。** 线性混合模型的形式为 \( y = X\beta + Z\gamma + \varepsilon \)，其中 \( \mathrm{cov}(\gamma) = D \)、\( \mathrm{cov}(\varepsilon) = R \)、\( \mathrm{cov}(\gamma, \varepsilon) = 0 \)，用随机效应扩展了固定效应框架<sup>[6](https://encyclopediaofmath.org/wiki/Best_linear_unbiased_estimation_in_linear_models)</sup>。

**秩亏。** 若 \( X'X \) 不满秩，则在自由度公式中以 \( r + 1 \) 代替 \( k \)，其中 \( r \) 为秩<sup>[21](https://store.fmi.uni-sofia.bg/fmi/statist/education/textbook/eng/stglm.html)</sup>。

## 与相关模型的比较

**广义线性模型。** 名称就是陷阱：广义线性模型极易与一般线性模型混淆，英文名称中有无后缀“-ized”至关重要<sup>[8](https://mspeekenbrink.github.io/sdam-book/ch-generalized-linear-models.html)</sup>。广义线性模型由内尔德（John Nelder）和韦德伯恩（R.W.M. Wedderburn）于 1972 年首次提出，作为一种统一算法将原本各自不同的回归模型统一起来<sup>[26](https://encyclopediaofmath.org/wiki/Generalized_linear_models)</sup>。它们通过允许因变量的条件分布服从任意指数族分布而非仅正态分布，扩展了一般线性模型<sup>[8](https://mspeekenbrink.github.io/sdam-book/ch-generalized-linear-models.html)</sup>。广义线性模型有三个组成部分：以指数族分布描述变异性的随机部分、作为线性模型 \( \beta_0 + \sum \beta_j X_j \) 的结构部分，以及连接两者的连接函数 \( g \)，即 \( g(\mu) = \beta_0 + \sum \beta_j X_j \)<sup>[8](https://mspeekenbrink.github.io/sdam-book/ch-generalized-linear-models.html)</sup>。等价地，广义线性模型由其连接函数 \( g \) 和方差函数 \( v(\mu) = b''(\theta(\mu)) \) 以及预测变量 \( x \) 共同确定<sup>[27](https://www.statsmodels.org/stable/glm.html)</sup>。

计算上的差异是结构性的。与一般线性模型不同，广义线性模型的参数通常没有闭式最大似然解，而是通过迭代重加权最小二乘法（IRLS）估计，这是一种迭代过程，不断更新猜测值直至收敛<sup>[8](https://mspeekenbrink.github.io/sdam-book/ch-generalized-linear-models.html)</sup>；IRLS 是最大似然的一种版本，称为 Fisher 得分法<sup>[26](https://encyclopediaofmath.org/wiki/Generalized_linear_models)</sup>。在 IRLS 中，权重固定，找到使加权残差平方和最小的参数值，更新权重，重复该过程直至权重稳定，其中权重包含一个与响应方差成反比的因子<sup>[28](https://pages.cs.wisc.edu/~st849-1/lectures/GLMH.pdf)</sup>。拟合优度传统上通过偏差和 Pearson 卡方统计量评估，值越低表示拟合越好，赤池信息准则和贝叶斯信息准则也已被普遍使用<sup>[26](https://encyclopediaofmath.org/wiki/Generalized_linear_models)</sup>。一般线性模型中使用的经典 F 统计量一般不适用于广义线性模型；似然比检验通常使用近似卡方分布评估，且在较小样本中似然比检验可能比 Wald 检验更有力和可靠<sup>[8](https://mspeekenbrink.github.io/sdam-book/ch-generalized-linear-models.html)</sup>。实例包括逻辑回归、泊松回归、对数线性模型，以及扩展到多项逻辑回归和广义线性混合效应模型<sup>[8](https://mspeekenbrink.github.io/sdam-book/ch-generalized-linear-models.html)</sup>。

**混合扩展。** 广义线性混合模型（GLMM）将广义线性模型与混合模型结合，用于二值数据等非正态响应，常用于纵向数据、重复测量、生物医学数据和聚类数据<sup>[29](https://www.math.unm.edu/~luyan/stat57918/intro.pdf)</sup>。

**正则化变体。** 当参数数目 \( p \) 超过样本量 \( n \) 时，岭回归或套索等正则化变体是解决病态最小二乘估计量的常用方案<sup>[9](https://link.springer.com/article/10.1007/s10260-026-00834-3)</sup>。

## 诊断与实践

**残差检查。** 推荐的检查包括：在 qq 图中使用标准化或学生化残差检验正态性，用残差对拟合值图检查方差齐性，关注杠杆值，以及检查自相关<sup>[1](https://02403.compute.dtu.dk/enotes/chapter9-glm-Python.pdf)</sup>。若线性模型正确设定，Pearson 残差应与拟合值和预测变量独立，以拟合值或预测变量为横轴绘制 Pearson 残差图时，应看不到系统性模式<sup>[30](https://us.sagepub.com/sites/default/files/upm-binaries/38503_Chapter6.pdf)</sup>。高杠杆观测可能极大地影响参数值，应予监控，但不必避免<sup>[1](https://02403.compute.dtu.dk/enotes/chapter9-glm-Python.pdf)</sup>。若某观测的杠杆值显著超过 \( p/n \)（系数数目除以观测数目），可视为高杠杆；推荐的阈值为 \( 2p/n \)<sup>[31](https://www.mathworks.com/help/stats/generalized-linear-model-workflow.html)</sup>。MATLAB 提供残差图，包括显示残差范围和频率的默认直方图，以及将残差分布与方差匹配的正态分布进行比较的概率图<sup>[32](https://www.mathworks.com/help/stats/generalized-linear-regression.html)</sup>。

**多重共线性。** 当某一预测变量列接近其他列的列空间时，会出现严重的多重共线性，可能极大地膨胀最小二乘估计量的方差，产生过宽的置信区间和毫无效力的假设检验<sup>[10](https://people.stat.sc.edu/Tebbs/stat714/f10notes.pdf)</sup>。

**补救措施。** 异方差性可以用异方差一致（HC）稳健标准误来抵消；GAMLj 按照 sandwich R 包的实现方式提供这些方法，并将 HC3 设为默认值（如包作者所推荐）<sup>[33](https://gamlj.github.io/book/glm.html)</sup>。当残差不服从正态分布时，可以使用自助法置信区间，因为其边界通过重抽样估计，无需假定残差分布形状<sup>[33](https://gamlj.github.io/book/glm.html)</sup>。对于稳健拟合，heplots R 包提供 robmlm()，使用迭代重加权最小二乘法拟合稳健多元线性模型，这是一种对离群观测降权的 M 估计方法<sup>[20](https://cran.r-project.org/web/packages/heplots/vignettes/Robust.html)</sup>。

**软件。** 几乎所有主流通用统计软件包都提供一般线性模型建模功能，包括 SAS、R、Stata、S-Plus、Genstat 和 SPSS<sup>[26](https://encyclopediaofmath.org/wiki/Generalized_linear_models)</sup>。在 R 中，函数 glm 运行广义线性模型，这正是该语言区分广义与一般线性模型的方式<sup>[7](https://stats.oarc.ucla.edu/wp-content/uploads/2022/03/generalized_linear_new.html)</sup>；glm 使用捕获连接函数和方差函数的 family 对象<sup>[34](https://glmnet.stanford.edu/book/other-glm.html)</sup>。statsmodels 支持使用单参数指数族进行估计<sup>[27](https://www.statsmodels.org/stable/glm.html)</sup>。对于非正态结果变量，SAS（GLIMMIX）和 Stata 中有相应的例程，而 SPSS 仅提供伪最大似然实现<sup>[5](https://www.lesahoffman.com/CLDP944/CLDP944_Lecture02a_Review_GLM.pdf)</sup>。

## 应用与近期发展

一般线性模型的经典领域是心理学、生物统计学、计量经济学和工程学中设计研究和观测数据的分析；一本 Springer 专著提出了在最小假设下从线性模型进行推断的统一理论，涵盖最小二乘理论和基于凸损失函数的替代估计，应用于计量经济学、工程学和优化理论<sup>[35](https://link.springer.com/book/10.1007/978-3-540-74227-2)</sup>。

**假设检查实践受到审视。** 2026 年的一项研究考察了心理学研究者拟合一般线性模型时是否检查普通最小二乘假设和离群值，采用大规模自我报告调查和实证分析任务研究<sup>[2](https://royalsocietypublishing.org/rsos/article/13/2/250076/480406/Sources-of-bias-in-general-linear-models)</sup>。文献中不断有呼声要求放弃普通最小二乘模型，改用更稳健的程序<sup>[36](https://royalsocietypublishing.org/rsos/article/13/9/rsos260516/483301/Sources-of-bias-in-general-linear-models-assessing)</sup>。

**高维推断。** 线性模型中用于检验参数向量的经典 F 统计量在球对称分布类中是稳健的，但当数据为高维时——即参数向量的维数超过样本量时——即使在正态性下也无法使用<sup>[9](https://link.springer.com/article/10.1007/s10260-026-00834-3)</sup>。2026 年的一篇文章引入了一种修正 F 统计量，其稳健性在有界四阶矩假设下扩展到高维情形，并扩展到线性混合模型<sup>[9](https://link.springer.com/article/10.1007/s10260-026-00834-3)</sup>。

**方差引导与稳健估计。** 2026 年的一篇文章引入了 varGuid（R）和 varguid（Python），即方差引导回归的开源实现，该方法估计协变量依赖的均值-方差关系，并利用它迭代重加权原始均值模型，从而放宽同方差假设；普通分析使用迭代重加权最小二乘法，稀疏分析使用迭代重加权套索<sup>[37](https://sage.cnpereading.com/doi/10.1177/01466216261470433)</sup>。由于设计矩阵和结果尺度均未改变，拟合的回归系数和方差分析对比可以直接与标准效应估计进行比较<sup>[37](https://sage.cnpereading.com/doi/10.1177/01466216261470433)</sup>。

**可组合的正则化拟合。** skglm 是一个用于正则化广义线性模型的开源 Python 包，完全兼容 scikit-learn API，可作为其估计器的直接替代品；它支持组合数据拟合项、惩罚项和求解器来拟合广泛的模型，其中许多不在 scikit-learn 中，如 Group Lasso 及其变体<sup>[38](https://jmlr.org/papers/volume26/24-0008/24-0008.pdf)</sup>。学习广义线性模型系数被表述为一个复合优化问题，即体现模型规格的数据拟合项与对解施加给定先验的惩罚项之和<sup>[38](https://jmlr.org/papers/volume26/24-0008/24-0008.pdf)</sup>。

## References

1. [DTU course notes, Chapter 9: The general linear model](https://02403.compute.dtu.dk/enotes/chapter9-glm-Python.pdf)
2. [Sources of bias in general linear models: evaluating the analytic practice in psychological research, Royal Society Open Science](https://royalsocietypublishing.org/rsos/article/13/2/250076/480406/Sources-of-bias-in-general-linear-models)
3. [NIST/SEMATECH e-Handbook: Linear Least Squares Regression](https://www.itl.nist.gov/div898/handbook/pmd/section1/pmd141.htm)
4. [Many tests, one model — Mike's Biostatistics Book (LibreTexts)](https://stats.libretexts.org/Bookshelves/Applied_Statistics/Mikes_Biostatistics_Book_(Dohm)/12%3A_One-way_Analysis_of_Variance/12.7%3A_Many_tests_one_model)
5. [A Re-Introduction to General Linear Models (GLM), Hoffman lecture notes](https://www.lesahoffman.com/CLDP944/CLDP944_Lecture02a_Review_GLM.pdf)
6. [Best linear unbiased estimation in linear models, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Best_linear_unbiased_estimation_in_linear_models)
7. [UCLA OARC Statistical Consulting: Generalized Linear Models](https://stats.oarc.ucla.edu/wp-content/uploads/2022/03/generalized_linear_new.html)
8. [Chapter 12 Generalized Linear Models, Statistics: Data analysis and modelling](https://mspeekenbrink.github.io/sdam-book/ch-generalized-linear-models.html)
9. [On the robustness of F statistic for high-dimensional general linear models, Statistical Methods & Applications](https://link.springer.com/article/10.1007/s10260-026-00834-3)
10. [Classical Theory of Linear Statistical Models, Stat 714 course notes, University of South Carolina](https://people.stat.sc.edu/Tebbs/stat714/f10notes.pdf)
11. [MIT OCW 18.655 Lecture 19: Gaussian Linear Models](https://ocw.mit.edu/courses/18-655-mathematical-statistics-spring-2016/b36cbb44af02cddb9dc42d92b767c462_MIT18_655S16_LecNote19.pdf)
12. [Statistics and Population: notes on generalized linear models](https://grodri.github.io/glms/notes/a2s1.html)
13. [Chapter 14 The General Linear Model, Statistical Thinking for the 21st Century](https://statsthinking21.github.io/statsthinking21-core-site/the-general-linear-model.html)
14. [CMU Lecture 17: General Linear Regression](https://www.stat.cmu.edu/~siva/teaching/700/lec17.pdf)
15. [Introduction to the general linear model, Nipraxis textbook](https://textbook.nipraxis.org/glm_intro.html)
16. [An Integrated Approach to Statistics, Tutorials in Quantitative Methods for Psychology](https://www.tqmp.org/RegularArticles/vol04-2/p065/p065.pdf)
17. [Global Validation of Linear Model Assumptions, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC2820257/)
18. [Generalized Linear Regression Models, UCLA OARC, 2025](https://stats.oarc.ucla.edu/wp-content/uploads/2025/03/Generalized_Linear_Model_2025.html)
19. [A Rigorous Introduction to Linear Models, arXiv:2105.04240](https://ar5iv.labs.arxiv.org/html/2105.04240)
20. [Robust Multivariate Linear Models, heplots vignette, CRAN](https://cran.r-project.org/web/packages/heplots/vignettes/Robust.html)
21. [General Linear Models (GLM) for Fixed Factors, Sofia University textbook](https://store.fmi.uni-sofia.bg/fmi/statist/education/textbook/eng/stglm.html)
22. [The General Linear Model (GLM) for Univariate Statistics, Saskatchewan OER](https://www.saskoer.ca/introtoappliedstatsforpsych/chapter/17-2-the-general-linear-model-glm-for-univariate-statistics/)
23. [General Linear Models (GLM) for Fixed Factors, NCSS documentation](https://www.ncss.com/wp-content/themes/ncss/pdf/Procedures/NCSS/General_Linear_Models-GLM_for_Fixed_Factors.pdf)
24. [Duke Statistics: Classical Theory of Linear Statistical Models](http://www2.stat.duke.edu/~pdh10/Teaching/721/Materials/notes.pdf)
25. [University of Washington Biostatistics: General Linear Model for Correlated Data](https://faculty.washington.edu/heagerty/Courses/b571/handouts/LM-WLS%2BEDA.pdf)
26. [Generalized linear models, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Generalized_linear_models)
27. [Generalized Linear Models, statsmodels documentation](https://www.statsmodels.org/stable/glm.html)
28. [Generalized linear models, University of Wisconsin lecture notes](https://pages.cs.wisc.edu/~st849-1/lectures/GLMH.pdf)
29. [Stat 579: Generalized Linear Models and Extensions, University of New Mexico](https://www.math.unm.edu/~luyan/stat57918/intro.pdf)
30. [Regression diagnostics chapter, SAGE](https://us.sagepub.com/sites/default/files/upm-binaries/38503_Chapter6.pdf)
31. [Generalized Linear Model Workflow, MATLAB & Simulink documentation](https://www.mathworks.com/help/stats/generalized-linear-model-workflow.html)
32. [Generalized Linear Models, MATLAB & Simulink documentation](https://www.mathworks.com/help/stats/generalized-linear-regression.html)
33. [Chapter 2 The General Linear Model, GAMLj documentation](https://gamlj.github.io/book/glm.html)
34. [Other GLMs, glmnet is (almost) all you need, Stanford](https://glmnet.stanford.edu/book/other-glm.html)
35. [Linear Models and Generalizations: Least Squares and Alternatives, Springer](https://link.springer.com/book/10.1007/978-3-540-74227-2)
36. [Sources of bias in general linear models: assessing researchers' understanding and self-reported practice, Royal Society Open Science](https://royalsocietypublishing.org/rsos/article/13/9/rsos260516/483301/Sources-of-bias-in-general-linear-models-assessing)
37. [varGuid: R and Python Implementations of Variance-Guided Regression, Applied Psychological Measurement](https://sage.cnpereading.com/doi/10.1177/01466216261470433)
38. [skglm: Improving scikit-learn for Regularized Generalized Linear Models, JMLR](https://jmlr.org/papers/volume26/24-0008/24-0008.pdf)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: 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/general-linear-model

English original: https://www.edgepedia.org/general-linear-model
