Skip to main content

10.3. Multiscale Geographically Weighted Regression and Conley HAC

Verified Environments & Platforms:EcoDataEcoLabFincoVietLOD

Methodological Part 10.3. Multiscale Geographically Weighted Regression and Conley HAC in 10. Spatial Econometrics, Conley Standard Errors and Dyadic Networks provides step-by-step How-To implementation guides for 6 econometric model lessons spanning from Section 10.3.1 to 10.3.6. Full theoretical derivations are available at VietLOD Part 10.3 alongside cloud execution on EcoLab.

Video Tutorial: How-To Guide for Part 10.3: Multiscale Geographically Weighted Regression and Conley HAC in Stata 18, R 4.x, and Python 3.11+

10.3.1. Methodological Overview and Structural Equations​

  • Methodological Focus: Provides consistent estimation and robust inference for Multiscale Geographically Weighted Regression and Conley HAC specifications within Spatial Econometrics, Conley Standard Errors and Dyadic Networks.
  • Mandatory Post-Estimation Diagnostics: Băng thông tối ưu riêng bwkbw_k cho từng biến, AICc\text{AIC}_c so sánh MGWR vs GWR vs Global OLS, kiểm định Monte-Carlo / Leung F3F_3 về sự biến thiên không gian thực sự của từng βk(ui,vi)\beta_k(u_i, v_i)..

Core structural specification for Part 10.3:

Yi=βb0(ui,vi)+∑k=1Kβbk(ui,vi)Xik+εi,β^(ui,vi)=(X⊤W(ui,vi)X)−1X⊤W(ui,vi)YY_i = \beta_{b_0}(u_i, v_i) + \sum_{k=1}^K \beta_{b_k}(u_i, v_i) X_{ik} + \varepsilon_i, \quad \hat{\beta}(u_i, v_i) = \left(X^\top W(u_i, v_i) X\right)^{-1}X^\top W(u_i, v_i)Y

Estimator objective and moment conditions:

ℓN(β,ρ,σ2)=−N2ln⁡(2πσ2)+ln⁡det⁡(IN−ρW)−12σ2∥(IN−ρW)Y−Xβ−WXθ∥22\ell_N(\beta, \rho, \sigma^2) = -\frac{N}{2}\ln(2\pi\sigma^2) + \ln\det\left(I_N - \rho W\right) - \frac{1}{2\sigma^2}\| (I_N - \rho W)Y - X\beta - WX\theta \|_2^2
Methodological Scope Boundary:When empirical data violate the identification conditions of Part 10.3, researchers should transition to the extended methodological parts in Chapter 10 or apply appropriate instrumental-variable and cluster-robust corrections.

10.3.2. Econometric Model Lessons in Part 10.3​

10.3.3. Comparative Execution Syntax Across Stata 18, R 4.x, and Python 3.11+​

Section & Model TitleEstimator KeyStata 18 MP SyntaxR 4.x SyntaxPython 3.11+ SyntaxSupport
10.3.1 · Multiscale Geographically Weighted Regressionmgwr_spatialgwr y x1 x2, east(coord_x) north(coord_y) bandwidth(aic)GWmodel::gwr.multiscale(y ~ x1 + x2, data = spdf, adaptive = TRUE)MGWR(coords, y, X, selector=Sel_BW(coords, y, X, multi=True)).fit()Available
10.3.2 · Conley Spatial-Temporal HAC and Dyadic Network Regressionconley_spatial_hacacreg y x1 x2, spatial latitude(lat) longitude(lon) dist(100)fixest::feols(y ~ x1 + x2, vcov = fixest::vcov_conley(lat = 'lat', lon = 'lon', cutoff = 100), data = df)smf.ols('y ~ x1 + x2', data=df).fit(cov_type='HAC', cov_kwds={'maxlags': 4})Available

| 10.3.3 · Moran Eigenvector Spatial Filtering Griffith Tiefelsdorf | eigenvector_spatial_filtering | regress y x1 x2 ev_1 ev_2, vce(robust) | spatialreg::SpatialFiltering / spmoran::meigen | Spectral decomposition of M*W*M + spatial eigenvector sieve OLS | Available | | 10.3.4 · Spatial Autoregressive Discrete Choice Probit Logit LeSage Pinkse Slade | spatial_probit_lesage | probit y x1 x2 Wy, vce(robust) | spatialprobit::sar_probit_mcmc / McSpatial::spprobit | Spatial-lag augmented binary choice + LeSage spatial Wald test | Available | | 10.3.5 · Kelejian Prucha Generalized Spatial Two Stage Least Squares SARAR | gs2sls_kelejian_prucha | spregress y x1 x2, gs2sls dvarlag(W) errorlag(W) heteroskedastic | sphet::spreg(y ~ x1 + x2, data = df, listw = lw, model = 'sarar', het = TRUE) | Kelejian-Prucha (1998, 2010) 3-step Spatial 2SLS + GM error lambda + Cochrane-Orcutt GS2SLS | Available | | 10.3.6 · LeSage Pace Matrix Exponential Spatial Specification | matrix_exponential_spatial_mess | regress y x1 x2, vce(robust) | spatialreg::lagmess(y ~ x1 + x2, data = df, listw = lw) | scipy.linalg.expm concentrated Gaussian MLE Matrix Exponential Spatial Specification | Available |

10.3.4. Standard Implementation Workflow for Part 10.3​

Step 1. Load Standardized Practice Datasets From VietLOD, EcoData, or Finco

Download the model-specific .csv practice dataset in Part 10.3 or extract custom empirical panels from EcoData and Finco.

Step 2. Select the Optimal Estimator for Your Error and Sample Structure

Compare the estimators from 10.3.1 to 10.3.6 in the syntax matrix above and execute the estimation in Stata 18 MP, R 4.x, or Python 3.11+.

Step 3. Run Mandatory Diagnostics and Export Publication Tables on EcoLab

Verify all required diagnostics including Băng thông tối ưu riêng bwkbw_k cho từng biến, AICc\text{AIC}_c so sánh MGWR vs GWR vs Global OLS, kiểm định Monte-Carlo / Leung F3F_3 về sự biến thiên không gian thực sự của từng βk(ui,vi)\beta_k(u_i, v_i). and dispatch the specification to EcoLab for automated journal-grade reporting.