Environment and Planning A 2015, volume 47, pages 227 – 242
doi:10.1068/a130063p
A unified bootstrap test for local patterns of spatiotemporal association Na Yan, Chang-Lin Mei ¶, Ning Wang Department of Statistics, School of Mathematics and Statistics, Xi’an Jiaotong University, Xi’an, 710049, People’s Republic of China; e-mail:
[email protected],
[email protected],
[email protected] Received 24 July 2013; in revised form 12 March 2014 Abstract. There has been a growing interest in using local statistics to identify spatial or spatiotemporal association patterns among georeferenced data, in which the null distributions of the statistics play a key role for the confirmatory inferences. In this study we focus on a generic form of local spatiotemporal statistics and propose a unified bootstrap approach to derive the null distribution of the statistic. In particular, the spatiotemporal variants of the commonly used local spatial statistics Moran’s Ii, Geary’s ci, and Getis and Ord’s Gi are studied in detail. Some simulations are conducted to evaluate the validity of the bootstrap method in approximating the null distributions of the three spatiotemporal statistics. Meanwhile, the bootstrap method is compared with the permutation approach in terms of approximation accuracy and computation efficiency. The results show that both the bootstrap and the permutation methods can accurately approximate the null distributions of the statistics for various spatiotemporal topological relationships while the bootstrap method seems to be more efficient than the permutation approach. Additionally, the power of the spatiotemporal version of Moran’s Ii in detecting spatiotemporal autocorrelation is empirically assessed and a real-world example is given to demonstrate the application of the bootstrap inference method. Keywords: spatiotemporal data, local spatiotemporal statistics, spatiotemporal association, bootstrap, randomized permutation
1 Introduction With the increasing availability of large georeferenced data, much attention has been paid to the development of local forms of spatial or spatiotemporal statistics for identifying local patterns of spatial or spatiotemporal association. The most popular local spatial statistics are Getis and Ord’s Gi and Gi* (Getis, 1991; Getis and Ord, 1992; Ord and Getis, 1995) and Anselin’s LISAs (local indicators of spatial association) including the local Moran’s Ii and the local Geary’s ci (Anselin, 1995). Recently, some spatiotemporal versions of local spatial statistics have also been proposed (see, for example, Jepsen et al, 2009; Hardisty and Klippel, 2010). The most important issue in using local spatial or spatiotemporal statistics for inference is to derive their null distributions under the null hypothesis of no spatial or spatiotemporal association over the space. The normal approximation has been one popular methodology for deriving the null distributions of local statistics such as Getis and Ord’s Gi and Gi* (Getis and Ord, 1992; Ord and Getis, 1995), local Moran’s Ii (Anselin, 1995), and the spatiotemporal version of local Moran’s Ii (Jepsen et al, 2009). However, many studies have shown that the normal approximation is sometimes problematic (for example, see Anselin, 1995; Bivand et al, 2009; Boots and Tiefelsdorf, 2000; Zhang, 2008). Based on the distributional theory of quadratic forms in normal variables, many improved methods have been developed to ¶ Corresponding author.
228
N Yan, C-L Mei, N Wang
derive the null distributions of commonly used local statistics (for example, see Boots and Tiefelsdorf, 2000; Leung et al, 2003; Tiefelsdorf 1998; 2000; 2002; Tiefelsdorf and Boots, 1997). Nevertheless, these methods depend closely upon the assumption that the data are normally distributed. This assumption might be unrealistic for some real-world datasets. With the power of modern computers, Monte Carlo approaches have been widely used to simulate the distribution of a statistic. In particular, the randomized permutation method, a resampling procedure that randomly relocates the data over the locations, has been applied to approximating the null distributions of local spatial statistics (for example, see Anselin, 1995; McLaughlin and Boscoe, 2007). Recently, Hardisty and Klippel (2010) focused on a spatiotemporal version of the local Moran’s Ii and proposed a so-called spatial memoization strategy to compute the p-value of the permutation test. In their method all of the reference points are firstly categorized according to their spatial topological relationships or the numbers of neighbours. Then, the randomized permutation is performed for each spatial relationship to estimate the probability density of the statistic which is stored for the calculation of the p-values at all the reference points in the category of the corresponding spatial relationship. The spatial memoization approach requires permutation replications to be performed for each topological relationship rather than for each reference point and can largely reduce the computational cost. Nevertheless, the validity of using the randomized permutation to approximate the null distributions of the spatiotemporal versions of not only the local Moran’s Ii but also the other local spatial statistics needs to be investigated and some other Monte Carlo methods are perhaps worthy of development. The bootstrap method, originally proposed by Efron (1979), is a powerful resampling method for simulating the distribution of a statistic. This method draws new samples with replacement from the data to generate a series of values of the statistic, based on the theoretical result that the empirical distribution of the data is a consistent estimator of the population distribution. In view of the theoretical basis of the bootstrap method and its easily implemented resampling scheme, it is of interest to use this method to derive the null distributions of local spatiotemporal statistics and to make inference on the patterns of spatiotemporal association. In this paper we focus on a generic form of local spatiotemporal statistics and propose a unified bootstrap test for local patterns of spatiotemporal association. Specifically, in section 2 a generic local spatiotemporal statistic which is a straightforward extension of the spatial statistic Ci in, for example, Getis (1991) and Anselin (1995) is presented and its bootstrap procedure for testing local spatiotemporal association is proposed. Furthermore, the spatial memoization strategy and a so-called FDR criterion are recommended to deal with the issues of the computation and the multiple tests, respectively. In section 3 we conduct some simulations to empirically assess the validity and the efficiency of both the bootstrap and the randomized permutation methods in approximating the null distributions of the commonly used spatiotemporal versions of local Moran’s Ii, local Geary’s ci, and Getis and Ord’s Gi. Additionally, the power of the local spatiotemporal Moran’s Ii in identifying spatiotemporal autocorrelation is examined by simulation experiments. In section 4 a real-world dataset is analyzed to demonstrate the application of the bootstrap inference. The paper is concluded with some final remarks. 2 A generic local statistic for measuring spatiotemporal association and its bootstrap inference procedure 2.1 Spatiotemporal data and the local statistic
Let Y be the random variable that we consider, (u, v) be the coordinates of a spatial location, and t be the coordinate of time. Given a spatial region, suppose that the observations of Y are collected at T time points t1, t2, … , tT, and nk geographical locations (uik, vik) (i = 1, 2, … , nk) for each of tk (k = 1, 2, … , T ). Here, it is assumed that either (uik, vik) (i = 1, 2, … , nk) or nk
A unified bootstrap test for local patterns of spatiotemporal association
229
may be different at each tk. Denote by yik the observation of Y at the spatiotemporal point (uik, vik, tk). In particular, when n1 = n2 = … = nT = n and (uik, vik) = (ui, vi) (i = 1, 2, … , n) are same for each tk, {yik; i = 1, 2, … , n, k =1, … , T } are spatial panel data. Getis (1991) and Anselin (1995) have demonstrated that many local spatial statistics, such as local Moran’s Ii, Geary’s ci, and Getis and Ord’s Gi, can unitedly be expressed as a so-called cross-product statistic Ci. As a straightforward extension of Ci to the spatiotemporal data { yik; i = 1, 2, … , nk, k =1, … , T }, a generic local statistic for measuring spatiotemporal association among the observations at the reference point (uik, vik, tk), which we denote by Cik, can be expressed by nl
T
Cik =
/ /w l=1 j=1
(ik) jl
a^ yik, y jl h ,
(1)
where a( yik, yjl) is a similarity measure between the observations yik at (uik, vik, tk) and yjl at (ujl, vjl, tl), and w (jlik) is a weight that specifies whether or not the point (ujl, vjl, tl) is in the prespecified spatiotemporal neighbourhood of (uik, vik, tk). A binary coding scheme is commonly used to determine the weights w (jlik) ( j = 1, 2, … , nl, l =1, 2, … , T ) for each point (uik, vik, tk). That is, set w (jlik) = 1 if (ujl, vjl, tl) is in the neighbourhood of (uik, vik, tk); set w (jlik) = 0 otherwise. Generally, wik(ik) = 0 is assumed. The neighbourhood of each reference point (uik, vik, tk) is specified by the adjacency relationship among the spatiotemporal units where the observations of Y are collected or by defining an appropriate distance in the spatiotemporal space to specify the neighbourhood of (uik, vik, tk) as the area within a threshold radius d. Once the spatiotemporal weights {w (jlik); i = 1, 2, f, nk , j = 1, 2, f, nl, k, l = 1, 2, f, T } are given, different forms of the similarity measure a( yik, yjl) yield different local spatiotemporal statistics at the reference point (uik, vik, tk). For example, setting a ( yik, y jl) = ( yik - yr) ( y jl - yr) or ( yik - y jl) 2 will yield the spatiotemporal version of local Moran’s Ii or local Geary’s ci, where yr is the overall mean of the observations of Y. Specifically, by rescaling the statistics, the spatiotemporal versions of the local Moran’s Ii and Geary’s ci which we denote by Iik and cik are ^ N - 1 h^ yik - yr h
Iik =
w+(ik)
and ^ N - 1h
cik =
w
T
nl
l =1 j =1 nl
/ /^y
l =1 j =1 nl
T
T
/ /w
/ /w
y jl - yr h ,
r h2 jl - y
(ik) jl ^ ik
l =1 j =1 nl T (ik) ^ + l =1 j =1
//
(ik) jl ^
y - y jl h2
y jl - yr h2
,
respectively, where 1 yr = N
nl
T
//y
l =1 j =1
jl
is the overall mean of the observations, N=
T
/n
l
l =1
is the total number of the observations, and w+(ik) =
T
nl
/ /w
l =1 j =1
(ik) jl
230
N Yan, C-L Mei, N Wang
is the sum of the weights at the reference point (uik, vik, tk). By neglecting the scale factor w+(ik) , both Iik and cik inherit the additivity of Anselin’s LISAs in the sense that T
nk
//I
k =1 i =1
ik
,
and T
nk
/ /c
k =1 i =1
ik
are the spatiotemporal versions of the global Moran’s I and Geary’s c, respectively. Furthermore, after somewhat manipulating the concept of similarity measure and setting a( yik, yjl) = yjl, we obtain the scaled spatiotemporal version of the local Getis and Ord’s Gi as ^ N - 1h
Gik =
w+(ik)
nl
T
/ /w
(ik) jl
//y
jl
l =1 j =1 nl T
l =1 j =1
y jl ,
where we assume ( j, l ) ! (i, k), indicating that the observation yik at the reference point (uik, vik, tk) is not used in the statistic. The explanations of Iik, cik, and Gik are similar to those of the local spatial Moran’s Ii, Geary’s ci, and Getis and Ord’s Gi [see, Anselin (1995) and Ord and Getis (1995) for details] except that the spatial neighbourhood of a reference point is replaced by its spatiotemporal neighbourhood. 2.2 Determination of the spatiotemporal neighbourhood
The local spatiotemporal statistic Cik depends upon the spatiotemporal neighbourhood. For local spatial statistics, the neighbourhood is generally specified by the topological relationships of the spatial units or by a circular region with its radius being a given distance d (Anselin, 1995; Getis and Ord, 1992; Ord and Getis, 1995). Following the method in Huang et al (2010), we define in spatiotemporal space a scaled distance between the points (uik, vik, tk) and (u, v, t) as d (ik) (u, v, t) = 6^u - uik h2 + ^v - vik h2 + n 2 ^t - tk h2@ 2 , 1
(2)
where n > 0 is a scale factor used to balance the different effects in measuring the spatial and the temporal distances in their respective metric systems. Based on this distance, a spatiotemporal neighbourhood of the reference point (uik, vik, tk) can be specified by the ellipsoid {(u, v, t); d (ik) (u, v, t) G d }, where d > 0 is a constant controlling the size of the neighbourhood. Under this neighbourhood the binary weights {w (jlik); i = 1, 2, f, nl, l = 1, 2, f, T } at the reference point (uik, vik, tk) are designated by 1, w (jlik) = ) 0,
if 0 1 d (ik) (u jl, v jl, tl) G d , otherwise.
In what follows, we provide some discussion on the selection of the parameters n and 1 d. In order to facilitate the presentation, we let ds = [(u - uik ) 2 + (v - vik ) 2] 2 and dt = t - tk be the distances in space and in time, respectively. Then the spatiotemporal neighbourhood of the reference point (uik, vik, tk) is ds2 + n 2 d t2 G d 2 ,
A unified bootstrap test for local patterns of spatiotemporal association
231
from which we know that ds G d and dt G d/n. Therefore, the parameter d controls the extent of the spatial region, while d/n determines the range of time. In practice, we can select the value of d according to the topological relationships of the spatial units or the desired extent of the spatial neighbourhood and then adjust the value of n to meet the requirement of the number of time points that should be included in the neighbourhood. For example, if one wants the spatiotemporal neighbourhood to be extensive in space and short in time period, large values of d and n should be selected; if one wants the neighbourhood to be small in space and long in time period, small values of d and n should be chosen. However, like local spatial statistics, the local spatiotemporal statistics depend upon the specified neighbourhood, which may mean that the related inference results are scale dependent. Therefore, it might be useful in practice to try different spatiotemporal neighbourhoods for a more comprehensive analysis of the data. 2.3 The bootstrap inference for Cik
In order to implement the Cik-based inference, we should firstly derive the distribution of Cik under the null hypothesis that there is no spatiotemporal association over the region. Although the derivation of the exact or the asymptotic null distribution of Cik seems to be difficult, it is feasible to use some resampling techniques to simulate the null distribution of Cik. In what follows, we propose a bootstrap inference procedure for Cik. Step 1. Based on the observations { yjl; j = 1, 2, … , nl, l = 1, 2, … , T } and the weights {w (jlik); j = 1, 2, f, nl, l = 1, 2, f, T }, calculate the observed value Cik(0) of Cik according to equation (1). Step 2. Randomly draw with replacement a bootstrap sample { y *jl; j = 1, 2,f, nl , l = 1, 2,f, T } from { yjl; j = 1, 2, … , nl, l = 1, 2, … , T } and calculate the bootstrap value C*ik of Cik by T
C*ik =
nl
/ /w
l =1 j =1
(ik) jl
a _ yik* , y *jl i .
(3)
Step 3. Repeat step 2 R times and obtain R bootstrap values of Cik which we denote by {C*ik (m); m = 1, 2, f, R}. The null distribution of Cik is then approximated by the empirical distribution function of {C*ik (m); m = 1, 2, f, R}: that is, R
1 Fik* (x) = R I ^C*ik (m) G x h , m =1
/
which we call the bootstrap distribution of Cik, where I ($) is the indicator function. Furthermore, based on the bootstrap values {C*ik (m); m = 1, 2, f, R} and the observed value Cik(0) of Cik, the p-value for testing spatiotemporal association at the reference point (uik, vik, tk) can be approximated by the frequency of C*ik (1), C*ik (2), f, C*ik (R) being less than or larger than the observed value Cik(0) , depending on the related alternative hypothesis. Here, we take the statistic Iik as an example to illustrate in detail how to compute the p-values for different alternative hypotheses. Let Iik(0) and {Iik* (m); m = 1, 2, f, R} be the observed value and the bootstrap values of Iik at the reference point (uik, vik, tk), respectively. A large positive value of Iik means that the observation of Y at the reference point is similar to those in its neighbourhood and tends to support the alternative hypothesis that the observation at (uik, vik, tk) is positively autocorrelated with those in its neighbourhood. Therefore, the p-value of Iik for testing positive spatiotemporal autocorrelation at the reference point (uik, vik, tk) is 1 p+ = PH0 ^ Iik H Iik(0)h = R # " Iik* (m); Iik* (m) H Iik(0), m = 1, 2,f. R , ,
(4)
232
N Yan, C-L Mei, N Wang
where PH0 means that the probability is computed under the null distribution of Iik and #A stands for the number of elements in set A. Similarly, a large negative value of Iik tends to support the alternative hypothesis that the observation at (uik, vik, tk) is negatively autocorrelated with those in its neighbourhood. Then, the p-value of Iik for testing negative spatiotemporal autocorrelation at (uik, vik, tk) is 1 p- = PH0 ^ Iik G Iik(0)h = R # " Iik* (m); Iik* (m) G Iik(0), m = 1, 2,f. R , . 2.4 A computation strategy for the bootstrap procedure and an adjustment criterion for multiple tests
(5)
When the statistic Cik is used to identify local spatiotemporal association among the observations, the bootstrap inference generally needs to be performed at all of the spatiotemporal points where the observations are collected, which means that the process of computing the bootstrap values {C*ik (1), C*ik (2), f, C*ik (R)} of Cik or the empirical distribution function Fik* (x) is repeated for each of the points (uik, vik, tk) (i = 1, 2, … , nk, k = 1, 2, … , T ). However, we know from step 2 that it is with replacement that each bootstrap sample { y *jl; j = 1, 2, f, nl, l = 1, 2, f, T } is drawn from the observations { yjl; j = 1, 2, … , nl, l =1, 2, … , T }, which implies that { y *jl; j = 1, 2, f, nl, l = 1, 2, f, T } are independent and identically distributed samples with the common empirical distribution of the observations. Therefore, for the observation points sharing the same weights, the distributions of C*ik in equation (3) are theoretically identical, so that it is reasonable to assume that the bootstrap distributions Fik* (x) at such observation points are approximately the same and the spatial memoization strategy proposed in Hardisty and Klippel (2010) works for the bootstrap inference. That is, for those observation points that share a common weight structure, we need to compute the bootstrap values {C*ik (m); m = 1, 2, f, R} at only one of these points and then save them for computing the p-values at all of these points. In particular, when the weights {w (jlik); j = 1, 2, f, nl, l = 1, 2, f, T } at each observation point (uik, vik, tk) are binary, we can categorize all of the observation points according to their numbers of neighbours and need to carry out the bootstrap procedure only once for each category having the same number of neighbours. With this strategy, the computational cost of the bootstrap inference can largely be reduced, especially for regular lattice spatiotemporal tessellations. Since multiple tests are being performed when the bootstrap approach is used for inferences, it is reasonable to consider an adjustment for the prespecified overall significance level. Although the Bonferroni adjustment and the Sidák procedure can readily be used to handle this problem, they are both very conservative especially when the sample size is large (Anselin, 1995). Fortunately, Benjamini and Hochberg (1995) proposed a new criterion—the false discovery rate (FDR)—to adjust the overall significance level. Castro and Singer (2006) have applied the FDR criterion to the multiple and dependent tests in local spatial statistics. The results have shown that the FDR approach is much more powerful than the Bonferroni method and the Sidák method. Therefore, we recommend the FDR criterion be used in the present case to deal with the problem of multiple tests. The FDR criterion is described in what follows, where we suppose that the Cik-based test is performed at all of the observation points. (i) Compute the p-values by the aforementioned strategy at N observation points and order these p-values in ascending order as p(1) G p(2) G f G p(N) . (ii) Starting from p(N), find the first p(k) that satisfies p(k) G (k/N ) a, where a is the overall significance level. Then, the adjusted significance level is (k/N )a.
A unified bootstrap test for local patterns of spatiotemporal association
233
3 Simulation studies In this section we will conduct some simulations to evaluate the validity of the bootstrap procedure in approximating the null distributions of the commonly used local spatiotemporal statistics Iik, cik, and Gik. Meanwhile, a comparison with the permutation approach is made in terms of approximation accuracy and computation efficiency. Furthermore, the power of Iik for detecting both positive and negative autocorrelations is assessed by properly designed experiments with the FDR criterion applied to adjust the overall significance level. All of the numerical experiments are implemented under the environment of Matlab 7.6. 3.1 Validity of the bootstrap procedure in approximating the null distributions of Iik, cik, and Gik
3.1.1 Design of the spatiotemporal layout Farber et al (2009) showed that a spatial tessellation of square lattices may be topologically dissimilar to real-world systems and Boots and Tiefelsdorf (2000) pointed out that numerous studies had found that irregular spatial tessellations share, on average, many topological properties with a hexagonal tessellation which is more appropriate for investigating the distributional properties of spatial test statistics. On the basis of these arguments, we design a hexagonal spatial tessellation which consists of 441 regular hexagons with the distance between the centres of any two adjacent hexagons being 0.25 unit. (This spatial tessellation can be seen in figure 2 below.) Along its vertical direction we duplicate this spatial tessellation at the four time points t1 = 0, t2 = 1, t3 = 2, and t4 = 3 to construct a spatiotemporal layout for the simulation studies. The observations of Y are assumed to be collected at the centre of each hexagon. If the time axis is vertically set at the origin of the spatial region, the spatiotemporal coordinates for collecting the observations can be expressed as 1 1 i -1 1 i - 1 31/2 31/2 i -1 (ui, vi, tk) = : 8 + 8 int a 21 k + 4 mod a 21 k, 12 + 8 int a 21 k, k - 1D , with i = 1, 2, … , 441 and k = 1, 2, 3, 4, where int(a/b) and mod(a/b) stand for the integer part and the remainder of a divided by b, respectively. The observations { yik; i = 1, 2, … , n, k =1, 2, … , T } collected in this way are spatial panel data with n = 441, T = 4, and sample size N = 441 × 4 = 1764. 3.1.2 Design of the experiment (i) Generating the observations. The observations { yjl; j = 1, 2, … , n, l =1, 2, … , T } of Y are independently drawn from a given population and are randomly allocated to each of the points {(uj, vj, tl); j = 1, 2, … , n, l =1, 2, … , T }, which implies that the null hypothesis of no spatiotemporal association among the observations is satisfied. In order to evaluate the performance of the bootstrap method for not only normally but also nonnormally distributed observations, we consider the following two populations from which the observations are drawn: (a) the normal distribution N(5, 1); (b) the uniform distribution U(0, 1). (ii) Choosing reference points. In the simulation the parameters n and d for determining the spatiotemporal neighbourhood are set to n = d = 0.25, which lead to ds G 0.25 and dt G 1. In this case (ui, vi, tk) and (uj, vj, tk) are spatial neighbours with each other if the corresponding two hexagons share a common side; (ui, vi, tk) and (ui, vi, tl) are temporal neighbours with each other if tk and tl are two adjacent time points. Under such a spatiotemporal topological relationship, all of the observation points can be classified as six different categories according to the numbers of their neighbours. The numbers of neighbours for these six categories are 3, 4, 5, 6, 7, and 8, respectively. According to the memoization strategy, we need to evaluate the validity of the bootstrap method for approximating the null distributions of the statistics
234
N Yan, C-L Mei, N Wang
at only six such reference points that come from each of the six categories. Here, we choose six reference points to be 1 31/2 A = (u1, v1, t1) = a 8 , 12 , 0 k with three neighbours, 41 31/2 B = (u21, v21, t1) = a 8 , 12 , 0 k with four neighbours, 21 31/2 C = (u11, v11, t1) = a 8 , 12 , 0 k with five neighbours, 21 31/2 D = (u11, v11, t2) = a 8 , 12 , 1 k with six neighbours, 1/2 31 4 (3) E = (u221, v221, t1) = c 8 , 3 , 0 m with seven neighbours and 1/2 31 4 (3) F = (u221, v221, t2) = c 8 , 3 , 1 m with eight neighbours.
3.1.3 Validity of the bootstrap method with a comparison with the permutation approach Considering the fact that the probability density function of a random variable is more sensitive than its cumulative distribution function in reflecting distributional characteristics, we evaluate the validity of both the bootstrap and the permutation methods in approximating the null distribution of each statistic by comparing its simulated true probability density function with those derived by the bootstrap and the permutation methods. (i) Simulating the true probability density functions at the reference points. In order to facilitate the presentation, we take the statistic Iik at only one of the selected six reference points and under the population distribution N(5, 1) as an example to demonstrate the process of simulating the true probability density function. We repeatedly draw M = 104 samples of Y from N(5, 1) and compute M = 104 values of Iik which we denote by Iik(1), Iik(2), … , Iik (M). The true probability density function of Iik can be estimated by the nonparametric kernel approach (see, for instance, Wasserman, 2006, chapter 6, page 132). That is, the estimated probability density function of Iik is 1 fI (x) = Mh
/ K; x - hI ( j) E . M
j =1
ik
(6)
Here, the Gaussian kernel K (z) = [1/ (2r) 1/2] exp (- z 2 /2) is used and the bandwidth h is 1 chosen by the so-called rule of thumb: that is, h = 1.059sM - 5 with s being the standardized sample variance of {Iik(1), Iik(2), … , Iik(M)}. We hereinafter call fI (x) the empirical density function of the statistic Iik at (ui, vi, tk). Because the sample size M = 104 is large enough, the resulting empirical density function can be used as the true density function for the purpose of comparison. It should be noted that it is in the simulation that the true density function of each statistic can be estimated in this way. In practice, however, the empirical density functions are not available because the population distribution from which the observations of Y are drawn is unknown.
A unified bootstrap test for local patterns of spatiotemporal association
235
(ii) Estimating the bootstrap density functions and the permutation density functions of the statistics. Given the observations { yjl; j = 1, 2, … , n, l =1, 2, … , T } of Y and one of the statistics with a reference point (ui, vi, tk), we repeatedly draw R = 104 bootstrap samples from the observations and compute R bootstrap values of the statistic on which the bootstrap density function can be estimated. Once again, taking the statistic Iik as an example, we estimate its bootstrap density function at (ui, vi, tk) by the same kernel estimation procedure as that in equation (6) in which the values {Iik(1), Iik (2), … , Iik (M)} are replaced by the bootstrap values {Iik* (1), Iik* (2), f, Iik* (R)}. Meanwhile, R = 104 permutation samples are also drawn from the observations { yjl; j = 1, 2, … , n, l =1, 2, … , T } to compute the values of the statistic on which the permutation density function is estimated by the kernel estimation procedure. Given each combination of the three statistics, the six reference points, and the two population distributions, a sample { yjl; j = 1, 2, … , n, l =1, 2, … , T } can result in a bootstrap density function and a permutation density function, respectively. In order to comprehensively evaluate the validity of the bootstrap and the permutation methods in approximating the null distribution of each statistic, we choose 100 samples of Y from the M = 104 samples that are used for simulating the empirical density function and obtain 100 bootstrap density functions and 100 permutation density functions, respectively. We depict the 5th quantile, median, and 95th quantile lines of these 100 density functions and the corresponding empirical density function to show the validity of the two methods in approximating the null distributions of the statistics. It is found that the bootstrap and the permutation methods produce almost identical results in each of the experimental settings. Because of limited space, we show only a part of the results in figure 1. It can be observed from figure 1 that, for both the bootstrap and the permutation methods, the band between the 5th and the 95th quantile lines of the 100 density functions is very narrow and the median line almost overlaps the corresponding empirical density function in each experimental setting. The results demonstrate that both methods work very well in approximating the null distributions of the local spatiotemporal statistics Iik, cik, and Gik. Furthermore, it can be seen that the empirical density function of each statistic is somewhat different at the different reference points, showing that the variance of the distribution becomes smaller with an increasing number of neighbours, which indicates that spatiotemporal topological relationship has some effect on the null distributions of the statistics. However, both the bootstrap and the permutation methods are adaptive to a variation in the null distributions and provide a very accurate approximation for various topological relationships. Additionally, the results that both the bootstrap and the permutation methods can approximate the null distributions of the statistics for the two population distributions very well [the results for the population N(5, 1) are not shown here] imply that these two methods are both insensitive to the nonnormality in the observations. 3.1.4 Efficiency comparison between the bootstrap and the permutation methods For the purpose of comparing the efficiency of the bootstrap and the permutation methods, we report in table 1 the time for running each of the experimental settings on a common personal computer, where the bootstrap resampling was implemented by writing the Matlab codes by ourselves and the permutation resampling was carried out by directly calling on the Matlab subroutine “randperm”. It can be seen from table 1 that, in all of the experimental settings, the bootstrap method takes about 50s and 75s less than the permutation method for the population distributions N(5,1) and U(0,1), respectively. The additional simulation that we had conducted demonstrates that the difference in the running time between the bootstrap and the permutation methods becomes larger and larger with the sample size N increasing.
236
N Yan, C-L Mei, N Wang
(a)
(b)
(c)
(d)
Figure 1. [In colour online.] The 5th quantile, median, and 95th quantile lines of the 100 estimated density functions with the corresponding empirical density function for the population distribution U(0, 1). Panel (a): bootstrap for Iik; panel (b): permutation for Iik; panel (c): bootstrap for cik; panel (d): bootstrap for Gik.
A unified bootstrap test for local patterns of spatiotemporal association
237
Table 1. Running time (in seconds) of the bootstrap and the permutation methods for each of the experimental settings. Statistic Iik cik Gik
Method bootstrap permutation bootstrap permutation bootstrap permutation
N(5, 1)
U(0, 1)
A
B
C
D
E
F
A
B
C
D
E
F
294 344 289 349 291 337
295 344 301 352 290 338
296 345 292 353 290 337
294 347 298 345 283 337
294 346 297 349 283 347
294 346 298 348 283 351
267 338 270 338 262 340
267 338 267 344 267 339
267 336 265 343 265 341
271 336 263 342 266 340
269 338 268 342 271 341
267 336 263 341 264 341
For example, when the numbers of the time points T = 5, 6, and 7 (that is, the sample size N = 2205, 2646, and 3087), the differences in the running time are respectively 67s, 85s, and 96s for the setting of statistic Iik with population distribution N(5,1) and reference point A. The running time difference between the two methods comes mainly from the resampling process because the other computational cost is same for the two methods. It should be noted that a bootstrap sample is drawn with replacement while a permutation sample is drawn without replacement. The replacement resampling scheme independently draws the elements from the observations one after another and does not need to judge whether or not the current element has been drawn before, which is perhaps the main reason why the bootstrap method is more efficient. Although the hexagonal spatial tessellation as a sampling grid has attracted increasing attention, a spatial tessellation of square lattices is sometimes encountered in practice, particularly in the context of the pixels of remotely sensed images (Boots and Tiefelsdorf, 2000). With this consideration, we also conduct the same simulation for the spatial tessellation consisting of 21 × 21 square lattices with four time points. The results are all similar to those for the hexagonal spatial tessellation. Because of limited space these results are omitted here, but they are available from the authors. 3.2 Power of the statistic Iik in identifying spatiotemporal autocorrelation
In this subsection we take Iik as an example to evaluate via simulation its power in uncovering local positive and local negative spatiotemporal autocorrelations among the observations. Since the bootstrap and the permutation methods perform almost equally well in deriving the null distribution of the statistic, we use only the bootstrap method to derive the p-values of the tests. Furthermore, the FDR criterion is employed to deal with the problem of multiple tests. 3.2.1 Design of the experiment We take the same spatiotemporal layout and neighbourhood structure as those in subsection 3.1.1 for the simulation. The observations of Y are generated by yik = S (ui, vi, tk) + fik,
i = 1, 2,f, n,
k = 1, 2,f, T ,
(7)
) are signals, and fik (i = 1, 2, … , n, where S(ui, vi, tk) (i = 1, 2, … , n, k = 1, 2, … , T k = 1, 2, … , T ) are noise; fik (i = 1, 2, … , n, k = 1, 2, … , T ) are randomly drawn from the normal distribution N(0, 0.52) and the signals are set to have different forms according to the different experimental purposes.
238
N Yan, C-L Mei, N Wang
In order to evaluate the power of Iik in identifying local positive spatiotemporal autocorrelation among the observations, we set the signals to be S1 (ui, vi, tk) , =
7 (3) 1/2 m2 5 1 1 13 2 c ; - 2 (1 + t k2) E2 2 exp (2 aui - 8 k + vi 12 1 + 0.5t k 1 + 0.75t k + exp (-
1/2 2 1 37 k2 + c - 7 (3) m - 5 + 2 E2 ; a u v i 8 12 2 (1 t k ) 1 + 0.75t k2 i
+ exp (-
25 (3) 1/2 m2 5 1 25 2 c ; - 2 (1 + t k2) E2 2 aui - 8 k + vi 12 1 + 0.75t k
+ exp (-
1/2 2 1 49 k2 + c - 25 (3) m - 5 + 2 E2 ; a u v i 8 12 2 (1 t k ) , 1 + 0.75t k2 i
where i = 1, 2, … , n, k = 1, 2, … , T. In order to show the spatial patterns of the signals more clearly, the function S1(u, v, tk) at each time point tk is treated as a continuous function of the spatial coordinate (u, v) and the surfaces of S1(u, v, tk) for tk = 0, 1, 2, and 3 are depicted in the first column of panel (a) in figure 2. It can be observed that there are four sharp peaks at tk = 0 and tk = 1 and one gentle peak at tk = 2 and tk = 3 on the surfaces of the signals. According
(a)
(b)
Figure 2. [In colour online.] Patterns of the signals and the spatial locations (in black) where positive or negative autocorrelation is significant under the overall significance level a = 0.05 [the second columns of panels (a) and (b)] and under the adjusted significance level [the third columns of panels (a) and (b)] at each time point.
A unified bootstrap test for local patterns of spatiotemporal association
239
to the patterns of the signals, it could be expected that significant positive autocorrelation among the observations of Y will be identified in the areas surrounding the peaks. In order to evaluate the power of Iik in identifying local negative spatiotemporal autocorrelation among the observations, the signals S2(ui, vi, tk) (i = 1, 2, … , n, tk = 0, 1, 2, 3) are set in the following way. At each time point tk, let 5 (3) 33 1 1 A1 (tk) = '(ui, vi); ui - 8 G 2 + 4 tk, vi - 6
1/2
31/2 1 G 4 + 4 tk, i = 1, 2, f, n 1 ,
and 11 (3) 29 1 1 A2 (tk) = '(ui, vi); ui - 8 G 2 + 4 tk, vi - 6
1/2
31/2 1 G 4 + 4 tk, i = 1, 2, f, n 1 .
For the spatial locations (ui, vi) ! A1 (tk) , A2 (tk) in a same row, we set S2(ui, vi, tk) =1 and 10 by turns, and further let the values of S2(ui, vi, tk) at the spatial locations in the former time point be different from those at the corresponding spatial locations in the latter time point. For (ui, vi) b A1 (tk ) , A2 (tk ), we set S2(ui, vi, tk) = 5.5. The values of S2(ui, vi, tk) (i = 1, 2, … , n) at the time points tk = 0, 1, 2, and 3 are depicted in the first column of panel (b) in figure 2. With the patterns of the signals, it could be expected that significant negative autocorrelation among the observations of Y will be identified in the areas A1 (tk) , A2 (tk) (tk = 0, 1, 2, 3). 3.2.2 Computation of the p-values and visualization of the results We generate two sets of observations { yik; i = 1, 2, … , n, k =1, 2, … , T } of Y according to equation (7) with the signals being S1(ui, vi, tk) and S2(ui, vi, tk), respectively. Based on the two sets of observations, we respectively compute the p-value p+ for testing positive autocorrelation and the p-value p- for testing negative autocorrelation at each of the spatiotemporal points (ui, vi, tk) (i = 1, 2, … , n, k =1, 2, … , T ) by the bootstrap method, in which the bootstrap replication R is set to 104. The memoization strategy is used in computing p-values at the observation points. That is, we compute at each of the six observation points A–F selected in subsection 3.1.2 the bootstrap values {Iik* (1), Iik* (2), f, Iik* (R)} with which the observed value of Iik at each observation point in the corresponding class is compared to obtain the p-value p+ or p- according to equation (4) or (5). We set the overall significance level to be a = 0.05. By using the FDR criterion, the adjusted significance levels are a+ = 0.0149 for testing positive autocorrelation and a- = 0.0079 for testing negative autocorrelation, respectively. For the case of testing positive autocorrelation, we show at each of the time points tk = 0, 1, 2, and 3 the spatial locations where the p-values are less than the overall significance level a = 0.05 and less than the adjusted significance level a+ = 0.0149 in the second and the third columns of panel (a) in figure 2, respectively. For the case of detecting negative autocorrelation, the results are shown in the second and the third columns of panel (b) in figure 2. Comparing the signal surfaces with their respective testing results, we know that, at each time point, the statistic Iik correctly identifies the regions where positive or negative autocorrelation among the observations is found. Although some designed locations where spatiotemporal autocorrelation is significant are ignored under the adjusted significance level, the basic autocorrelation patterns are still identified by the test statistic. 4 A real-world example
4.1 Description of the data and choice of the spatiotemporal neighbourhood
The dataset consists of the annual precipitation amounts recorded at the 573 meteorological stations in Mainland China during the period 1986–2005. The spatial location of each station is identified by its longitude and latitude. In order to conveniently compute the distance in equation (2), the longitude and latitude of each station are transformed into Cartesian
240
N Yan, C-L Mei, N Wang
coordinates by the Gauss–Krüger projection under the coordinate system of Xi’an 80, China. Let (ui, vi) be the Cartesian coordinate of the ith station, and Pik be the annual precipitation amount at (ui, vi) and in the kth year where we use k = 1, 2, … , 20 to indicate the years from 1986 to 2005. Obviously, {Pik; i = 1, 2, … , 573, k = 1, 2, … , 20} are spatial panel data. In order to assess the effect of different spatiotemporal neighbourhoods on the autocorrelation patterns among the annual precipitation amounts, we consider two spatiotemporal neighbourhoods which are specified by the following two sets of the parameters: (i) n = 250 and d = 500; (ii) n = 25 and d=250, respectively. For the first set of parameters the spatial distance ds and the temporal distance dt satisfy ds G 500 km and dt G 2 years. That is, we consider a spatiotemporal neighbourhood with a large spatial extent and a short time period. The second group of the parameters leads to ds G 250 km and dt G 10 years, which yields such a spatiotemporal neighbourhood in which the spatial extent is relatively small and the time period is relatively long. It is computed that the number of neighbours for each observation point is between 11 and 199 for the first neighbourhood and between 10 and 327 for the second. In what follows we will use the local statistic Iik with the bootstrap test and the FDR adjustment to detect positive autocorrelation patterns among the precipitation amounts under the two spatiotemporal neighbourhoods with binary weights. 4.2 Testing results by analysis
Given each of the aforementioned spatiotemporal neighbourhoods, we apply once again the memoization strategy described in subsection 2.4 to compute the p-value p+ at each of the observation points {(ui, vi, tk); i = 1, 2, … , 573, k = 1, 2, … , 20} by the bootstrap method in which the bootstrap replication R is set to be 1000. Setting the overall significance level to be a = 0.05 and using the FDR criterion, we find that the adjusted significance levels are a(+1) = 0.0358 for the first neighbourhood and a(+2) = 0.0369 for the second. For each year from 1986 to 2005 the locations where the p-values are less than the overall significance level are marked in black to visualize significant positive autocorrelation among the annual precipitation amounts. Moreover, the same maps are drawn for the adjusted significance level. It should be noted that we show the locations where positive autocorrelation among the precipitation amounts is significant by a contour map of the binary values rather than in a pointwise style in order to illustrate the spatial patterns of positive autocorrelation more informatively. To save space, we show in figure 3 only the maps from 1990 to 2005 with a time increment of five years for the two spatiotemporal neighbourhoods. It can be seen from figure 3 that, given each spatiotemporal neighbourhood, the positive autocorrelation patterns of the annual precipitation amounts over Mainland China are all similar in each year, although some small changes can be observed from one year to another. Since the adjusted significance levels for the two neighbourhoods are all close to the overall significance level, the region where positive autocorrelation is significant under the adjusted significance level shows little change in each year. Additionally, comparing the results in panels (a) and (b), we find that the region where positive autocorrelation among precipitation amounts is significant is quite stable for the two neighbourhoods. One of the most important findings is an everlasting band roughly along Sichuan basin–Qinling Mountains–Huaihe River where positive autocorrelation among the precipitation amounts is not significant. This band partitions the whole region into a north part and a south part where positive autocorrelation is significant, which indicates that the annual precipitation amounts are similar within each part but dissimilar between the two parts. In fact, the Sichuan basin– Qinling Mountains–Huaihe River area is the climate watershed in Mainland China with low precipitation in the north and plentiful precipitation in the south. This climate characteristic is correctly revealed by the testing results.
A unified bootstrap test for local patterns of spatiotemporal association
(a)
241
(b)
Figure 3. [In colour online.] Spatial patterns of significant positive autocorrelation among the precipitation amounts for the two spatiotemporal neighbourhoods [panel (a): n = 250 and d = 500; panel (b): n = 25 and d = 250)] and under the overall significance level a = 0.05 [the first columns of panels (a) and (b)] and the adjusted significance levels [the second columns of panels (a) and (b)].
5 Final remarks In this paper we have focused on the generic local spatiotemporal statistic Cik and proposed a bootstrap inference procedure for identifying local patterns of spatiotemporal association among the data. Meanwhile, the issues of the spatiotemporal neighbourhood selection, the computation strategy, and the multiple tests treatment were discussed with the spatial memoization strategy and the FDR adjustment criterion recommended. Furthermore, we conducted simulations to empirically evaluate the validity of the bootstrap method in approximating the null distributions of the commonly used local spatiotemporal statistics Iik, cik, and Gik and, at the same time, made a comparison with the permutation approach. The results demonstrated that both the bootstrap and the permutation methods can accurately approximate the null distributions of the statistics for various spatiotemporal topological relationships while the bootstrap method seems to be more efficient in terms of the computational cost. Additionally, the power of Iik in identifying positive autocorrelation and negative autocorrelation in the data was empirically evaluated and a real-world dataset was analyzed to illustrate the application of the bootstrap inference procedure. The bootstrap method can well account for nonnormality in the data and can readily be implemented with modern computers. This method is also directly applicable to both the global and the local spatial statistics for the inference of spatial association. In this sense, the bootstrap method is a useful alternative inference tool in identifying spatial or spatiotemporal association among the data. In this paper the performance of the bootstrap method was only
242
N Yan, C-L Mei, N Wang
empirically examined. The theoretical investigation of the validity or the convergence rate in approximating the null distributions of the local statistics deserves to be further studied. Acknowledgements. The authors would like to thank the referees for their valuable comments and suggestions which led to significant improvements on the manuscript. This work was supported by the National Natural Science Foundations of China (No. 11271296 and No. 11326181). References Anselin L, 1995, “Local indicators of spatial association—LISA” Geographical Analysis 27 93–115 Benjamini Y, Hochberg Y, 1995, “Controlling the false discovery rate: a practical and powerful approach to multiple testing” Journal of the Royal Statistical Society B 57 289–300 Bivand R, Müller W G, Reder M, 2009, “Power calculations for global and local Moran’s I ” Computational Statistics and Data Analysis 53 2859–2872 Boots B, Tiefelsdorf M, 2000, “Global and local spatial autocorrelation in bounded regular tessellations” Journal of Geographical Systems 2 319–348 Castro M C, Singer B H, 2006, “Controlling the false discovery rate: a new application to account for multiple and dependent tests in local statistics of spatial association” Geographical Analysis 38 180–208 Efron B, 1979, “Bootstrap method: another look at the jackknife” The Annals of Statistics 7 1–26 Farber S, Páez A, Volz E, 2009, “Topology and dependency tests in spatial and network autoregressive models” Geographical Analysis 41 158–180 Getis A, 1991, “Spatial interaction and spatial autocorrelation: a cross product approach” Environment and Planning A 23 1269–1277 Getis A, Ord J K, 1992, “The analysis of spatial association by use of distance statistics” Geographical Analysis 24 189–206 Hardisty F, Klippel A, 2010, “Analysing spatio-temporal autocorrelation with LISTA-Viz” International Journal of Geographical Information Science 24 1515–1526 Huang B, Wu B, Barry M, 2010, “Geographically and temporally weighted regression for modeling spatio-temporal variation in house prices” International Journal of Geographical Information Science 24 383–401 Jepsen M R, Simonsen J, Ethelberg S, 2009, “Spatio-temporal cluster analysis of the incidence of Campylobacter cases and patients with general diarrhea in a Danish county, 1995–2004” International Journal of Health Geographics 8 1–12 Leung Y, Mei C L, Zhang W X, 2003, “Statistical test for local patterns of spatial association” Environment and Planning A 35 725–744 McLaughlin C C, Boscoe F P, 2007, “Effects of randomization methods on statistical inference in disease cluster detection” Health and Place 13 152–163 Ord J K, Getis A, 1995, “Local spatial autocorrelation statistics: distributional issues and an application” Geographical Analysis 27 286–306 Tiefelsdorf M, 1998, “Some practical applications of Moran’s I’s exact conditional distribution” Papers in Regional Science 77 101–129 Tiefelsdorf M, 2000 Modelling Spatial Processes: The Identification and Analysis of Spatial Relationships in Regression Residuals by Means of Moran’s I (Springer, Berlin) Tiefelsdorf M, 2002, “The saddlepoint approximation of Moran’s I’s and local Moran’s Ii’s reference distributions and their numerical evaluation” Geographical Analysis 34 187–206 Tiefelsdorf M, Boots B, 1997, “A note on the extremities of local Moran’s Ii s and their impact on global Moran’s I ” Geographical Analysis 29 248–257 Wasserman L, 2006 All of Nonparametric Statistics (Springer, New York) Zhang T L, 2008, “Limiting distribution of the G statistics” Statistics and Probability Letters 78 1656–1661