# 空间自回归模型

空间自回归（SAR）模型是一种回归模型，其中每个位置上的因变量部分取决于相邻位置上该变量的取值，这种依赖通过空间权重矩阵和一个标量自回归参数引入。该模型广泛用于空间统计学和空间计量经济学中，处理表现出空间依赖性的结果变量，例如房产价值。<sup>[1](http://econweb.umd.edu/~kelejian/research/P071897.PDF)</sup>

基本设定将结果向量写为 \( y = \rho \cdot W \cdot y + X \cdot \beta + \varepsilon \)，其中 \( W \) 是一个预先设定的 \( n \times n \) 空间权重矩阵，\( \rho \) 衡量空间交互的强度，\( X \) 汇集外生协变量，\( \varepsilon \) 是扰动向量。<sup>[1](http://econweb.umd.edu/~kelejian/research/P071897.PDF)</sup> 在其最简单的形式中，该模型仅考虑因变量中的空间溢出效应，将每个单元的结果表示为其他单元结果的加权平均加上一个扰动项。<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC2888178/)</sup>

| 关键事实 | 详情 |
|---|---|
| 核心方程 | \( y = \rho \cdot W \cdot y + X \cdot \beta + \varepsilon \)，其中 \( |\rho| < 1 \)<sup>[1](http://econweb.umd.edu/~kelejian/research/P071897.PDF)</sup> |
| 权重矩阵 | \( W \) 为 \( n \times n \)，对角线为零，通常行标准化使每行之和为 1<sup>[3](https://www.statsref.com/HTML/sar_models.html)</sup> |
| 自回归参数 | \( \rho \) 量化空间关联的强度，通常介于 −1 和 1 之间<sup>[4](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0327316)</sup> |
| OLS 为何失效 | \( W \cdot y \) 与 \( \varepsilon \) 相关，因此 OLS 不一致<sup>[1](http://econweb.umd.edu/~kelejian/research/P071897.PDF)</sup> |
| 标准估计量 | 最大似然和广义空间两阶段最小二乘（GS2SLS）<sup>[5](https://econ.umd.edu/sites/www.econ.umd.edu/files/pubs/SJ_SPREG%282013%29.pdf)</sup> |
| 空间乘数 | \( x \) 的均匀变化的总效应为 \( \beta / (1 - \rho) \)<sup>[6](https://pysal.org/spreg/notebooks/13_ML_estimation_spatial_lag.html)</sup> |
| 计算成本 | 行列式和逆矩阵的成本按 \( n^3 \) 比例增长；稀疏矩阵方法可大幅降低<sup>[7](https://onlinelibrary.wiley.com/doi/10.1111/j.1538-4632.1997.tb00959.x)</sup> |

## 工作原理

空间滞后项 \( W \cdot y \) 是相邻单元结果的加权平均。对 \( W \) 进行行标准化使每行之和为 1，就使该项成为相邻值的字面意义上的加权平均。<sup>[3](https://www.statsref.com/HTML/sar_models.html)</sup> \( W \) 可以由邻接矩阵、距离矩阵或遵循特定规则的标准化矩阵构建<sup>[4](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0327316)</sup>；与条件自回归（CAR）模型不同，SAR 模型中的 \( W \) 不必是对称的。<sup>[3](https://www.statsref.com/HTML/sar_models.html)</sup>

求解模型得到简化形式 \( y = (I - \rho \cdot W)^{-1} X \cdot \beta + (I - \rho \cdot W)^{-1} \varepsilon \)。<sup>[5](https://econ.umd.edu/sites/www.econ.umd.edu/files/pubs/SJ_SPREG%282013%29.pdf)</sup> 记 \( A = I - \rho \cdot W \)，均衡解 \( y = A^{-1}X\beta + A^{-1}\varepsilon \) 意味着 \( \mathrm{Var}(y) = \sigma^2 A^{-1} \cdot A^{-1\prime} \)，因此每个观测值都与所有其他观测值相关。<sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S0304407606000509)</sup><sup> • </sup><sup>[24](https://pysal.org/spreg/notebooks/7_spatial_models.html)</sup> 这就是全局溢出的机制：对一个单元的冲击通过邻居网络传播。如果解释变量的变化在所有观测值上均匀，空间乘数为 \( 1/(1 - \rho) \)，因此 \( x_k \) 变化的总效应为 \( \beta_k / (1 - \rho) \)。<sup>[6](https://pysal.org/spreg/notebooks/13_ML_estimation_spatial_lag.html)</sup>

## 操作方式

实践者首先由邻接矩阵、距离矩阵或遵循特定规则的标准化矩阵构建 \( W \)，并通常对其进行行标准化使每行之和为 1。<sup>[4](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0327316)</sup><sup> • </sup><sup>[3](https://www.statsref.com/HTML/sar_models.html)</sup> 模型选择应与实质性概念化相匹配：SAR 滞后适合相邻价格影响价格这类结果，空间滞后解释变量（SLX）适合周围房产状况这类暴露，空间误差模型（SEM）适合邻里声誉这类未测量的影响。<sup>[9](https://gistbok-ltb.ucgis.org/current/print/concept/AM-03-032)</sup>

设定检验在估计之前或与估计同时进行。安塞林的拉格朗日乘数诊断在存在空间滞后因变量和异方差性的情况下正式检验空间残差自相关。<sup>[10](https://doi.org/10.1111/j.1538-4632.1988.tb00159.x)</sup>

由于 \( \rho \neq 0 \) 使回归系数具有误导性，所报告的效应应是由 \( (I - \rho \cdot W)^{-1} \) 计算出的直接和间接影响：勒萨日和佩斯的平均直接效应（ADI）、平均间接效应（AII）和平均总效应（ATI），其中直接效应包含反馈因而不同于 \( \beta \)。<sup>[6](https://pysal.org/spreg/notebooks/13_ML_estimation_spatial_lag.html)</sup> 当空间系数非零时，应报告这些全局溢出效应而非回归系数。<sup>[11](https://r-spatial.org/book/17-Econometrics.html)</sup>

## 起源

高斯空间自回归设定要求 \( (I - B)^{-1} \) 存在以使协方差有定义。<sup>[12](https://repository.library.noaa.gov/view/noaa/54947/noaa_54947_DS1.pdf)</sup> 凯莱健和普鲁查将广泛引用的版本描述为惠特尔模型的变体<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC2888178/)</sup>；引入了两种单参数自回归形式，一种用于因变量 \( (W \cdot y) \)，一种用于误差项 \( (W \cdot e) \)。<sup>[13](https://brsa.org.br/wp-content/uploads/wpcf7-submissions/32125/SPATIAL-ECONOMETRIC-MODEL-SPECIFICATION-SEARCH.pdf)</sup> 这些单空间参数模型的最大似然计算使用迭代方法。<sup>[11](https://r-spatial.org/book/17-Econometrics.html)</sup>

卢克·安塞林 1988 年的著作《空间计量经济学：方法与模型》，出版于“操作区域科学研究”丛书，以空间自回归模型的类型学和空间滞后/误差的区分整合了该领域<sup>[14](https://doi.org/10.1007/978-94-015-7799-1)</sup>，其 1988 年发表于《地理分析》的论文推导了空间依赖性和异质性的 LM 检验诊断。<sup>[10](https://doi.org/10.1111/j.1538-4632.1988.tb00159.x)</sup> 在估计方面，哈里·H·凯莱健和英格玛·R·普鲁查于 1998 年在《房地产金融与经济学期刊》上提出了针对带自回归扰动模型的广义空间两阶段最小二乘程序<sup>[15](https://doi.org/10.1023/a:1007707430416)</sup>，R·凯利·佩斯和罗纳德·巴里于 1997 年在《地理分析》上发表了空间自回归估计量的快速稀疏矩阵计算。<sup>[7](https://onlinelibrary.wiley.com/doi/10.1111/j.1538-4632.1997.tb00959.x)</sup>

## 变体

凯莱健–普鲁查模型或 SAC 模型同时保留空间滞后和空间自回归扰动；空间杜宾模型（SDM）同时加入 \( X \) 和 \( y \) 的空间滞后。<sup>[9](https://gistbok-ltb.ucgis.org/current/print/concept/AM-03-032)</sup> 一般嵌套空间（GNS）设定类似于曼斯基邻里效应模型，但在实证研究中很少使用。<sup>[9](https://gistbok-ltb.ucgis.org/current/print/concept/AM-03-032)</sup> 勒萨日（2014）认为 SDM 和 SDEM 最适合进行有意义的解释，建议以 SDEM 作为局部溢出的起点、SDM 作为全局溢出的起点。<sup>[9](https://gistbok-ltb.ucgis.org/current/print/concept/AM-03-032)</sup>

## 应用

应用集中于具有合理邻居交互的横截面结果；一个典型例子是解释房产价值的空间模型，其中每个位置的价值与相邻位置的房产价值相关。<sup>[1](http://econweb.umd.edu/~kelejian/research/P071897.PDF)</sup> 这种跨单元交互在社会科学、生物统计和地理科学模型中都有意义。<sup>[16](https://econweb.umd.edu/~prucha/Papers/SJ_SPIVREG%282013%29.pdf)</sup> 软件实现包括 spreg Python 包（PySAL），提供空间滞后模型的 ML 估计和高阶 GMM 估计量<sup>[6](https://pysal.org/spreg/notebooks/13_ML_estimation_spatial_lag.html)</sup><sup> • </sup><sup>[17](https://pysal.org/spreg/notebooks/17_GMM_higher_order.html)</sup>，R 的 spatialreg、GeoDa，以及 Stata 的 spregress、spivregress 和 spxtregress。<sup>[18](https://www.stata.com/manuals/sp.pdf)</sup>

## 局限与替代方案

**估计。** OLS 不一致，因为 \( W \cdot y \) 与扰动相关。<sup>[1](http://econweb.umd.edu/~kelejian/research/P071897.PDF)</sup><sup> • </sup><sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S0304407606000509)</sup> ML 估计量的正式渐近性质包括 \( n \)-一致性、正态性和渐近有效性。<sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S0304407606000509)</sup> ML 需要对数行列式雅可比 \( \ln|I - \rho \cdot W| \)，在大数据集上会遇到数值困难；spreg 实现三种计算方法（full、ord、LU），仅在该项的计算方式上不同。<sup>[6](https://pysal.org/spreg/notebooks/13_ML_estimation_spatial_lag.html)</sup> 朴素空间估计量用行列式、特征值和逆矩阵处理 \( n^2 \) 个关系，其成本按 \( n^3 \) 比例增长，但利用 \( W \) 的稀疏性可大幅削减。<sup>[7](https://onlinelibrary.wiley.com/doi/10.1111/j.1538-4632.1997.tb00959.x)</sup> GeoDa 实现基于近似的最优 ML 方法，更适合较大数据集，但不支持空间杜宾设定。<sup>[6](https://pysal.org/spreg/notebooks/13_ML_estimation_spatial_lag.html)</sup>

GS2SLS 估计量在未知形式异方差性的扰动下保持一致性，而 ML 在 IID 情况下一致但一般在异方差性下不一致。<sup>[5](https://econ.umd.edu/sites/www.econ.umd.edu/files/pubs/SJ_SPREG%282013%29.pdf)</sup> 基于线性和二次矩的最佳 GMM 估计量计算简单，在正态性下渐近效率与 ML 相同，在其他情况下渐近效率高于高斯 QML。<sup>[19](https://ideas.repec.org/a/eee/econom/v159y2010i2p303-319.html)</sup>

**失效模式。** 估计以 \( W \) 为条件，即使对 \( W \) 的误设仅相差一个常数，也会导致估计不一致；基于回归的 K 检验可以检测 \( W \) 在期望意义上被高估一个常数的情况。<sup>[20](https://www.cambridge.org/core/journals/political-analysis/article/measurement-error-and-the-specification-of-the-weights-matrix-in-spatial-regression-models/1052D59CCDB8FA7BAA051B2739C966E4)</sup> 内生权重会使常规估计产生偏差并使推断失效；权重外生性的调整 LM 检验在零假设下服从中心卡方分布，无论真实模型是否包含空间滞后。<sup>[21](https://www.sciencedirect.com/science/article/abs/pii/S0166046217301801)</sup> GNS 模型的完整参数集不可识别，因此无法应用 ML，且 SAR-SAR 模型的 ML 估计存在“香蕉”收敛问题，在空间参数的估计之间切换；IV/GMM 估计是实用的替代方案。<sup>[17](https://pysal.org/spreg/notebooks/17_GMM_higher_order.html)</sup>

**近期发展。** 胡贝尔 IV 和胡贝尔 GMM 估计量将稳健性扩展到重尾扰动，仅需一阶矩存在，而传统 ML 和 GMM 需要四阶以上矩。<sup>[22](https://www.cambridge.org/core/journals/econometric-theory/article/robust-estimation-for-the-spatial-autoregressive-model/6B6AA2026F503D8A39D8EB621768197D)</sup> 2024 年一种针对异质性 SAR 模型的半参数贝叶斯方法使用非参数函数的 B 样条近似，配合吉布斯和 Metropolis–Hastings 采样。<sup>[23](https://www.mdpi.com/1099-4300/26/6/498)</sup> 已发表的比较既未调查 \( \rho \) 的典型经验值，也未将 SAR 与地理加权回归或机器学习混合方法进行比较。

## References

1. [A Generalized Spatial Two Stage Least Squares Procedure for Estimating a Spatial Autoregressive Model with Autoregressive Disturbances (Kelejian & Prucha)](http://econweb.umd.edu/~kelejian/research/P071897.PDF)
2. [Specification and Estimation of Spatial Autoregressive Models with Autoregressive and Heteroskedastic Disturbances (Kelejian & Prucha)](https://pmc.ncbi.nlm.nih.gov/articles/PMC2888178/)
3. [StatsRef: SAR models](https://www.statsref.com/HTML/sar_models.html)
4. [Characterization and estimation of heterogeneous spatial autocorrelation in spatial autoregressive models (PLOS One)](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0327316)
5. [Maximum likelihood and generalized spatial two-stage least-squares estimators for a spatial-autoregressive model with spatial-autoregressive disturbances (Drukker, Egger, Prucha; Stata Journal 2013)](https://econ.umd.edu/sites/www.econ.umd.edu/files/pubs/SJ_SPREG%282013%29.pdf)
6. [Maximum Likelihood Estimation - Spatial Lag Model, spreg Manual](https://pysal.org/spreg/notebooks/13_ML_estimation_spatial_lag.html)
7. [Quick Computation of Spatial Autoregressive Estimators (Barry & Pace, Geographical Analysis, 1997)](https://onlinelibrary.wiley.com/doi/10.1111/j.1538-4632.1997.tb00959.x)
8. [Finite sample properties of maximum likelihood estimator in spatial models (Journal of Econometrics)](https://www.sciencedirect.com/science/article/abs/pii/S0304407606000509)
9. [UCGIS GIS&T BoK [AM-03-032] Spatial Autoregressive Models](https://gistbok-ltb.ucgis.org/current/print/concept/AM-03-032)
10. [Luc Anselin (1988). Lagrange Multiplier Test Diagnostics for Spatial Dependence and Spatial Heterogeneity. Geographical Analysis.](https://doi.org/10.1111/j.1538-4632.1988.tb00159.x)
11. [Spatial Econometrics Models – Spatial Data Science (Bivand et al.)](https://r-spatial.org/book/17-Econometrics.html)
12. [Spatial autoregressive models for statistical inference from ecological data](https://repository.library.noaa.gov/view/noaa/54947/noaa_54947_DS1.pdf)
13. [Spatial Econometric Model Specification Search](https://brsa.org.br/wp-content/uploads/wpcf7-submissions/32125/SPATIAL-ECONOMETRIC-MODEL-SPECIFICATION-SEARCH.pdf)
14. [Luc Anselin (1988). Spatial Econometrics: Methods and Models. Studies in operational regional science.](https://doi.org/10.1007/978-94-015-7799-1)
15. [Harry H. Kelejian, Ingmar R. Prucha (1998). A Generalized Spatial Two-Stage Least Squares Procedure for Estimating a Spatial Autoregressive Model with Autoregressive Disturbances. The Journal of Real Estate Finance and Economics.](https://doi.org/10.1023/a:1007707430416)
16. [SJ SPIVREG(2013) (econweb.umd.edu)](https://econweb.umd.edu/~prucha/Papers/SJ_SPIVREG%282013%29.pdf)
17. [GMM Estimation - Higher Order Models, spreg Manual](https://pysal.org/spreg/notebooks/17_GMM_higher_order.html)
18. [Stata Spatial Autoregressive Models Reference Manual](https://www.stata.com/manuals/sp.pdf)
19. [An efficient GMM estimator of spatial autoregressive models (Journal of Econometrics, 2010)](https://ideas.repec.org/a/eee/econom/v159y2010i2p303-319.html)
20. [Measurement Error and the Specification of the Weights Matrix in Spatial Regression Models (Political Analysis)](https://www.cambridge.org/core/journals/political-analysis/article/measurement-error-and-the-specification-of-the-weights-matrix-in-spatial-regression-models/1052D59CCDB8FA7BAA051B2739C966E4)
21. [Simple tests for endogeneity of spatial weights matrices](https://www.sciencedirect.com/science/article/abs/pii/S0166046217301801)
22. [Robust Estimation for the Spatial Autoregressive Model (Econometric Theory)](https://www.cambridge.org/core/journals/econometric-theory/article/robust-estimation-for-the-spatial-autoregressive-model/6B6AA2026F503D8A39D8EB621768197D)
23. [A Semiparametric Bayesian Approach to Heterogeneous Spatial Autoregressive Models (Entropy, 2024)](https://www.mdpi.com/1099-4300/26/6/498)
24. [Spatial Model Specifications, spreg v1.9.2.dev3+g4dbc80924 Manual](https://pysal.org/spreg/notebooks/7_spatial_models.html)

---
*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 › Regression analysis

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/spatial-autoregressive-model

English original: https://www.edgepedia.org/spatial-autoregressive-model
