Spatial Data, Analysis, and Regression - IV
A mini-course
Estimation
- Model estimation ≠ Model specification
OLS is fine for some specifications but others require specific estimators. Some OLS assumptions are violated:
- Spatial Lag: endogeneity caused by Wy on the RHS
- Spatial Error: VC matrix of error term ε ≠ σ2I
Although there are more methods (e.g. Bayesian), this are the most commonly used in this context.
- Maximum Likelihood
- IV - GMM
Details can get "pretty" technical → only overview & intuition
Maximum Likelihood
- Based on multivariate normal density (normality assumption)
- Nonlinear optimization
- Hard to scale up because of matrix inversion → Small(er) samples
Maximum Likelihood
Spatial lag
$$
ln(L) = -(\dfrac{N}{2}) ln(2\pi) - (\dfrac{N}{2}) ln \sigma^2 +
ln |I - \rho W| - \\
\dfrac{(y - \rho Wy - X\beta)' (y - \rho Wy - X\beta)}{
(2\sigma^2)}
$$
Maximum Likelihood
Spatial error (FGLS)
$$ln(L) = -(\dfrac{N}{2}) ln(2\pi) - (\dfrac{N}{2}) ln \sigma^2 +
ln |I - \lambda W| - \dfrac{e_L'e_L}{2\sigma^2}$$
with:
eL = (I − λW)(y − Xβ)
IV - GMM
- Modern approach (Late 90's, 00s)
- Fast but relies on assymptotics → Large datasets
Spatial Lag
- Instrumental variables (IV)
- Deals with the endogeneity of Wy
- Kelejian & Prucha, 2004 proves that the optimal instruments are X, WX, WWX...
IV - GMM
Spatial Error
- General Method of Moments (GMM)
- Consistent residuals from nonspatial regression
- Solve system of equations for a set of moments to consistently and efficiently estimate λ
- Plug the estimate in IV/OLS results through spatial Cochrane–Orcutt filtering (Y * = Y − λWY)
- Re-run model with filtered variables
Implementation
- Rich range of proprietary and open source alternatives
- Most part of larger projects (Python scientific, R...)
Code-Command line
- Matlab Toolbox (LeSage)
- PySAL
- R (spdep, sphet, splm)
- Stata (spivreg)
GUI
Where to continue
Basics
Advanced (cross-section)
- Family of Kelejian & Prucha papers (KP-1998/99, 2004, 2008, 2010)
Panels
- Anselin, L.; Le Gallo, J. and Jayet, H. (2008) Spatial Panel Econometrics (link)
- Lee, L. F. and Yu, J. 2010, Some recent developments in spatial panel data models (link)
Non-parametric
- McMillen, D. (2012) Perspectives on Spatial Econometrics: Linear Smoothing with Structured Models. Journal or Regional Science, 52 (2): 192-209
Discrete choice
- Fleming, M. (2004). Techniques for estimating spatially dependent discrete choice model (link)