Download - Spatial Econometric Analysis Using GAUSS
Spatial Econometric Analysis Using GAUSS
3
Kuan-Pin LinPortland State University
Spatial Weights Matrix Anselin (1988) [anselin.1] Ertur and Kosh (2007) [ek.1] China 30 Provinces [china.1, china.2] Homework
U.S. 48 Lower States [us48_w.txt] U.S. 3109 Counties [us3109_w.zip]
[us3109_wlist.txt]
Spatial Contiguity Weights MatrixAnselin (1988): W1, W2, W3
use gpe2;n=49;load wd[n,n]=c:\course10\ec596\SEAUG\data\anselin\anselin_w.txt;
w1=spw(wd);w2=spwpower(w1,2);w3=spwpower(w1,3);w4=spwpower(w1,4);w5=spwpower(w1,5);w6=spwpower(w1,6);call spwplot(w1);
end;
#include gpe\spatial.gpe;
Spatial Contiguity Weights MatrixChina, 30 Provinces and Cities: W1, W2, W3
Distance-Based Spatial WeightsErtur and Kosh (2007)
Geographical Location (x,y) Longitude (x) Latitude (y)
Great Circle Distance d=gcd(x,y) (x,y) is in degree decimal units
Distance-Based Spatial Weights Matrix Using Kernel Weight Function
proc gcd(xc,yc); local x,y,d; x=pi*xc/180; @ convert to radian @ y=pi*yc/180; d=3963*arccos(sin(y').*sin(y)+cos(y').*cos(y).*cos(abs(x'-x))); @ 3963 miles or 6378 km = radius of the earth @ retp(real(d));endp;
Distance-Based Spatial WeightsErtur and Kosh (2007)
Kernel Weight Function
Parzen Kernel Bartlett Kernel (Tricubic Kernel) Turkey-Hanning Kernel Guassian or Exponenetial Kernel
0 0
: [ 1,1]( ) 0 | |
| | ( ) 0 | |
K REither K z if z z for some zOr z K z as z
2
( ) 1, ( ) 0, | ( ) |
( )
K z dz zK z dz K z dz
z K z dz k where k is a constant
Kernel Weights Spatial MatrixAn Example
Negative Exponential Distance
Negative Gaussian Distance ( / ) exp 2 /ij ij ijk K d d d d
2max max( / ) exp ( / )ij ij ijk K d d d d
1iiij
ij
kw W K
k i j
I
Gaussian Distance Weights MatrixErtur and Kosh (2007)
Spatial HAC Estimator The Classical Model
1 1
ˆ ˆˆ ˆ' ( '), 1,2,...,
ˆ ˆˆ ( ) ( ' ) ' ( ' )
ij i jkE
i j n
Var
X X εε
β X X X X X X
1ˆ ( ' ) '
y Xβ ε
β X X X y( | ) 0( | )
EVar
ε Xε X
Spatial HAC EstimatorGeneral Heteroscedasticity
Huber-White Estimator2 '
1
1 1
ˆ ˆ'
ˆ ˆˆ ( ) ( ' ) ' ( ' )
ni i ii
Var
X X x x
β X X X X X X
ˆ ˆ 1ˆ ˆ' ,, 1, 2,..., 0
ij i jij
k i jk
i j n i j
X X
Spatial HAC EstimatorGeneral Heteroscedasticity and Autocorrelation
First Law of Geography
Kelejian and Prucha (2007)
'1 1
1 1
ˆ ˆ ˆ'
ˆ ˆˆ ( ) ( ' ) ' ( ' )
n nij i j i ji jk
Var
X X x x
β X X X X X X
max( / ) ( / )ij ij ij ijk K d d or k K d d ij ijd k
Time Series HAC EstimatorGeneral Heteroscedasticity and Autocorrelation
Newey-West Estimator
2 '1
' '1 1
1 1
ˆ ˆ'
ˆ ˆ1 ( )1
ˆ ˆˆ ( ) ( ' ) ' ( ' )
ni i ii
L ni i i i i ii L
Var
X X x x
x x x x
β X X X X X X
Crime EquationAnselin (1988) [anselin.2]
Basic Model(Crime Rate) = + (Family Income) + (Housing Value) +
Spatial HAC Estimator
OLSParameter
OLSs.e.
Robusts.e/hc
Robusts.e/hac
-1.5973 0.33413 0.44664 0.45552
-0.27393 0.10320 0.15752 0.15626
68.619 4.7355 4.1014 5.3639
R2 0.5520
GDP Output ProductionChina 2006 [china.3]
Cobb-Douglass Production Function ln(GDP) = + ln(L) + ln(K) +
Spatial HAC EstimatorOLSParameter
OLSs.e.
Robusts.e/hc
Robusts.e/hac
0.76938 0.08054 0.09081 0.11397
0.30923 0.09459 0.09463 0.10716
-2.6294 0.73630 0.59170 0.46106
R2 0.89137
Spatial ExogeneityLagged Explanatory Variables
Spatial Exogenous Model
'1
1,2,...,
nij jjw
Wi n
xX
W y Xβ Xγ ε2
( | , ) 0
( | , ) ( ')
E W
Var W E
ε X
Iε X εε
GDP Output ProductionChina 2006 [china.4]
Cobb-Douglass Production Function ln(GDP) = + ln(L) + ln(K) + w W ln(L) + w W ln(K) +
OLSParameter
OLSs.e.
Robusts.e/hc
Robusts.e/hac
0.77653 0.05892 0.05674 0.05134
0.30974 0.07198 0.07891 0.08419
w -0.50975 0.11508 0.10334 0.09197
w 0.56380 0.11626 0.12052 0.07242
-3.0745 0.83787 0.68982 0.51367
R2 0.94690
Spatial EndogeneityLagged Dependent Variable
Spatial Lag ModelW y y Xβ ε
1
1,2,...,
nij jjw y
Wi n
y
2
( | , ) 0
( | , ) ( ')
E W
Var W E
ε X
Iε X εε
References T. Conley, 1999 “GMM estimation with cross sectional
dependence,” Journal of Econometrics 92, 1999, 1–45. H. Kelejian and I.R. Prucha, “HAC Estimation in a Spatial
Framework,” Journal of Econometrics 140, 2007, 131-154. W. Newey, and K. West, 1987, “A simple, positive semi-definite,
heteroskedastic and autocorrelated consistent covariance matrix,” Econometrica, 55, 1987, 703–708.
H. White, “Maximum Likelihood Estimation of Misspecified Models,” Econometrica, 50, 1982, 1-26.