GWR (Geographically Weighted Regression)

GWR (Geographically Weighted Regression)

⚡ Advanced · Spatial Regression · Local Coefficients

v1.0.2

Health Sciences context — regression in which coefficients vary by location. At each point a local model is fit with an AICc-optimal bandwidth, yielding a β₁(s), β₂(s) map.

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 Health Sciences, it visualizes how the sensitivity of diyabet_prevalans_pct to yas_ort and obezite_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 (diyabet_prevalans_pct), 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': 'vaka_orani', 'x': ['sosyoekonomik', 'yas_ortalama'], '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 — Health 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 Health Sciences:

Tip/107_gwr_local_risk_factor.xlsx

🎬 Scenario

Assuming the relationship is not constant in space, we estimate separate
coefficients per province. For spatial heterogeneity, GWR is appropriate.

⚙️ Variable Selection

  • Dependent variable: case_ratio
  • Predictor(s): socioeconomic
  • Predictor(s): age_mean
  • Latitude: lat
  • Longitude: lon

Data Preview (First 5 Rows)

province_id lat lon socioeconomic age_mean case_ratio
1.0 39.3442 31.3475 58.8 44.8 502.1
2.0 39.6177 29.0262 68.5 46.2 365.1
3.0 36.8704 33.7026 48.6 30.3 474.9
4.0 38.7048 38.1436 36.6 50.4 522.7
5.0 40.3021 34.0883 54.9 44.7 419.7

n = 110 · Columns: province_id, lat, lon, socioeconomic, age_mean, case_ratio

📈 MerQur Output

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

R^2 = 0.811 local coefficients vary by location outcome: case_ratio, predictors: socioeconomic, age_mean

💬 Interpretation

Assuming the relationship is NOT constant across space, we estimated SEPARATE coefficients for each province/location
(R^2 = 0.81). 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 medicine/epidemiology
it is powerful where the socioeconomic-disease 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

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.