This approach considers spatial sites as nodes in a graph with links determined by a shared boundary or vertex.3 The elements of the spatial weight matrix are determined by setting w i j = 1 {\displaystyle w_{ij}=1} for all connected pairs of nodes i j {\displaystyle ij} with all the other elements set to 0. This makes the spatial weight matrix equivalent to the adjacency matrix of the corresponding network. It is common4 to row-normalize the matrix W {\displaystyle W} ,
In this case the sum of all the elements of W {\displaystyle W} equals N {\displaystyle N} the number of sites.
There are three common methods for linking sites5 named after the chess pieces which make similar moves:
In some cases statistics can be quite different depending on the definition used, especially for discrete data on a grid.6 There are also other cases where the choice of neighbors is not obvious and can affect the outcome of the analysis. Bivand and Wong7 describe a situation where the value of spatial indices of association (like Moran's I) depend on the inclusion or exclusion of a ferry crossing between counties. There are also cases where regions meet in a tripoint or quadripoint where Rook and Queen neighborhoods can differ.
Another way to define spatial neighbors is based on the distance between sites. One simple choice is to set w i j = 1 {\displaystyle w_{ij}=1} for every pair ( i , j ) {\displaystyle (i,j)} separated by a distance less than some threshold δ {\displaystyle \delta } .8 Cliff and Ord9 suggest the general form
Where g {\displaystyle g} is some function of d i j {\displaystyle d_{ij}} the distance between i {\displaystyle i} and j {\displaystyle j} and β i j {\displaystyle \beta _{ij}} is the proportion of the perimeter of i {\displaystyle i} in contact with j {\displaystyle j} . The function
is then suggested. Often the β {\displaystyle \beta } term is not included and the most common values for α {\displaystyle \alpha } are 1 and 2.10 Another common choice for the distance decay function is11
though a number of different Kernel functions can be used. The exponential and other Kernel functions typically set w i i = 1 {\displaystyle w_{ii}=1} which must be considered in applications.
It is possible to make the spatial weight matrix a function of 'distance class':12 w i j → w i j ( d ) {\displaystyle w_{ij}\rightarrow w_{ij}(d)} where d {\displaystyle d} denotes the 'distance class', for example d = 1 , 2 , 3 , … {\displaystyle d=1,2,3,\ldots } corresponding to first, second, third etc. neighbors. In this case, functions of the spatial weight matrix become distance class dependent. For example, Moran's I is
This defines a type of spatial correlogram, in this case, since Moran's I measures spatial autocorrelation, I ( d ) {\displaystyle I(d)} measures how the autocorrelation of the data changes as a function of distance class. Remembering Tobler's first law of geography, "everything is related to everything else, but near things are more related than distant things" it usually decreases with distance.
Common distance functions include13 Euclidean distance, Manhattan distance and Great-circle distance.
One application of the spatial weight matrix is to compute the spatial lag14
For row-standardised weights initially set to w i j = 1 {\displaystyle w_{ij}=1} and with w i i = 0 {\displaystyle w_{ii}=0} , [ W x ] i {\displaystyle [Wx]_{i}} is simply the average value observed at the neighbors of i {\displaystyle i} . These lagged variables can then be used in regression analysis to incorporate the dependence of the outcome variable on the values at neighboring sites.15 The standard regression equation is
The spatial lag model adds the spatial lag vector to this
where ρ {\displaystyle \rho } is a parameter which controls the degree of autocorrelation of y {\displaystyle y} .16 This is similar to an autoregressive model in the analysis of time series.
Cliff, A.D. and Ord, J.K. (1981). Spatial Processes: Models & Applications. Pion. ISBN 9780850860818.{{cite book}}: CS1 maint: multiple names: authors list (link) 9780850860818 ↩
"Contiguity-Based Spatial Weights". https://geodacenter.github.io/workbook/4a_contig_weights/lab4a.html ↩
Dale MR, Fortin MJ. Spatial analysis: a guide for ecologists. Cambridge University Press; 2014 Sep 11. ↩
Bivand RS, Wong DW. Comparing implementations of global and local indicators of spatial association. Test. 2018 Sep;27(3):716-48. ↩
"Distance-Band Spatial Weights". https://geodacenter.github.io/workbook/4b_dist_weights/lab4b.html ↩
"Spatial Weights as Distance Functions". https://geodacenter.github.io/workbook/4c_distance_functions/lab4c.html ↩
Legendre P, Legendre L. Numerical ecology. Elsevier; 2012 Jul 21. ↩
"Applications of Spatial Weights". https://geodacenter.github.io/workbook/4d_weights_applications/lab4d.html ↩
Anselin L, Griffith DA. Do spatial effecfs really matter in regression analysis?. Papers in Regional Science. 1988 Jan 1;65(1):11-34. ↩
Seya H, Yoshida T, Yamagata Y. Spatial econometric models. InSpatial Analysis Using Big Data 2020 Jan 1 (pp. 113-158). Academic Press. ↩