GWR (Geographically Weighted Regression)

GWR (Geographically Weighted Regression)

⚡ Advanced · Spatial Regression · Local Coefficients

v1.0.2

Agriculture, Forestry & Aquatic context — regression in which the coefficients vary by location. At each point a local model is fit with the AICc-optimal bandwidth, yielding maps of β₁(s), β₂(s).

mgwr · Sel_BWAICc-optimalLokal R²β min/Q25/medyan/Q75/max

🎯 What is it for?

Standard OLS estimates a single global β; GWR produces location-varying β: answering questions such as “Is the effect of X1 stronger in the north or the south?”. For Agriculture, Forestry & Aquatic, it visualizes how the sensitivity of agac_capi_cm to rakim_m and egim_pct varies regionally.

📌 When is it used?

  • Spatial clustering in the OLS residuals (Moran’s I significant)
  • The discipline-specific question “does the effect differ by geography?”
  • A desire to visualize spatial heterogeneity

⚙ Assumptions

  1. Lat/lon coordinates, continuous DV (agac_capi_cm), continuous X’s.
  2. Sufficient density: number of points within the bandwidth ≥ 30.
  3. AICc / CV for bandwidth selection (default AICc).

📊 How to Run It in MerQur?

1
Load data (lat/lon + DV + X’s).
2
Analysis → ⚡ Advanced → GWR.
3

Panel assignments (form fields in the program):

  • Columns: {'y': 'birim_id', 'x': ['X1', 'X2'], 'lat': 'lat', 'lon': 'lon'}
  • Parameters: {'bandwidth_method': 'AICc'}
4
Bandwidth: adaptive Bisquare (default). AICc-optimal sel_bw.
5
▶ Run. Local R² scatter map + min/Q25/median/Q75/max for each coefficient + % significant table.

📊 Sample Dataset — Agriculture, Forestry & Aquatic

ℹ Note: The scenario, MerQur output and interpretation below were produced by actually running the real example dataset in MerQur. Numeric results on your own data will differ; the goal is to show how the analysis is set up and interpreted end-to-end.

🎬 Example File

This analysis is demonstrated on the following example dataset for Agriculture, Forestry & Aquatic:

Ziraat_Orman_Su/107_gwr_local.xlsx

🎬 Scenario

We think the effect of X1, X2 on Y_value is not the same everywhere but varies by location. Classical regression gives a single
global coefficient; GWR estimates local coefficients for each location: a variable’s effect may be strong in one region and
weak/reversed in another. It makes spatial heterogeneity visible on the map.

⚙️ Variable Selection

  • Dependent (outcome): Y_value
  • Predictors: X1, X2
  • Coordinates: lat, lon

Data Preview (First 5 Rows)

unit_id lat lon X1 X2 Y_value
1.0 40.9141 38.4082 69.6 18.8 227.4
2.0 38.892 29.2114 39.1 25.4 401.3
3.0 39.2512 37.5754 24.9 34.1 495.9
4.0 40.24 39.2261 51.4 51.0 437.6
5.0 38.3041 29.6453 52.7 29.6 331.8

n = 110 · Columns: unit_id, lat, lon, X1, X2, Y_value

📈 MerQur Output

GWR (GEOGRAPHICALLY WEIGHTED REGRESSION) RESULT
─────────────────────────────────────────────

R² = 0.887 Adj. R² = 0.868 AICc = 1129.9 | local coefficients per location
Y_value ~ X1 + X2 (lat/lon)

💬 Interpretation

We thought the effect of X1, X2 on Y is not the same everywhere but varies by location. Classical regression gives a
single global coefficient; GWR estimates local coefficients for each location. The model fit very well (R² = 0.89).
GWR’s key output is the VARIATION of the coefficients across the map: a variable’s effect may be strong in one
region, weak or reversed in another. This makes “spatial heterogeneity” visible. In practice this is very valuable:
e.g. if precipitation’s effect on yield is strong in an arid region and weak in a humid one, a single global
coefficient hides it — GWR reveals it. Far more informative than global models for region-specific management decisions.

⚠ Common Mistakes

  • If too few points fall within the bandwidth in low-density regions, the standard error becomes large.
  • If you find the same effect across the entire region, global OLS is sufficient — the complication of GWR is not needed.
  • Multicollinearity may vary locally in GWR; checking the VIF at each bandwidth is recommended.

📚 MerQur’a Atıf

Örücü, Ö. K. (2026). MerQur: Integrated Academic Data Analysis & Reporting Platform [Computer software] (Version 1.0.0). https://doi.org/10.53463/merqur.2026001

Tüm atıf formatları →

📝 Üretim Notu — Bu sayfadaki örnek veri sentetik olarak üretilmiştir (sabit SEED=42, generator: samples/Ileri_Duzey_v102/_generate_v102_datasets.py). Sayfa içeriği Anthropic Claude desteği ile hazırlanmış, akademik doğruluk yazar tarafından kontrol edilmiştir.