Mixed GWR: A Semiparametric Spatial Model
- Mixed GWR is a semiparametric model that separates spatially varying and globally fixed predictors for enhanced clarity in spatial data analysis.
- It employs local weighted least squares with a common adaptive bandwidth to estimate spatially local coefficients and global effects simultaneously.
- By balancing model parsimony, interpretability, and computational efficiency, Mixed GWR reduces overfitting compared to fully local models.
Mixed Geographically Weighted Regression (Mixed GWR, MX-GWR) represents a semiparametric extension within the family of Geographically Weighted Regression models, designed to accommodate settings in which some predictor–response relationships are spatially non-stationary, while others are effectively constant across the study region. By enabling a flexible partition of predictors into spatially varying and globally fixed subsets, mixed GWR balances model parsimony, interpretability, and spatial fidelity, filling the gap between standard GWR (all local coefficients) and multiscale GWR (all local coefficients, predictor-specific bandwidths). This formulation is central in contemporary spatial analysis, where the spatial scale and heterogeneity of relationships are empirically data-driven and domain-specific.
1. Theoretical Basis and Model Definition
Mixed GWR generalizes the standard GWR framework by splitting the set of predictors into those with spatially varying coefficients and those with fixed, global coefficients. For observations with spatial coordinates , a response , and predictors , the model is
where and denote the indices of spatially varying and fixed predictors, respectively; are spatially local coefficients; are global coefficients; and is iid Gaussian noise. The local coefficients and intercept are estimated via spatially weighted least squares with a kernel 0, where 1 is the spatial distance between 2 and 3, and 4 is a common bandwidth for all varying terms. The fixed coefficients are estimated globally across all data (Comber et al., 2020).
2. Rationale and Model Selection
MX-GWR is motivated by empirical findings that not all relationships in spatial data exhibit heterogeneity at the same spatial scale, or at all. Spatial processes may involve both stationary effects (e.g., a regional climatic variable) and local effects (e.g., soil texture variations). The MS-GWR bandwidth analysis enables the identification of which coefficients are effectively global (bandwidth at or near the spatial domain size) and which are local. MX-GWR is preferred when several bandwidths in MS-GWR analysis cluster tightly at a small scale (local variation), while others are maximal (indicating global stationarity), justifying a model that fits local coefficients only where needed (Comber et al., 2020).
This approach reduces overfitting relative to standard or multiscale GWR, simplifies interpretation (fewer local coefficient surfaces), and is computationally less demanding than fully multiscale approaches, especially as the number of predictors grows.
3. Estimation and Optimization Procedures
At each location 5, estimation proceeds by minimizing the weighted sum of squared errors:
6
with 7 the row vector of local predictors (including intercept), 8 the row vector of global predictors, 9 the vector of local coefficients at 0, and 1 the fixed coefficients.
The estimation follows an iterative backfitting algorithm:
- Initialize 2 globally (e.g., OLS).
- Holding 3 fixed, estimate all local coefficients 4 via local weighted least squares at each 5.
- Holding all 6 fixed, update 7 with global weighted least squares.
- Repeat until parameter convergence.
A single adaptive or fixed spatial bandwidth 8 for the kernel is selected to minimize criterion such as the corrected Akaike Information Criterion (AICc):
9
where 0 is the smoothing (hat) matrix for the current model (Comber et al., 2020). The local weight function usually adopts the bi-square kernel,
1
ensuring spatial decay of influence.
4. Model Diagnostics and Practical Selection
A structured model selection framework, as outlined by Comber et al., involves fitting:
- Global OLS model to assess baseline AICc and residual spatial autocorrelation.
- MS-GWR to retrieve per-coefficient bandwidths.
- MX-GWR if bandwidths split into tightly clustered local and maximal global sets.
Model selection relies on AICc comparisons:
| Model | AICc Example (Loess Plateau) |
|---|---|
| OLS | 1124.0 |
| MX-GWR | 1065.9 |
| MS-GWR | 1050.4 |
MX-GWR is favored over OLS and standard GWR when several effects can be held stationary; MS-GWR outperforms only when predictors exhibit distinct local scales (Comber et al., 2020). Additional diagnostics include pseudo t-tests for local coefficients, mapping of local estimates for plausibility, and residual spatial autocorrelation.
5. Empirical Illustration: Loess Plateau Soil–Nitrogen Case
In the Loess Plateau case (Comber et al. 2020), the response is log-soil total nitrogen (STN), with predictors SOC, NO₃, NH₄, %clay, %silt, %sand:
- MS-GWR analysis identified that interception, %silt, and NO₃ varied locally (bandwidth 2700 m), while SOC, %clay, and NH₄ were spatially stationary (33740 m, the region size).
- MX-GWR specification:
- Fixed: SOC, %clay, NH₄
- Local: intercept, %silt, NO₃
- Estimated global coefficients: 4 (5), 6 (7), 8 (9).
- Spatial surfaces for 0 and 1 revealed substantial local heterogeneity, including sign changes for NO₃ in parts of the region.
- MX-GWR yielded a large AICc improvement over OLS and avoided overfitting relative to MS-GWR, while retaining interpretability (Comber et al., 2020).
6. Implementation and Computational Aspects
MX-GWR is implemented in R (GWmodel) and Python (mgwr), requiring:
- Preparation of spatial coordinates, designation of local/fixed predictors.
- Adaptive or fixed bandwidth selection via AICc.
- Iterative fit via weighted least squares for local and global coefficients.
Example R pseudocode:
3
For large 2, use centered predictors and parallel implementations to alleviate computational bottlenecks. MX-GWR adds little computational cost over standard GWR and is considerably more efficient than MS-GWR when the number of varying terms is small.
7. Limitations, Extensions, and Relation to Other GWR Variants
MX-GWR is distinct from:
- Standard GWR: All coefficients vary locally; single spatial bandwidth.
- MS-GWR: All coefficients vary locally; each with its own bandwidth.
- M-SGWR: Predictor-specific weights blend geographic and attribute similarity (Lessani et al., 27 Jan 2026).
MX-GWR is advantageous when a subset of coefficients are globally stationary, reducing overfitting and enhancing interpretability. However, the use of a single bandwidth for all local terms is limiting when individually distinct spatial scales are present among local effects—MS-GWR or M-SGWR are preferred in such settings. Current implementations provide diagnostic tools, but care is required in inference, especially considering multiple testing and collinearity among predictors.
Mixed GWR thus occupies an intermediate and valuable position within the taxonomy of spatial regression methods, balancing parsimony, computational efficiency, and the capacity to reveal latent spatial heterogeneity in predictor–response relationships (Comber et al., 2020).