Geographically weighted regression (GWR) is a spatial statistical technique that recognizes that traditional ‘global’ regression models may be limited when spatial processes vary with spatial context. GWR captures process spatial heterogeneity by allowing effects to vary over space. To do this, GWR calibrates an ensemble of local linear models at any number of locations using ‘borrowed’ nearby data. This provides a surface of location-specific parameter estimates for each relationship in the model that is allowed to vary spatially, as well as a single bandwidth parameter that provides intuition about the geographic scale of the processes. A recent extension to this framework allows each relationship to vary according to a distinct spatial scale parameter, and is therefore known as multiscale (M)GWR. This paper introduces mgwr, a Python-based implementation of MGWR that explicitly focuses on the multiscale analysis of spatial heterogeneity. It provides novel functionality for inference and exploratory analysis of local spatial processes, new diagnostics unique to multi-scale local models, and drastic improvements to efficiency in estimation routines. We provide two case studies using mgwr, in addition to reviewing core concepts of local models. We present this in a literate programming style, providing an overview of the primary software functionality and demonstrations of suggested usage alongside the discussion of primary concepts and demonstration of the improvements made in mgwr.
A recent paper in this journal proposed a form of geographically weighted regression (GWR) that is termed parameter-specific distance metric geographically weighted regression (PSDM GWR). The central focus of the PSDM generalization of the GWR framework is that it allows the kernel function that weights nearby data to be specified with a distinct distance metric. As with the recent paper on Multiscale GWR (MGWR), the PSDM framework presents a form of GWR that also allows for parameter-specific bandwidths to be computed. As a result, a secondary focus of the PSDM GWR framework is to reduce the computational overhead associated with searching a massive parameter space to find a set of optimal parameter-specific bandwidths and parameter-specific distance metrics. In this comment, we discuss several concerns with the PSDM GWR framework in terms of model interpretability, complexity, and computational efficiency. We also recommend some best practices when using these models, suggest how to more holistically assess model variations, and set out an agenda to constructively focus future research endeavors.
Multiscale geographically weighted regression (MGWR) extends geographically weighted regression (GWR) by allowing process heterogeneity to be modeled at different spatial scales. While MGWR improves parameter estimates compared to GWR, the relationship between spatial scale and correlations within and among covariates—specifically spatial autocorrelation and collinearity—has not been systematically explored. This study investigates these relationships through controlled simulation experiments. Results indicate that spatial autocorrelation and collinearity affect specific model components rather than the entire model. Their impacts are cumulative but remain minimal unless they become very strong. MGWR effectively mitigates local multicollinearity issues by applying varying bandwidths across parameter surfaces. However, high levels of spatial autocorrelation and collinearity can lead to bandwidth underestimation for global processes, potentially producing false local effects. Additionally, strong collinearity may cause bandwidths to be overestimated for some processes, which helps mitigate collinearity but may obscure local effects. These findings suggest that while MGWR offers greater robustness against multicollinearity compared to GWR, bandwidth estimates should be interpreted with caution, as they can be influenced by strong spatial autocorrelation and collinearity. These results have important implications for empirical applications of MGWR.