GWR (Geographically Weighted Regression)
v1.0.2
Social, Humanities & Admin Sciences context — regression in which coefficients vary by location. At each point, a local model is fitted with the AICc-optimal bandwidth; the β₁(s), β₂(s) map is obtained.
🎯 What is it for?
Standard OLS estimates a single global β; GWR produces a location-varying β, answering questions such as “Is the effect of X1 stronger in the north or the south?” For Social, Humanities & Admin Sciences it visualizes how the sensitivity of issizlik_orani_pct to egitim_endeksi and sanayi_yogunlugu 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
- Lat/lon coordinates, a continuous DV (issizlik_orani_pct), continuous X’s.
- Sufficient density: the number of points within the bandwidth ≥ 30.
- AICc / CV for bandwidth selection (AICc by default).
📊 How to Run It in MerQur?
Panel assignments (form fields in the program):
- Columns:
{'y': 'birim_id', 'x': ['X1', 'X2'], 'lat': 'lat', 'lon': 'lon'} - Parameters:
{'bandwidth_method': 'AICc'}
📊 Sample Dataset — Social, Humanities & Administrative Sciences
ℹ 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 Social, Humanities & Administrative Sciences:
Sosyal_Beseri/107_gwr_local.xlsx
🎬 Scenario
Assuming the relationship is not constant in space, we estimate separate
coefficients per location. For spatial heterogeneity, GWR is appropriate.
⚙️ Variable Selection
- Dependent variable: Y_value
- Predictor(s): X1
- Predictor(s): X2
- Latitude: lat
- Longitude: 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
─────────────────────────────────────────────
R^2 = 0.887 local coefficients vary by location outcome: Y_value, predictors: X1, X2
💬 Interpretation
Assuming the relationship is NOT constant across space, we estimated SEPARATE coefficients for each location (R^2 =
0.89). Unlike “global” regression, GWR fits a separate model at each point with local overlap/weights; this answers
“how does this variable’s effect vary by region?” and maps spatial heterogeneity. In education/social geography it
is powerful where the education-socioeconomic relationship differs by region.
⚠ 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
📝 Ü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.