Professional Documents
Culture Documents
2012 Italian Stata Users Group meeting Bologna September 20-21, 2012
Maurizio Pisati Spatial Data Analysis in Stata 1/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Outline
1
Introduction Spatial data analysis in Stata Space, spatial objects, spatial data
Maurizio Pisati
2/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Outline
1
Introduction Spatial data analysis in Stata Space, spatial objects, spatial data Visualizing spatial data Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Maurizio Pisati
2/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Outline
1
Introduction Spatial data analysis in Stata Space, spatial objects, spatial data Visualizing spatial data Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps Exploring spatial point patterns Overview Kernel density estimation
Maurizio Pisati Spatial Data Analysis in Stata 2/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Outline
Maurizio Pisati
3/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Outline
Measuring spatial proximity Detecting spatial autocorrelation Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Maurizio Pisati
3/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Outline
Measuring spatial proximity Detecting spatial autocorrelation Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation Fitting spatial regression models
Maurizio Pisati
3/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Introduction
Maurizio Pisati
4/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
variety of user-written commands published in the Stata Technical Bulletin, the Stata Journal, or the SSC Archive
Maurizio Pisati
5/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
variety of user-written commands published in the Stata Technical Bulletin, the Stata Journal, or the SSC Archive
In this talk, I will briey illustrate the use of six such
Maurizio Pisati
5/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
variety of user-written commands published in the Stata Technical Bulletin, the Stata Journal, or the SSC Archive
In this talk, I will briey illustrate the use of six such
Maurizio Pisati
5/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
at two-dimensional surface
Maurizio Pisati
6/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
at two-dimensional surface In spatial data analysis, we can distinguish two conceptions of space (Bailey and Gatrell 1995: 18):
Entity view : Space as an area lled with a set of discrete
objects
Field view : Space as an area covered with essentially
continuous surfaces
Maurizio Pisati
6/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
at two-dimensional surface In spatial data analysis, we can distinguish two conceptions of space (Bailey and Gatrell 1995: 18):
Entity view : Space as an area lled with a set of discrete
objects
Field view : Space as an area covered with essentially
continuous surfaces Here we take the former view and dene spatial data as
information regarding a given set of discrete spatial objects located within a study area A
Maurizio Pisati
6/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
categories:
Spatial attributes Non-spatial attributes
Maurizio Pisati
7/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
categories:
Spatial attributes Non-spatial attributes
or more pairs of coordinates that represent its shape and/or its location within the study area
Maurizio Pisati
7/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
categories:
Spatial attributes Non-spatial attributes
or more pairs of coordinates that represent its shape and/or its location within the study area
The non-spatial attributes of a spatial object consist of
Maurizio Pisati
7/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Maurizio Pisati
8/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Maurizio Pisati
8/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Points
A point si is a zero-dimensional
Maurizio Pisati
9/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Points
A point si is a zero-dimensional
of real entities, e.g., dwellings, buildings, places where specic events took place, pollution sources, trees
Maurizio Pisati
9/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Points
A point si is a zero-dimensional
of real entities, e.g., dwellings, buildings, places where specic events took place, pollution sources, trees
Maurizio Pisati
9/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Points
Homicides
A point si is a zero-dimensional
of real entities, e.g., dwellings, buildings, places where specic events took place, pollution sources, trees
Maurizio Pisati
9/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Polygons
A polygon ri is a region of study
area A bounded by a closed polygonal chain whose M 4 vertices are dened by the coordinate set {(ri1(1) , ri2(1) ), (ri1(2) , ri2(2) ), . . . , (ri1(m) , ri2(m) ), . . . , (ri1(M ) , ri2(M ) )}, where ri1(1) = ri1(M ) and ri2(1) = ri2(M )
Maurizio Pisati
10/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Polygons
A polygon ri is a region of study
area A bounded by a closed polygonal chain whose M 4 vertices are dened by the coordinate set {(ri1(1) , ri2(1) ), (ri1(2) , ri2(2) ), . . . , (ri1(m) , ri2(m) ), . . . , (ri1(M ) , ri2(M ) )}, where ri1(1) = ri1(M ) and ri2(1) = ri2(M )
Polygons can represent several
kinds of real entities, e.g., states, provinces, counties, census tracts, electoral districts, parks, lakes
Maurizio Pisati Spatial Data Analysis in Stata 10/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Polygons
A polygon ri is a region of study
area A bounded by a closed polygonal chain whose M 4 vertices are dened by the coordinate set {(ri1(1) , ri2(1) ), (ri1(2) , ri2(2) ), . . . , (ri1(m) , ri2(m) ), . . . , (ri1(M ) , ri2(M ) )}, where ri1(1) = ri1(M ) and ri2(1) = ri2(M )
Polygons can represent several
kinds of real entities, e.g., states, provinces, counties, census tracts, electoral districts, parks, lakes
Maurizio Pisati Spatial Data Analysis in Stata 10/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Polygons
A polygon ri is a region of study
Police Districts
Washington D.C.
area A bounded by a closed polygonal chain whose M 4 vertices are dened by the coordinate set {(ri1(1) , ri2(1) ), (ri1(2) , ri2(2) ), . . . , (ri1(m) , ri2(m) ), . . . , (ri1(M ) , ri2(M ) )}, where ri1(1) = ri1(M ) and ri2(1) = ri2(M )
Polygons can represent several
Fourth
First
Sixth
kinds of real entities, e.g., states, provinces, counties, census tracts, electoral districts, parks, lakes
Maurizio Pisati
Seventh
10/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Maurizio Pisati
11/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Thematic maps
Most analyses of spatial data have their natural starting
interesting patterns in the data, spatial relationships between two or more phenomena, unusual observations, and so on
Thematic maps represent the spatial distribution of a
Maurizio Pisati
12/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
user-written command freely available from the SSC Archive (latest version: 1.2.0)
spmap is a very exible command that allows for creating a
large variety of thematic maps, from the simplest to the most complex
While providing sensible defaults for most options and
supoptions, spmap gives the user full control over the formatting of almost every map element, thus allowing the production of highly customized maps
Maurizio Pisati
13/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Maurizio Pisati
14/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Dot maps
spatial objects S {si ; i = 1, . . . , N }, i.e., their location within a given study area A
If the point spatial objects have variable attributes, it is
possible to represent this information using symbols of dierent colors and/or of dierent shape
Maurizio Pisati
15/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Spatial distribution of 359 cases of sex abuse, Washington D.C. (2009). Dierent colors are used to distinguish adult victims from child victims
!"#$%&'()#*++,-./0%!$12#0'$ 3#4#'0/#$567$"$#$$ 3#4#'0/#$8(1/()$"$)#/9:.$ '#1:.#$8(1/()$%&'(")*%)(')+",*%-".*$ 20;#2$.#<(4#$8(1/()$)$%=.!2/%$,$%&9(2.%$ 20;#2$802!#"$8(1/()$8(1/()$ ">)0>$!"(43$%?:!4.0'(#"-./0%!$(.%567*$<1:2:'%#33"9#22*$$$$$$'''$ $$$>:(4/%@%@51::'.*$A%A51::'.*$"#2#1/%B##>$(<$:<<#4"#""/*$$$'''$ $$$$$;A%8(1/()*$"(C#%-).,*$<1:2:'%'#.$408A*$$$$$$$$$$$$$$$$$'''$ $$$$$:1:2:'%D9(/#$..*$:"(C#%-0.1$..*$2#3#4.0%:4*$$$$$$$$$$$$'''$ $$$$$2#31:!4/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$'''$ $$$2#3#4.%"(C#%-).+*$':D30>%).,**$$$$$$$$$$$$$$$$$$$$$$$$$$$'''$ $$$/(/2#%%E#@$0;!"#"F$;A$8(1/()$03#%!$"(C#%-).,**$$$$$$$$$$$'''$ $$$"!;/(/2#%%G0"9(43/:4$7-&-$H*++,I%$%$%!$"(C#%-).,**!
Maurizio Pisati
16/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Spatial distribution of 359 cases of sex abuse, Washington D.C. (2009). Major roads, watercourses and parks are added to the map for reference
!"#$%&'()#*++,-./0%!$12#0'$ 3#4#'0/#$567$"$#$$ "8)08$!"(43$%9:!4.0'(#"-./0%!$(.%567&$;1:2:'%#33"<#22&$$$$$$'''$ $$$8:(4/%=%=51::'.&$>%>51::'.&$"#2#1/%?##8$(;$:;;#4"#""(&$$$'''$ $$$$$"(@#%)*+,&$;1:2:'%'#.&$:1:2:'%A<(/#&$:"(@#%)-+.&&$$$$$$'''$ $$$8:2>3:4%.0/0%%B0/#'CD0'?"-./0%&$E>%/>8#&$$$$$$$$$$$$$$$$$'''$ $$$$$:1:2:'%4:4#$++&$;1:2:'%3'##4$E2!#&&$$$$$$$$$$$$$$$$$$$$'''$ $$$2(4#%.0/0%%F0G:'H:0."-./0%&$1:2:'%E':A4&&$$$$$$$$$$$$$$$$'''$ $$$/(/2#%%I#=$0E!"#"%!$"(@#%)*+,&&$$$$$$$$$$$$$$$$$$$$$$$$$$'''$ $$$"!E/(/2#%%B0"<(43/:4$7-&-$J*++,K%$%$%!$"(@#%)*+,&&!
Maurizio Pisati
17/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
by a numeric variable of interest Y on a set of point spatial objects S located within a given study area A Proportional symbol maps can be used with two types of point data (Slocum et al. 2005: 310):
True point data are measured at actual point locations Conceptual point data are collected over a set of regions
R {ri ; i = 1, . . . , N }, but are conceived as being located at representative points within the regions, typically at their centroids The area of each point symbol is sized in direct proportion
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Mean family income in the seven Police Districts of Washington D.C. (2000)
19.6
!"#$%&'()*#+)",-)*,".+/,/01,/%!$*(#/-$ 2#3#-/,#$4$"$)3*'5#65/#$%%%$ 7'-5/,$4$&'($7$ "85/8$!")32$%&'()*#+)",-)*,".9''-1)3/,#"01,/%!$)1))1*$$$$$$$###$ $$$7*'('-)#22":#((*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$###$ $$$8')3,););6*''-1*$<)<6*''-1*$8-'8'-,)'3/()4*$7*'('-)-#1*$$###$ $$$$$'*'('-)=:),#*$")>#)+,(-**$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$###$ $$$(/?#(););6*''-1*$<*''-1)<6*''-1*$(/?#()4*$*'('-)=:),#*$$$###$ $$$$$")>#)+$('**$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$###$ $$$,),(#)%@#/3$7/5)(<$)3*'5#$A)3$,:'!"/31"$'7$BC$1'((/-"D%*$###$ $$$"!?,),(#)%E/":)32,'3$+090$AFGGGD%$%$%*!
26.1
12.7
8.1
Maurizio Pisati
19/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Diagram maps
symbol map, but represents the values of the variable of interest using bar charts, pie charts, or other types of diagram
The use of pie charts allows to display the spatial
distribution of compositional data, i.e., of two or more numeric variables that represent parts of a whole
Maurizio Pisati
20/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Mean family income in the seven Police Districts of Washington D.C. (2000). Data are represented by framed-rectangle charts, with the overall mean income as the reference value
!"#$%&'()*#+)",-)*,".+/,/01,/%!$*(#/-$ "23/2$!")45$%&'()*#+)",-)*,".6''-1)4/,#"01,/%!$)1")1#$$$$$$$$$$$ $$$7*'('-"#55"8#((#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$1)/5-/3"9/-")4*'3#:3/#$-#7;#)58,"2'2,',#$7*'('-"5-##4#$$$$$$$ $$$$$$<"<:*''-1#$="=:*''-1#$")>#"%&'##$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$,),(#"%?#/4$7/3)(=$)4*'3#%#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$"!@,),(#"%A/"8)45,'4$+060$BCDDDE%$%$%#!
Maurizio Pisati
21/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Maurizio Pisati
22/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Choropleth maps
and the corresponding class breaks, can be based on several dierent criteria e.g., quantiles, equal intervals, boxplot, standard deviates
Maurizio Pisati
23/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Mean family income in the 188 Census Tracts of Washington D.C. (2000). Income is divided into six classes based on the quantiles method
!"#$%&#'"!"()))*+,-,./-,%!$01#,2$ 3#'#2,-#$4$"$5'067#87,#$%%%$ 9627,-$4$&'(%9$ ":7,:$4$!"5'3$%&#'"!"()))*&662/5',-#"./-,%!$5/)5/*$$$$$$$$$$###$ $$$01'!7;#2)+*$017#-<6/)=!,'-51#*$906162)>!?/*$$$$$$$$$$$$$$###$ $$$'/906162)3"@*$'/1,;)%A5""5'3%*$$$$$$$$$$$$$$$$$$$$$$$$$$$###$ $$$1#3#'/)"5B#),$(-**$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$###$ $$$-5-1#)%A#,'$9,751C$5'067#$D5'$-<6!",'/"$69$EF$/611,2"G%*$###$ $$$"!;-5-1#)%H,"<5'3-6'$+.&.$D()))G%$%$%*!
(93,341] (54,93] (40,54] (33,40] (28,33] [6,28] Missing
Maurizio Pisati
24/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Mean family income in the 188 Census Tracts of Washington D.C. (2000). Income is divided into six classes based on the boxplot method
!"#$%&#'"!"()))*+,-,./-,%!$01#,2$ 3#'#2,-#$4$"$5'067#87,#$%%%$ 9627,-$4$&'(%9$ ":7,:$4$!"5'3$%&#'"!"()))*&662/5',-#"./-,%!$5/)5/*$$$$$$$$$$###$ $$$01'!7;#2)+*$017#-<6/);6=:16-*$906162)>!?/*$$$$$$$$$$$$$$$###$ $$$'/906162)3"@*$'/1,;)%A5""5'3%*$$$$$$$$$$$$$$$$$$$$$$$$$$$###$ $$$1#3#'/)"5B#),$(-**$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$###$ $$$-5-1#)%A#,'$9,751C$5'067#$D5'$-<6!",'/"$69$EF$/611,2"G%*$###$ $$$"!;-5-1#)%H,"<5'3-6'$+.&.$D()))G%$%$%*!
(132,341] (71,132] (40,71] (31,40] (6,31] [6,6] Missing
Maurizio Pisati
25/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Multivariate maps
mapping to simultaneously display the spatial distribution of multiple phenomena within a given study area A
Maurizio Pisati
26/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Dot maps Proportional symbol maps Diagram maps Choropleth maps Multivariate maps
Maurizio Pisati
27/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Maurizio Pisati
28/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
dened as a set of N point spatial objects S located within a given study area A
Usually, each point si S represents a real entity of some
region
Points si are referred to as the data points
Maurizio Pisati
29/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
interested in determining whether the observed data points exhibit some form of clustering, as opposed to being distributed uniformly within A
Maurizio Pisati
30/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
interested in determining whether the observed data points exhibit some form of clustering, as opposed to being distributed uniformly within A
To explore the possibility of point clustering, it may be
useful to describe the spatial point pattern of interest by means of its probability density function p(s) and/or its intensity function (s) (Waller and Gotway 2004)
Maurizio Pisati
30/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Maurizio Pisati
31/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Kernel estimators
Both the probability density function p(s) and the intensity
function (s) of a two-dimensional spatial point pattern can be estimated by means of nonparametric estimators, e.g., kernel estimators (Waller and Gotway 2004)
Maurizio Pisati
32/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Kernel estimators
Both the probability density function p(s) and the intensity
function (s) of a two-dimensional spatial point pattern can be estimated by means of nonparametric estimators, e.g., kernel estimators (Waller and Gotway 2004)
Kernel estimators are used to generate a spatially
smooth estimate of p(s) and/or (s) at a ne grid of points sg (g = 1, ..., G) covering the study area A
Maurizio Pisati
32/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Kernel estimators
Both the probability density function p(s) and the intensity
function (s) of a two-dimensional spatial point pattern can be estimated by means of nonparametric estimators, e.g., kernel estimators (Waller and Gotway 2004)
Kernel estimators are used to generate a spatially
smooth estimate of p(s) and/or (s) at a ne grid of points sg (g = 1, ..., G) covering the study area A
In the context of spatial data analysis, a grid is a regular
tessellation of the study area A that divides it into a set of G contiguous cells whose centers are referred to as the grid points and denoted by sg
Maurizio Pisati Spatial Data Analysis in Stata 32/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
density function p(s) and the intensity function (s) using two user-written commands freely available from the SSC Archive: spgrid and spkde
Maurizio Pisati
33/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
density function p(s) and the intensity function (s) using two user-written commands freely available from the SSC Archive: spgrid and spkde
spgrid (latest version: 1.0.1) generates several kinds of
Maurizio Pisati
33/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
density function p(s) and the intensity function (s) using two user-written commands freely available from the SSC Archive: spgrid and spkde
spgrid (latest version: 1.0.1) generates several kinds of
Maurizio Pisati
33/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
density function p(s) and the intensity function (s) using two user-written commands freely available from the SSC Archive: spgrid and spkde
spgrid (latest version: 1.0.1) generates several kinds of
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Our purpose is to estimate the probability density function of a set of 139 points representing the homicides committed in Washington D.C. in 2009
Maurizio Pisati
34/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Step 1
We use spgrid to generate a grid covering the area of Washington D.C. We choose a relatively ne grid resolution (grid cell width = 200 meters). spmap is used to display the grid
Maurizio Pisati
35/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Step 1
We use spgrid to generate a grid covering the area of Washington D.C. We choose a relatively ne grid resolution (grid cell width = 200 meters). spmap is used to display the grid
!"#$%&'(!%)#'*+,()&-$%.!/&0-*!'$.!,1(0%,)"2344#''''$$$' '''&,0!'5,6"$.!!'()%0"6.0.$!#'5.11!"*50.6"/&0-*#'''$$$' '''",%)0!"*"0.6"/&0-*#'$."1-5.' ' (!.'*"0.6"/&0-*!'51.-$' !"6-"'(!%)#'*50.6"/&0-*!'%&"!"#$%&7%&#!
Maurizio Pisati
35/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Step 1
We use spgrid to generate a grid covering the area of Washington D.C. We choose a relatively ne grid resolution (grid cell width = 200 meters). spmap is used to display the grid
!"#$%&'(!%)#'*+,()&-$%.!/&0-*!'$.!,1(0%,)"2344#''''$$$' '''&,0!'5,6"$.!!'()%0"6.0.$!#'5.11!"*50.6"/&0-*#'''$$$' '''",%)0!"*"0.6"/&0-*#'$."1-5.' ' (!.'*"0.6"/&0-*!'51.-$' !"6-"'(!%)#'*50.6"/&0-*!'%&"!"#$%&7%&#!
Maurizio Pisati
35/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Maurizio Pisati
36/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Maurizio Pisati
36/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Homicides
Washington D.C. (2009)
Maurizio Pisati
36/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Homicides
Washington D.C. (2009)
Maurizio Pisati
37/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Maurizio Pisati
38/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
spatial proximity among the spatial objects of interest be expressed in some way
Maurizio Pisati
39/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
spatial proximity among the spatial objects of interest be expressed in some way
Typically, the degree of spatial proximity among a given
set of N spatial objects is represented by a N N matrix called spatial weights matrix and denoted by W
Maurizio Pisati
39/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
spatial proximity among the spatial objects of interest be expressed in some way
Typically, the degree of spatial proximity among a given
set of N spatial objects is represented by a N N matrix called spatial weights matrix and denoted by W
Each element (i, j ) of W which we denote by wij
expresses the degree of spatial proximity between the pair of objects i and j
Maurizio Pisati
39/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
spatial proximity among the spatial objects of interest be expressed in some way
Typically, the degree of spatial proximity among a given
set of N spatial objects is represented by a N N matrix called spatial weights matrix and denoted by W
Each element (i, j ) of W which we denote by wij
expresses the degree of spatial proximity between the pair of objects i and j
Depending on the application, the N main diagonal
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
wij
N
wij
j =1
Maurizio Pisati
40/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
matrices using spatwmat, a user-written command published in the Stata Technical Bulletin (Pisati 2001)
Maurizio Pisati
41/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
matrices using spatwmat, a user-written command published in the Stata Technical Bulletin (Pisati 2001)
spatwmat (latest version: 1.0) imports or generates from
scratch the spatial weights matrices required by other commands for spatial data analysis (see below)
Maurizio Pisati
41/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Maurizio Pisati
42/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Spatial autocorrelation
Forty years ago, the geographer and statistician Waldo
Tobler formulated the rst law of geography : Everything is related to everything else, but near things are more related than distant things (Tobler 1970: 234)
Maurizio Pisati
43/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Spatial autocorrelation
Forty years ago, the geographer and statistician Waldo
Tobler formulated the rst law of geography : Everything is related to everything else, but near things are more related than distant things (Tobler 1970: 234) This law denes the statistical concept of (positive) spatial autocorrelation, according to which two or more objects that are spatially close tend to be more similar to each other with respect to a given attribute Y than are spatially distant objects
Maurizio Pisati
43/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Spatial autocorrelation
Forty years ago, the geographer and statistician Waldo
Tobler formulated the rst law of geography : Everything is related to everything else, but near things are more related than distant things (Tobler 1970: 234) This law denes the statistical concept of (positive) spatial autocorrelation, according to which two or more objects that are spatially close tend to be more similar to each other with respect to a given attribute Y than are spatially distant objects In general, spatial autocorrelation implies spatial custering, i.e., the existence of sub-areas of the study area where the attribute of interest Y takes higher than average values (hot spots ) or lower than average values (cold spots )
Maurizio Pisati Spatial Data Analysis in Stata 43/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
to area data
Maurizio Pisati
44/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
to area data Measures of spatial autocorrelation can be classied into two broad categories:
Maurizio Pisati
44/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
to area data Measures of spatial autocorrelation can be classied into two broad categories:
Global indices of spatial autocorrelation
Maurizio Pisati
44/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
to area data Measures of spatial autocorrelation can be classied into two broad categories:
Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Maurizio Pisati
44/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
the overall degree of similarity between spatially close regions observed in a given study area A with respect to a numeric variable Y (Pfeier et al. 2008)
Maurizio Pisati
45/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
the overall degree of similarity between spatially close regions observed in a given study area A with respect to a numeric variable Y (Pfeier et al. 2008)
Since global indices of spatial autocorrelation summarize
the phenomenon of interest in a single value, they are intended not so much for identifying specic spatial clusters, as for detecting the presence of a general tendency to clustering within the study area
Maurizio Pisati
45/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
correlation using spatgsa, a user-written command published in the Stata Technical Bulletin (Pisati 2001)
spatgsa (latest version: 1.0) computes three global indices
of spatial autocorrelation: Morans I , Getis and Ords G, and Gearys c. For each index and each numeric variable of interest, spatgsa computes and displays in tabular form the value of the index itself, the expected value of the index under the null hypothesis of no global spatial autocorrelation, the standard deviation of the index, the z -value, and the corresponding one- or two-tailed p -value
Maurizio Pisati
46/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Study area: Ohio Regions: 88 counties Variables of interest: Pct. population aged 18+ with poor-to-fair health status (pct poorhealth) Pct. population aged 18+ currently smoking (pct currsmoker) Pct. population aged 18+ ever diagnosed with high blood pressure (pct hibloodprs) Pct. population aged 18+ obese (pct obese)
Maurizio Pisati
47/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Step 1
We use spatwmat to import an existing binary spatial weights matrix stored in the Stata dataset Counties-Contiguity.dta and convert it into a properly formatted row-standardized spatial weights matrix Ws
Maurizio Pisati
48/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Step 1
We use spatwmat to import an existing binary spatial weights matrix stored in the Stata dataset Counties-Contiguity.dta and convert it into a properly formatted row-standardized spatial weights matrix Ws
!"#$%&#$'(!)*+',-.(*$)/!0-.*$)+()$123$#,!'''"""' '''*#&/#4!$'!$#*3#53)6/!
Maurizio Pisati
48/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
r: Maurizio
The following matrix has been created: 1. Imported binary weights matrix Ws (row-standardized) Dimension: 88x88
Maurizio Pisati
49/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Step 2
We use spatgsa with the spatial weights matrix Ws to compute Morans I on the variables of interest
Maurizio Pisati
50/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Step 2
We use spatgsa with the spatial weights matrix Ws to compute Morans I on the variables of interest
!"#$%&'!()*#"+,-)-./)-%!$01#-2$ "3-)4"-$30)53''26#-1)6$30)50!22"7'8#2$30)56*91''/32"$$$"""$ $$$30)5'9#"#!$:#;"$$7'2-(!
Maurizio Pisati
50/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
User: Maurizio
Moran's I Variables pct_poorhealth pct_currsmoker pct_hibloodprs pct_obese *1-tail test I 0.399 0.339 0.126 0.167 E(I) -0.011 -0.011 -0.011 -0.011 sd(I) 0.065 0.065 0.065 0.065 z 6.337 5.367 2.119 2.730 p-value* 0.000 0.000 0.017 0.003
Maurizio Pisati
51/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
each region ri of a given study area A, the degree of similarity between that region and its neighboring regions with respect to a numeric variable Y (Pfeier et al. 2008)
Maurizio Pisati
52/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
each region ri of a given study area A, the degree of similarity between that region and its neighboring regions with respect to a numeric variable Y (Pfeier et al. 2008)
The local indices of spatial autocorrelation are derived
from the corresponding global indices and share their fundamental properties
Maurizio Pisati
52/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
correlation using spatlsa, a user-written command published in the Stata Technical Bulletin (Pisati 2001)
Maurizio Pisati
53/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
correlation using spatlsa, a user-written command published in the Stata Technical Bulletin (Pisati 2001)
spatlsa (latest version: 1.0) computes four indices of
spatial autocorrelation: Morans Ii , Getis and Ords Gi and Gi , and Gearys ci . For each index and each region in the analysis, spatlsa computes and displays in tabular form the value of the index itself, the expected value of the index under the null hypothesis of no local spatial autocorrelation, the standard deviation of the index, the z -value, and the corresponding one- or two-tailed p -value
Maurizio Pisati
53/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Study area: Ohio Regions: 88 counties Variable of interest: Pct. population aged 18+ with
Maurizio Pisati
54/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
We use spatlsa with the standardized spatial weights matrix Ws previously generated by spatwmat to compute Morans Ii on the variable of interest. In the output, counties are sorted by z -value
Maurizio Pisati
55/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
We use spatlsa with the standardized spatial weights matrix Ws previously generated by spatwmat to compute Morans Ii on the variable of interest. In the output, counties are sorted by z -value
!"#$%&#$'(!)*+',-.(*$)/!0-.*$)+()$123$#,!'*#&/"4!#'!$#*3#53)6/' (!/',-.(*$)/!07#$#23$#,!'89/#5' !"#$9!#'"8$:"..5;/#9$;!'%"4!#'&.5#*')3"*#&/#'!.5$!
Maurizio Pisati
55/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
User: Maurizio
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Maurizio Pisati
56/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Overview Measuring spatial autocorrelation Global indices of spatial autocorrelation Local indices of spatial autocorrelation
Scioto
Maurizio Pisati
57/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Maurizio Pisati
58/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Spatial regression
relationship between an outcome variable of interest Y and one or more predictors X , taking into proper account the spatial dependence among observations
Maurizio Pisati
59/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
Spatial regression
relationship between an outcome variable of interest Y and one or more predictors X , taking into proper account the spatial dependence among observations Two types of spatial dependence are most commonly considered (Ward and Gleditsch 2008):
A spatial autoregressive process in the error term A spatial autoregressive process in the outcome variable
Maurizio Pisati
59/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
spatial error model: Y = X + W + where Y denotes an N 1 vector of observations on the outcome variable; X denotes an N j matrix of observations on the predictor variables; denotes a j 1 vector of regression coecients; denotes the spatial autoregressive parameter; W denotes the N N spatial weights matrix; denotes an N 1 vector of spatial errors; and denotes an N 1 vector of normally distributed, homoskedastic, and uncorrelated errors
Maurizio Pisati Spatial Data Analysis in Stata 60/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
the spatial lag model: Y = X + WY + where denotes the spatial autoregressive parameter; and all the other terms are dened as above
Maurizio Pisati
61/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
substance, assuming that the value taken by Y in each region is aected by the values taken by Y in the neighboring regions
Maurizio Pisati
62/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
substance, assuming that the value taken by Y in each region is aected by the values taken by Y in the neighboring regions
On the other hand, the spatial error model treats spatial
dependence as nuisance
Maurizio Pisati
62/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
using spatreg, a user-written command published in the Stata Technical Bulletin (Pisati 2001)
Maurizio Pisati
63/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
using spatreg, a user-written command published in the Stata Technical Bulletin (Pisati 2001)
An excellent alternative to spatreg is represented by
sppack, a suite of Stata commands freely available from the SSC Archive written by David M. Drukker, Hua Peng, Ingmar Prucha, and Rafal Raciborski
Maurizio Pisati
63/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
using spatreg, a user-written command published in the Stata Technical Bulletin (Pisati 2001)
An excellent alternative to spatreg is represented by
sppack, a suite of Stata commands freely available from the SSC Archive written by David M. Drukker, Hua Peng, Ingmar Prucha, and Rafal Raciborski
sppack is faster and more exible than spatreg. Moreover,
while spatreg is limited to the analysis of small sets of observations, sppack can deal with very large N s
Maurizio Pisati
63/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
References
Maurizio Pisati
64/65
Introduction Visualizing spatial data Exploring spatial point patterns Measuring spatial proximity Detecting spatial autocorrelation Fitting spatial regression models
References
Bailey, T.C. and A.C. Gatrell. 1995. Interactive Spatial Data Analysis.
Harlow: Longman.
Pfeier, D., Robinson, T., Stevenson, M., Stevens, K., Rogers, D. and A.
Clements. 2008. Spatial Analysis in Epidemiology. Oxford: Oxford University Press.
Pisati, M. 2001. sg162: Tools for spatial data analysis. Stata Technical
Bulletin 60: 2137. In Stata Technical Bulletin Reprints, vol. 10, 277298. College Station, TX: Stata Press.
Slocum, T.A., McMaster, R.B., Kessler, F.C. and H.H. Howard. 2005.
Thematic Cartography and Geographic Visualization. 2nd ed. Upper Saddle River, NJ: Pearson Prentice Hall.
Waller, L.A. and C.A. Gotway. 2004. Applied Spatial Statistics for Public
Health Data. Hoboken, NJ: Wiley.
Ward, M.D. and K.S. Gleditsch. 2008. Spatial Regression Models. Thousand
Oaks, CA: Sage.
Maurizio Pisati Spatial Data Analysis in Stata 65/65