Wednesday, March 9, 2016

Matlab: Global Geary's C

Introduction

Geary's C is a measure of spatial autocorrelation or an attempt to determine if adjacent observations of the same phenomenon are correlated. Geary's C is also known as Geary's contiguity ratio or simply Geary's ratio. While Moran's I measures global spatial autocorrelation, Geary's C is more sensitive to local spatial autocorrelation. Geary's C is related to Moran's I, but it is not identical.
Global Geary's C is defined as
\[C = \left( {n - 1} \right)\frac{{\sum\limits_{i = 1}^n {\sum\limits_{j = 1}^n {{w_{ij}}{{\left( {{x_i} - {x_j}} \right)}^2}} } }}{{2n{S^2}\sum\limits_{i = 1}^n {\sum\limits_{j = 1}^n {{w_{ij}}} } }}\] \[{S^2} = \frac{1}{n}\sum\limits_{i = 1}^n {{{\left( {{x_i} - \overline x } \right)}^2}} \]
where xi denotes the observed value at location i, xbar is the mean of the variable x over the n locations and wij are the elements of the spatial weights matrix, defined as 1 if location i is contiguous to location j and 0 otherwise.
Given the null hypothesis is one of no global spatial autocorrelation, the expected value of Geary's C equals 1. As with Moran's I, inference is based on z-scores:
\[{Z_C} = \frac{{C - 1}}{{\sqrt {{\rm{Var}}\left[ C \right]} }}\] \[\begin{array}{c} {\rm{Var}}\left[ C \right] = \frac{1}{{n\left( {n - 2} \right)\left( {n - 3} \right)S_0^2}}\\ \times \left\{ {S_0^2\left[ {{n^2} - 3 - {{\left( {n - 1} \right)}^2}{S_3}} \right]} \right.\\ + {S_1}\left( {n - 1} \right)\left[ {{n^2} - 3n + 3 - \left( {n - 1} \right){S_3}} \right]\\ \left. { + \frac{1}{4}{S_2}\left( {n - 1} \right)\left[ {{S_3}\left( {{n^2} - n + 2} \right) - \left( {{n^2} + 3n - 6} \right)} \right]} \right\} \end{array}\] \[{S_0} = \sum\limits_{i = 1}^n {\sum\limits_{j = 1}^n {{w_{ij}}} } \] \[{S_1} = \frac{1}{2}\sum\limits_{i = 1}^n {\sum\limits_{j = 1}^n {{{\left( {{w_{ij}} + {w_{ji}}} \right)}^2}} } \] \[{S_2} = \sum\limits_{i = 1}^n {{{\left( {\sum\limits_{j = 1}^n {{w_{ij}}} + \sum\limits_{j = 1}^n {{w_{ji}}} } \right)}^2}} \] \[{S_3} = \frac{{{{\left( {\sum\limits_{i = 1}^n {\left( {{x_i} - \overline x } \right)} } \right)}^4}}}{{{{\left( {\sum\limits_{i = 1}^n {{{\left( {{x_i} - \overline x } \right)}^2}} } \right)}^2}}}\]
The p-value for the null hypothesis is given as
\[p = {\rm{erfc}}\left( {\frac{{\left| {C - {\rm{E}}\left[ C \right]} \right|}}{{\sqrt {2{\rm{Var}}\left[ C \right]} }}} \right)\] \[{\rm{E}}\left[ C \right] = 1\]
this formula sources from Aki-Hiro Sato. Applied Data-Centric Social Sciences: Concepts, Data, Computation and Theory. Japan, Springer, 2014. pp. 138-139.
The value of Geary's C lies between 0 and 2. 1 means no spatial autocorrelation. Values lower than 1 demonstrate increasing positive spatial autocorrelation, whilst values higher than 1 illustrate increasing negative spatial autocorrelation.
栅格数据的权重规则:In its simplest form, these weights will take values 1 for close neighbours, and 0 otherwise,按照三种邻接模式Rooks case, Bishops case, Queens case,分别计算Global Geary's C.

References

No comments:

Post a Comment