MGWR & SDM Regime Analysis

Does One Model Fit the Whole City?

Two spatial-regression approaches — Multiscale Geographically Weighted Regression (MGWR) and a five-regime Spatial Durbin Model (SDM) — applied to the same 1,493-cell Dortmund landscape-metrics grid, testing whether the drivers of built-up and vegetation fragmentation are stationary across the city or fundamentally different sector by sector.
Python mgwr spreg (ML_Lag, regimes) libpysal Leaflet
Setup

One Grid, Three Metrics, Two Modeling Strategies

1,493 grid cells across Dortmund's Stadtbezirke, three landscape-pattern metrics as dependent variables (Built-up Patch Density, Vegetation Cohesion, Vegetation Patch Density), each modelled for 2015, 2025, and 2035, against 20 standardized landscape covariates and their spatial lags.

Grid cells1,493 Metrics × years3 × 3 = 9 models Covariates20 (+ spatial lags) WeightsQueen contiguity
01 — Multiscale GWR

Letting Each Variable Choose Its Own Bandwidth

Standard GWR forces every covariate to vary over the same spatial scale. MGWR instead lets each variable's coefficient select its own optimal bandwidth — some end up essentially global (a citywide constant relationship), others highly local (a relationship that changes block by block).

Global OLS vs. MGWR fit

MGWR closes 30–60% of the unexplained variance the global model leaves behind

Across all nine metric/year combinations, letting relationships vary spatially improves fit substantially — most dramatically for the two patch-density metrics, where a citywide model explains barely half the variance.

Bar chart comparing global OLS R-squared to MGWR R-squared for nine landscape metric and year combinations
Global regression R² vs. MGWR R², by metric and year
MetricYearGlobal R²MGWR R²Gain
Built-up PD20150.5450.889+0.344
Built-up PD20250.5890.810+0.221
Built-up PD20350.5610.867+0.306
Veg. Cohesion20150.8780.918+0.040
Veg. Cohesion20250.8870.928+0.041
Veg. Cohesion20350.9210.934+0.013
Veg. PD20150.5180.811+0.293
Veg. PD20250.5310.845+0.314
Veg. PD20350.5200.836+0.316

Vegetation Cohesion is the exception: it's already well explained by a single global relationship (R² 0.88–0.92), so allowing local variation adds comparatively little (+0.01 to +0.04). Built-up and Vegetation Patch Density, by contrast, are exactly the metrics where a citywide average coefficient hides most of the story — their true drivers vary sharply from one part of Dortmund to another, which is what motivates the regime-based approach below.

02 — Spatial Durbin Regimes

Five City Sectors, Five Different Models

Rather than let every cell have its own coefficient (MGWR's approach), the regime SDM groups Dortmund's 12 Stadtbezirke into five city sectors — Core, North, East, South, West — and fits a fully separate Spatial Durbin Model (direct + spillover effects, its own spatial autoregressive parameter ρ) within each. A Chow test then asks: are these five models actually different, or would one model do?

Regimes5 city sectors Chow test, all 9 modelsp < 0.001 VerdictStructurally different
Built-up Patch Density, city sector fit

Core City fits best in 2015; West City starts worst, catches up by 2035

Every regime beats the global model in most years — but not evenly, and not consistently over time. West City actually falls below the global R² in 2015 (0.49 vs. 0.51), then improves past it in 2025–2035 as the city's western districts urbanize; Core City's advantage, by contrast, narrows sharply after 2015.

Grouped bar chart of Spatial Durbin Model regime R-squared by city sector and year for Built-up Patch Density, with a dashed line for the 2015 global R-squared
Regime-specific model fit by city sector, 2015 / 2025 / 2035 (Built-up PD)
Open interactive regime-zone map

Click any sector on the map for its regime-specific R² across all three metrics and all three years.

Same variable, opposite effect

A metric that hurts locally can help through spillover — and the reverse

The Spatial Durbin specification separates each covariate's direct effect (this cell's own value) from its indirect effect (spillover from neighbouring cells). For Built-up PD (2015, citywide model), change_lsi (change in landscape shape index) has a strongly negative direct effect (−1.45) but a larger positive indirect effect (+2.07) — neighbourhoods where shape complexity is rising tend to suppress their own patch density while inadvertently pushing it up next door.

VariableDirectIndirect (spillover)Total
change_lsi−1.448+2.065+0.655
change_total_edge+0.987−1.363−0.399
2015_te (total edge)−0.450−0.012−0.491

This sign-flip pattern is regime-specific too: in North City, change_lsi's total impact is +11.01 (strongly positive) — the opposite direction from its −6.92 total impact in Core City. The same physical process pushes patch density up in one sector and down in another.

03

Methods & Tools

Multiscale GWRAdaptive bisquare kernel, per-variable bandwidth selection (AICc), local R² diagnostics
Spatial Durbin ModelML spatial lag with SLX terms, direct/indirect/total impact decomposition
Regime Modeling5-sector structural-break specification, Chow test for regime equality
Weights & DiagnosticsQueen contiguity, z-standardization, spatial lag construction
Geospatial OutputGeoPandas dissolve, Leaflet interactive regime map
Librariesmgwr, spreg, libpysal, GeoPandas