Académique Documents
Professionnel Documents
Culture Documents
Alfonso Flores-Lagunes1, 2
Workshop prepared for CEPS/INSTEAD July 9, 2012
1 State
2 Institute
1. Introduction Two Examples 2. Basic Concepts 3. SAL Model 4. SAE Model 5. SAL-SAE Model 6. Testing for Spatial Dependence 7. GMM 8. Software
2 / 41
3 / 41
4 / 41
2. Basic Concepts
There are at least two approaches to spatial dependence. We will introduce the approach that consists on imposing structure to a model in order to specify the spatial dependence. This structure takes the form of (a) the specication of a spatial weighting matrix and (b) a spatial autocorrelation parameter to be estimated. This approach has been advocated and employed by, among others, L. Anselin, H. Kelejian, I. Prucha, L-f. Lee. Another approach nonparametrically estimates the spatial structure under certain conditions (e.g., Conley, 1999).
6 / 41
2. Basic Concepts
In general, the issue to take into account is the increased similarity or dissimilarity of units as they are closer to each other in space. cov (yi , yj ) = 0 for i = j that is stronger as i is closer to j. Similarity positive spatial correlation. Dissimilarity negative spatial correlation.
7 / 41
2. Basic Concepts
For a single cross-sectional sample, the problem is that spatial correlation implies the existence of a NxN variance-covariance matrix (VCM) of spatial correlations. That many correlation parameters cannot be estimated from a single cross-sectional sample. One solution: impose (assume) some structure on this VCM. Assume that for each unit there is a neighborhood of data within which spatial dependence arises. This solution implies setting this neighborhood up in the form of a spatial weighting matrix.
8 / 41
2. Basic Concepts
The spatial weighting matrix (W ) contains for each observation i (rows) the locations (columns) of the other observations that belong to the assumed neighborhood set of i . Thus, it is a NxN matrix. Notes:
It is typically specied by the researcher: this may be ad-hoc. It is typically row-standardized (each row adds up to 1) so that the interpretation is as an average of neighboring values. The diagonal is composed of zeroes. Examples of W : (a) neighbors that share a common border (rst-order contiguity), (b) neighbors within a given distance of each other. Importantly, W is not estimated.
9 / 41
where is the SAL parameter with (1, 1), and Wy is the spatially lagged dependent variable. An issue with this model is endogeneity of Wy , as it is correlated with . As a consequence, OLS is inconsistent (an exception is in Lee, 2002).
10 / 41
3. SAL Model
The model can be written in the following reduced form: y Wy =X + y (I W ) =X + y =(I W )1 X + (I W )1 Also, note that: var [y ] =var [(I W )1 X ] + var [(I W )1 ] = (I W )1 var [](I W )1 = 2 (I W )1 (I W )1
11 / 41
12 / 41
=
i =1
ln(1 i )
N N ln(2 ) ln( 2 ) 2 2
13 / 41
14 / 41
where is the SAE parameter with (1, 1), and Wu is the spatially lagged error term. Note that in this model there is no endogeneity, as it was the case in SAL. However, the error is clearly non-spherical. As a consequence, OLS is inecient.
15 / 41
4. SAE Model
The model can be written in the following reduced form: Note : u (I W ) = = u = (I W )1 Thus : y =X + (I W )1
and E [uu ] =E [(I W )1 (I W )1 ] = 2 (I W )1 (I W )1 The VCM of the errors (last line) is a full matrix, with both heteroskedasticity and spatial correlation.
16 / 41
4. SAE Model
The SAL and SAE models are closely related (through non-linear constraints) and thus dicult to tell them apart in practice with statistical tests (more later). Thus, it is important to judiciously choose and carefully justify when choosing between the two. SAL is consistent with models of spillovers and strategic behavior in y . e.g., strategic competition as in example 1. SAE is consistent with spatial dependence arising from correlation in unobservables. e.g., natural heterogeneity over space as in example 2.
17 / 41
18 / 41
19 / 41
5. SAL-SAE Model
Also known as SAC model or SAR-SARE model. It combines the previous two models. y = Wy + X + u , u = Mu + , iid (0, 2 )
with all the variables dened before and M another spatial weighting matrix. In general, W = M since in that case identication issues can arise (see, e.g., Anselin and Bera, 1998).
20 / 41
5. SAL-SAE Model
The model can be written in the following reduced form: y = (I W )1 X + (I W )1 (I M )1 and variances given by: E [uu ] = 2 (I M )1 (I M )1 var (y ) = 2 (I W )1 (I M )1 (I M )1 (I W )1 The VCM of the errors is a full matrix.
21 / 41
The SAL-SAE model can be estimated with MLE. Note that the reduced form error is (I W )1 (I M )1 and assume that is normal. Then the log-likelihood function for SAL-SAE: N N 1 = ln |(I W )(I M )1 (I M )1 | ln(2 ) ln( 2 ) 2 2 2 (y Wy X ) [(I M )(I M )]1 (y Wy X ) 2 2 which is maximized with respect to , , ,and 2 .
22 / 41
6. Testing
Given the similarities in the models covered and the relative complexity in estimation, it is important to perform specication tests. The rst specication test, the Morans I, is a commonly used general test for the presence of any spatial dependence. It is for H0 : no spatial dependence and with no particular HA : in mind.
23 / 41
24 / 41
25 / 41
Notes about Moran Is test: It is simple to implement as it only requires OLS residuals and a plausible W. Since it is a general test, it is likely to have low power and does not point to any particular alternative. It has been extended to a large family of limited dependent variable (LDV) models (Kelejian and Prucha, 2001).
26 / 41
1 2 (1) Tr [(W + W )W ]
27 / 41
Implies H0 : = 0 and tests can be devised based on MLE theory. For example, a LM test that only requires estimation under the null (OLS) is: e Wy LM = 2
2
2 (1)
28 / 41
6. Other Tests
Note that the tests for SAE and SAL above implicitly assume that = 0 and = 0, respectively. If that assumption is not true, the test is not valid. Anselin (1988) proposed a LM test for H0 : = = 0 based on OLS residuals, by comparing to the SAL-SAE model. But a problem is that rejection does oer guidance about which one of SAE or SAL is present.
29 / 41
6. Other Tests
One can test for SAE once SAL has been allowed for, to help determine if SAL adequately accounts for spatial dependence (the reverse is not as straightforward). Idea is to estimate the SAL model and test H0 : = 0 with a LM test.
LM = e Me 2 1 {Tr [M . M + M M ] Tr [M . W (I W )1 + M W (I W )1 ]2 var ()} (1)
2
30 / 41
6. Other Tests
Anselin, Bera, Florax and Yoon (1996) developed tests for SAE or SAL that only require OLS residuals and allow for local misspecication.
That is, they allow for small misspecication of values of () in testing for SAE (SAL). Based on the work by Bera and Yoon (1993). Details of expressions in ABFY (1996).
31 / 41
7. GMM
Thus far we have employed MLE theory for estimation and testing. The use of GMM for spatial models was pioneered mainly by H. Kelejian and I. Prucha in the late 1990s. While MLE bases estimation and inference on the likelihood function, GMM is based on moment conditions.
Take OLS as an example. You can obtain OLS estimates by minimizing the sum of squared residuals or maximizing the corresponding likelihood function. Or you can obtain them using the implied moment conditions: E [X e ] = 0. Using those moment conditions gives rise to a method-of moments estimator. GMM is obtained by setting a quadratic form on the moment conditions and minimizing it w.r. to the parameters.
32 / 41
Importantly, this allows employing GLS-type procedures in estimation of SAE and SAL models!
33 / 41
7. KP (1999)
In the simple model above, we know that E [uu ] = () = 2 (I M )1 (I M )1 . We use the following notation in the expressions for the = MMu , u = MM u moments: u = Mu , u = Mu , u , with u an estimate of u . Also = M . Then, it is not hard to show that the following moments hold: 1 = 2 N 1 2 E = Tr (M M ) N N 1 E =0 N E
34 / 41
7. KP (1999)
Using these 3 moments we are able to estimate and 2 since . Thus, substituting them into the = u u and = u u moments we have
E (u u ) E (u u ) 1 E (u u + u u ) N
2 N 2 N 1 E (u u ) N 1 E (u u ) N 1 E (u u ) N 1 N
1 Tr (M M ) 2 2 0 2 2
1 N 1 N 1 N
E (u u ) E (u u ) E (u u )
2 by substituting sample and which can be used to obtain moments and using GMM or NLLS. Estimates are consistent and asymptotically normal (KP, 1999).
35 / 41
7. KP (1999)
The previous results can be applied to the SAE model: y = X + u , u = Mu + , and iid (0, 2 ). OLS is Recall that OLS is consistent, then u = y X consistent for u . Now FGLS can be applied as follows:
1. 2. 3. 4. OLS and u Do OLS and obtain . Use u to estimate using the KP moments. 2 (I ) = M )1 (I M )1 and u Obtain ( . 1 1 FGLS = [X ( )X ] X 1 ( )y . Obtain
36 / 41
37 / 41
38 / 41
8. Software
Two common programs for spatial econometrics analysis.
MATLAB has a spatial econometrics toolbox available, developed by J. LeSage: http://www.spatial-econometrics.com/ R has a spatial package available: http://r-spatial.sourceforge.net/ Both oer routines for many of the methods reviewed above (unfortunately, STATA does not have many spatial econometrics commands).
To conduct empirical work using spatial data it is a great advantage to have working knowledge of ArcGIS.
40 / 41
41 / 41