SAR (Spatial Autoregressive Lag)

SAR (Spatial Autoregressive Lag)

⚡ Advanced · Spatial Regression

v1.0.2

Social, Humanities & Admin Sciences context — Spatial Lag Model. A regression that accounts for the spatial neighborhood structure of issizlik_orani_pct. Spatial weight matrix: K-nearest neighbor (k=5), row standardized.

Y = ρWY + Xβ + εlibpysal KNN Wspreg MLρ ≈ 0.60

🎯 What is it for?

Classic OLS assumes the observations are independent — but in lat/lon data, nearby points take on similar values (spatial autocorrelation). SAR (Spatial Autoregressive Lag) incorporates this structure into the model; otherwise the standard errors of the OLS β estimates come out too small (type-I error).

📌 When is it used?

  • In Social, Humanities & Admin Sciences, spatial data (with lat/lon) + continuous DV
  • Moran’s I p < .05 — evidence of spatial autocorrelation
  • Spatial clustering in the OLS residuals (hotspot over DBSCAN)

⚙ Assumptions

  1. Lat/lon coordinates ({lat, lon}).
  2. Continuous DV (issizlik_orani_pct).
  3. Design of the spatial weight matrix (KNN k=5 — default, with a dist.band alternative).
  4. The ρ parameter is stable within 0-1; there is a fragility risk at the boundary.

📊 How to Run in MerQur

1
Load the data (lat, lon, DV, X1, X2 columns).
2
Analysis → ⚡ Advanced → SAR (Spatial Autoregressive Lag).
3

Panel assignments (form fields in the program):

  • Columns: {'y': 'birim_id', 'x': ['X1', 'X2'], 'lat': 'lat', 'lon': 'lon'}
  • Parameters: {'weights': 'knn', 'k': 5}
4
Estimator: ML (default).
5
▶ Run. Coefficient forest plot + ρ + map.

📊 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/105_spatial_sar_spatial.xlsx

🎬 Scenario

When modeling a measurement we handle spatial spillover with SAR. For
neighborhood effects, SAR 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.729 36.2513 58.0 18.3 375.9
2.0 37.3016 39.779 60.9 46.8 464.0
3.0 38.3563 33.0728 73.2 48.6 530.5
4.0 41.2077 28.8098 82.7 15.0 197.6
5.0 40.7324 29.6924 48.9 32.5 385.3

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

📈 MerQur Output

SAR (SPATIAL AUTOREGRESSIVE LAG) RESULT
─────────────────────────────────────────────

rho = 0.336 z = 4.94 p < .001 *** Pseudo R^2 = 0.87 (N = 100, k-NN W, k = 5)
outcome: Y_value, predictors: X1, X2

💬 Interpretation

When modeling a measurement (Y_value), we handled spatial spillover (the effect of neighboring units) with SAR: the
spatial lag parameter is significant and positive (rho = 0.34, p < .001) — a unit’s value is related to its
neighbors’ value, a “cluster/spillover” pattern. SAR incorporates spatial dependency into the model; if ignored,
standard errors are biased. In education/social geography it is the right method for modeling the geographic spread
of school/region indicators (neighborhood effect).

⚠ Common Mistakes

  • ρ ≈ 1 → matrix singularity; try a looser W (k=10).
  • The choice of W matrix affects the results — compare KNN and DistanceBand.
  • Projected coordinates (UTM) instead of Lat/Lon may be preferable for accurate distance.

📚 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.