Documente Academic
Documente Profesional
Documente Cultură
1 CONICET-IELDE
National University of Salta (Argentina)
General index
1 Introduction
Theory-driven
From individual decision to social-spatial interaction.
Common shocks.
Peer-eects, contextual eects, neighbourhood eects.
Data-driven
Geo-referenced information.
Technology
Geographical Information Systems.
Capability of statistical software.
Competitive theories:
Orthodox theory: net migration causes more unemployment
(positive relationship).
New Economic Geography theory: net migration causes less
unemployment (negative relationship).
Denition of variables:
UNEMPLOYMENT RATE as the number of people
unemployed as a percentage of the labour force.
NET MIGRATION RATE as the ratio of net migration during
the year to the average population in that year. The value is
expressed per 1,000 persons. Net migration is the dierence
between immigration into and emigration from the area during
the year (net migration is therefore negative when the number
of emigrants exceeds the number of immigrants).
Level of analysis:
NUTS 2 (Europe 15), 164 regions from 2007 to 2012.
Introduction
Exploratory Spatial Data Analysis Loading data and choropleth maps
Basic spatial econometrics Matrices and spatial tests
Advanced spatial econometrics Spatial local analysis
Summary
General Index
1 Introduction
sh2dta command
Syntax:
Example:
sh2dta command
Syntax:
Example:
Visualizing in maps
A choropleth is a map in which each area is coloured with an
intensity proportional to the value of a quantitative variable. Some
classical maps:
spmap command
Syntax:
Details: basemap_options
polygon(polygon_suboptions)
line(line_suboptions)
point(point_suboptions)
diagram(diagram_suboptions)
arrow(arrow_suboptions)
label(label_suboptions)
scalebar(scalebar_suboptions)
graph_options]
spmap command
Syntax:
Details: basemap_options
polygon(polygon_suboptions)
line(line_suboptions)
point(point_suboptions)
diagram(diagram_suboptions)
arrow(arrow_suboptions)
label(label_suboptions)
scalebar(scalebar_suboptions)
graph_options]
General Index
1 Introduction
Centrality of spatial W
Distance functions:
inverse
inverse with threshold
Contiguity:
Rook
Queen
K nearest neighbours.
2 Socio-economic:
spatwmat:
Distance criterion.
Used for spatial univariate analysis.
Format le no compatible with spmat.
spwmatrix:
Generate W using geographic criteria (no contiguity).
Generate W under socio-economic criteria.
Import, export and manipulate from GeoDa.
Compatible format le with spatwmat.
spmat:
Generate W using geographic criteria (no under knn).
Import, export and read matrices from GeoDa.
Format le no compatible with spatwmat.
M. Herrera Spatial econometrics using Stata
Introduction
Exploratory Spatial Data Analysis Loading data and choropleth maps
Basic spatial econometrics Matrices and spatial tests
Advanced spatial econometrics Spatial local analysis
Summary
General Index
1 Introduction
[Ii E [Ii ]]
z [Ii ] = p .
Var [Ii ]
This test allows grouping observations in 4 categories (see scatter
Moran): High-High (H-H), Low-Low (L-L), Low-High (L-H) and
High-Low (H-L).
M. Herrera Spatial econometrics using Stata
Local Moran's I scatterplot
General Index
1 Introduction
Alternatives of specication
General Cli-Ord model (Manski model)
y = Wy + X + WX + u,
u = Wu + .
= 0, = 0, 6= 0 SLM .
= 0, 6= 0, = 0 SEM .
= 0, 6= 0, 6= 0 SARAR .
6= 0, = 0, 6= 0 SDM .
General Index
1 Introduction
Residual tests
The rst step (under the specic to general strategy M8) is to estimate a
regression model and obtain the residuals.
In our case our initial model is
U 2012 = 1 + 2 NM 2012 + u.
This equation is estimated under OLS:
. reg U2012 NM2012
Source | SS df MS Number of obs = 164
-------------+------------------------------ F( 1, 162) = 56.32
Model | 1453.94714 1 1453.94714 Prob > F = 0.0000
Residual | 4182.20231 162 25.8160636 R-squared = 0.2580
-------------+------------------------------ Adj R-squared = 0.2534
Total | 5636.14945 163 34.577604 Root MSE = 5.081
------------------------------------------------------------------------------
U2012 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
NM2012 | -.7011928 .0934347 -7.50 0.000 -.8856998 -.5166859
_cons | 11.43504 .4697136 24.34 0.000 10.50749 12.36259
------------------------------------------------------------------------------
Residual tests
There are a set of tests that allow the detection of spatial autocorrelation:
Parameters in H1
Null hypotheses Test
Spatial lag Error lag
- yes LMERROR
=0
yes yes
LMERROR
yes - LMLAG
=0
yes yes
LMLAG
No spatial
Moran s I
autocorrelation
U 20012 = 1 + 2 NM 2012 + u.
Syntax:
Syntax:
General Index
1 Introduction
SEM
SARAR
SDM
Cli-Ord
SEM
SARAR
SDM
Cli-Ord
SEM
SARAR
SDM
Cli-Ord
SEM
SARAR
SDM
Cli-Ord
SEM
SARAR
SDM
Cli-Ord
y = Wy + X + WX + u.
H0 : + = 0,
The null and alternative hypotheses are:
H1 : + 6= 0.
Under H0 , = , and replacing into the SDM model:
y = Wy + X + WX ( ) + u = Wy + X WX + u,
(I W ) y = (I W ) X + u.
SEM
SARAR
SDM
Cli-Ord
SEM
SARAR
SDM
Cli-Ord
SEM
SARAR
SDM
Cli-Ord
SEM
SARAR
SDM
Cli-Ord
SEM
SARAR
SDM
Cli-Ord
Correction by heteroskedasticity
E (yi ) b E (yj )
= k =0
xik xik
General Index
1 Introduction
0
H = (fe re ) (Vfe Vre )1 (fe re ) ,
where fe is the vector of coecients of the consistent estimator
fe, re is the vector of coecients of the ecient estimator re,
with Vfe and Vre as the variance-covariance matrix of fe and re,
2
respectively. This statistic is distributed as q , with q degrees
(number of common coecients in both models).
Hausman test can be consider as a statistic of validation of re
estimator, null hypotheses.
General Index
1 Introduction
where
y1t x11t x21t xk 1t 1
y2t x12t x22t xk 2t 2
yt = . , Xt = . .. .. .. , = . .
.. .. ..
. . .
ynt x1nt x2nt xknt n
Under random eects, this model can be written as:
yt = Wyt + Xt + + t ,
(8)
| {z }
ut
t N 0, 2 In , N 0, 2 In .
t = W t + t (10)
t N 0, 2 In
y1 y1
x1k xnk
.. .. ..
h i
y y
.
x1k ... xnk =
. . ,
yn yn
x1k x1k
k w12 k w1n k
w21 k k w2n k
= (In W )1 .. .. .. .. ,
. . . .
wn1 k wn2 k k
= (In W )1 [k In + k W ] , (12)
M. Herrera Spatial econometrics using Stata
Introduction
Exploratory Spatial Data Analysis Basic panel data models
Basic spatial econometrics Static spatial panel models
Advanced spatial econometrics Dynamic spatial panel models
Summary
command xsmle
SLM
SEM
SARAR
SDM
command xsmle
SLM
SEM
SARAR
SDM
command xsmle
SLM
SEM
SARAR
SDM
command xsmle
SLM
SEM
SARAR
SDM
Alternative Models
General Index
1 Introduction
= (In W )1 [k In ] .
h i
y
x1k ... y
xnk (16)
t
Long run (assuming yt = yt1 = y ):
= [(1 ) In ( + ) W ]1 [k In ] .
h i
y
x1k ... y
xnk (17)
t
= (In W )1 [k In + k W ] .
h i
y
x1k ... y
xnk (21)
t
Long run (assuming yt = yt1 = y ):
= [(1 ) In ( + ) W ]1 [k In + k W ] . (22)
h i
y y
x1k ... xnk t
. xtserial U NM
Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
F( 1, 163) = 110.869
Prob > F = 0.0000
xsmle command
xsmle command
xsmle command
Summing up
Stata has incorporated tools for spatial analysis.
Summing up
Stata has incorporated tools for spatial analysis.
Some references
Theoretical references:
Applied references:
Some references
Books:
Stata:
Belotti, F. et al (2016). XSMLE: Stata module for spatial panel data models
estimation. Statistical Software Components.