Why MGWR? Why allow each variable its own bandwidth?
A single regression line for all 514 Indonesian districts says poorer regions catch up at rate β = −0.195. But what if that average hides huge geographic variation — strong catching-up in Sumatra, none at all in Papua, divergence in a handful of mining districts? Multiscale Geographically Weighted Regression (MGWR) fits one regression at every location, with each variable allowed to operate at its own spatial scale.
This app lets you turn the dials yourself. In four tabs you will: watch a smoothing parameter sweep from "very local" to "essentially global" and see the bias-variance trade-off in real time; see how spatial heterogeneity in the data-generating process turns one global coefficient into a whole map of local ones; and explore the headline contrast between Global OLS (R² = 0.21) and MGWR (R² = 0.76) from the Indonesia analysis.
Hard vs soft selection — and why bandwidth is the analogue of a penalty knob
The animation below shows two ways of "borrowing strength" from data: a hard threshold (orange — coefficient goes to zero abruptly, like LASSO selection) and a soft shrinkage (steel blue — coefficient decays smoothly, like a Gaussian kernel). The same idea sits inside GWR: a tight bandwidth keeps very few neighbours (local, noisy); a wide bandwidth keeps many (smooth, but it averages out the heterogeneity MGWR exists to find).
Bandwidth Lab
Sweep a kernel-bandwidth analogue and watch how many "neighbours" each local model uses. Smaller bandwidth = noisier, more local; larger = smoother, more global.
Global vs Local
Same data, two estimators. The asymmetry slider turns spatial heterogeneity on and off. Run 100 simulations to see when a single coefficient is misleading.
Forest Plot
The Indonesia headline numbers from §6–§8 of the post — Global OLS vs MGWR on three diagnostics (β, R², AICc). Hover for SE, CI, and effective parameters.
Glossary (open a card if a term is unfamiliar)
Local regression β̂(s)
Bandwidth h
Adaptive bisquare kernel
GWR vs MGWR
Spatial heterogeneity
Effective number of parameters
AICc
β-convergence
Bandwidth Lab — turn the kernel knob yourself
A penalty parameter in LASSO does the same job that a bandwidth parameter does in MGWR: it controls how much information is borrowed across observations. In a stylised model with one "treatment-like" variable and many control-like covariates, the slider sweeps a smoothing knob from "very local" (left, few neighbours, noisy) to "very global" (right, many neighbours, all coefficients shrink toward zero). Watch the orange treatment coefficient: that is the spatially varying β we care about in MGWR.
What to look for
- Small bandwidth = many "effective parameters". Slide left: more coefficients are kept, each estimated from a narrow window. That is what MGWR's bandwidth-of-44 looks like in spirit: a model that respects local structure.
- Large bandwidth = a single, smooth, global story. Slide right: most coefficients shrink to zero. You recover something like the global OLS regression — one line for the whole country.
- The treatment-like coefficient (orange) is what MGWR maps. In Indonesia, it ranges from −1.74 (strong local catching-up) to +0.42 (local divergence) — even though the global average is just −0.195.
Global vs Local — when one number misleads
Same simulated dataset. Two estimators of the convergence-like coefficient β: a Global-style estimator (one coefficient for the whole sample, the analogue of Indonesia's β = −0.195) and a Local-style estimator (each region gets its own coefficient, the analogue of MGWR's location-specific β). The asymmetry slider turns spatial heterogeneity on and off: at 0, the truth is the same everywhere and global is fine; at 1, the truth varies enormously and only the local estimator recovers it.
Local (MGWR-style)
Allows β to vary across regions — analogue of MGWR's location-specific β̂(s).
Global (OLS-style)
A single coefficient for the whole sample — analogue of Indonesia's β = −0.195.
Why does this happen?
- Global averages out heterogeneity. If β is +1 in some regions and −1 in others, the global estimator returns ≈ 0 — and may declare "no effect" when in fact there are two strong, opposite effects.
- Local estimators recover the variation at the cost of more parameters. In Indonesia, MGWR uses 52 effective parameters vs OLS's 2 — but R² jumps from 0.21 to 0.76 because the gain in fit dwarfs the parameter cost.
- When the asymmetry slider is near 0, global is fine. If reality is genuinely homogeneous (β is the same everywhere), the simpler model is the right one. MGWR pays off precisely when the world is heterogeneous — and the Indonesia AICc drop from 1341 to 838 is the diagnostic that says it does.
Bias vs variance over many simulations
Single runs are noisy. Run the whole pipeline 100 times with fresh draws (same parameters, different errors) to see whether the global estimator is systematically biased when β varies in space.
Indonesia headline numbers — Global OLS vs MGWR
These numbers come straight from §6–§8 of the post — the same diagnostics used to declare MGWR a clear winner. Toggle outcomes (β, R², AICc) and methods (Global OLS, MGWR) to compare. Hover a point to see its standard error, 95% CI, and the effective bandwidth or sample-size analogue.
What to look for
- The convergence coefficient β collapses from −0.195 (global) to a median of −0.085 (MGWR) with a range from −1.74 to +0.42. The CI on the MGWR row in the forest plot reflects the full district-level spread, not a sampling-error band.
- R² triples: 0.21 → 0.76. This is the single most striking number in the post and the main reason MGWR is preferred for Indonesia's archipelago.
- AICc drops by 503 points: 1341 → 838. AICc penalises complexity, so the win is not free-flexibility-only — MGWR's gain in fit dwarfs the cost of estimating 52 effective parameters.
Outcomes
Methods
Why MGWR's "CI" looks different from OLS's
For Global OLS, the CI on the slope is a standard
β̂ ± 1.96 · SE band: a sampling-error statement
about uncertainty in the single coefficient. For MGWR, the
"CI" shown here is the empirical range of the 514 local
coefficients — what economists sometimes call the
cross-sectional dispersion of the location-specific β̂(s).
The two intervals answer different questions: the first says
"how precisely we estimate the global average", the second
says "how much the relationship actually varies in space".
Connecting back to Tab 3
The Global-vs-Local contrast you just simulated on Tab 3 maps directly to the Indonesia panel:
- Convergence β: Global says −0.195; MGWR's local median is −0.085 with a range from −1.74 to +0.42.
- R²: Global 0.21; MGWR 0.76 — a 3.5× improvement.
- AICc: Global 1341.25; MGWR 838.41 — a 503-point drop confirming the gain is genuine, not free flexibility.
The takeaway from the post (§7–§10) is therefore visible twice: once on a controlled simulation where you set the truth (Tab 3), and once on the actual 514-district Indonesia panel (this tab).