Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Testing spatial correlation (autocorrelation) 1.Moran’s I 2.Geary’s c 3.Variogram 4.Join counts Cliff, A. D. & Ord, J. K. 1981. Spatial processes: models.

Similar presentations


Presentation on theme: "1 Testing spatial correlation (autocorrelation) 1.Moran’s I 2.Geary’s c 3.Variogram 4.Join counts Cliff, A. D. & Ord, J. K. 1981. Spatial processes: models."— Presentation transcript:

1 1 Testing spatial correlation (autocorrelation) 1.Moran’s I 2.Geary’s c 3.Variogram 4.Join counts Cliff, A. D. & Ord, J. K. 1981. Spatial processes: models and applications. Pion Chapter 12 – Correlation between two maps

2 2 Testing correlation between two maps (continuous variables) Proportion of land area classified as phydric ln(elevation) in foot x1x1 x2x2 Gumpertz, M.L., Wu, C.-T. & Pye J.M. 2000. Logistic regression for southern pine beetle outbreaks with spatial and temporal autocorrelation. Forest Science 95-107.

3 3 Assume the correlation coefficient between the two maps is r. The null hypothesis: H 0 : r = 0. If y = (y 1, y 2, …, y N ) is a random, independent sample, and x = (x 1, x 2, …, x N ) is also an independent sample, the test of H 0 is straightforward. Under H 0, r has the distribution (N is sample size, e.g., the number of cells): (*) Therefore, p-value for observing an extreme r obs is: Equivalently, the test of H 0 can be done using a t-test because has a t-distribution. Note these two tests are identical.

4 4 However, in reality y = (y 1, y 2, …, y N ) is rarely an independent sample, neither is x = (x 1, x 2, …, x N ). This nuisance is caused by autocorrelation. Autocorrelation inflates type I error. This means two uncorrelated maps will be more likely mistakenly accepted as significantly correlated (reject a true hypothesis). In order to make a correct inference, we need to penalize the sample size. For example, although the sample size is n, the effective sample size should be much smaller than n because of autocorrelation. The effective sample size can be calculated following the method of Clifford et al. (1989), or Dutilleul’s method for small sample size. Clifford, P., Richardson, S. and Hemon, D. 1989. Assessing the significance of the correlation between two spatial processes. Biometrics 45:123-134. Dutilleul, P. 1993. Modifying the t test for assessing the correlation between two spatial processes. Biometric 49:305-314.

5 5 The effective sample size can be calculated following the method of Clifford et al. (1989). where is a covariance matrix among the n locations. It is a N×N symmetric matrix. It can be estimated by variogram of geostatistics. Calculating the variogram is the most important step to test H 0. The major part of computation is to estimate the variogram and the covariance (covariogram) matrix. Covariogram is a decreasing function, i.e., two nearby locations have high covariance than locations far away. Therefore, the covariance matrix captures the spatial correlation structure of the data. distance covariance

6 6 Once we have estimated the covariance matrix, the effective sample size is: Then the test of H 0 can follow the same probability distribution as (*), but replace N in (*) by the effective sample size M. The p-value can be as calculated: Note the W-test described in Clifford et al. is very similar to the above test, thus, is not included in my R program. Simply,, and W ~ N(0,1), a standard normal distribution.

7 7 Description of R program The main program is called “association.main”. It has five functions. boxcox.fn: boxcoxize the data to make it normality. generatexy.fn: generate a location matrix, and plot the map (image) variogram.fn: calculate empirical variogram for a data varcov.fn: estimate covariance using a theoretical model to fit empirical variogram. test.association.fn: calculate p-value for the test.

8 8 Example: BCI plot – correlation between number of recruits and number of species. Cell size = 10×10 m. Total number of cells N = 5000 Data file name in R: bci.recruit.dat Number of recruits Number of species > bci.recruit.dat[1:10,] abund nsp recruit simpson 1 26 22 50.9037433 2 38 26 120.7307692 3 57 34 50.6086549 4 46 29 100.5884316 5 49 35 120.6929293 6 52 23 160.5067466 7 28 24 270.8596491 8 39 22 100.7768131 9 57 28 40.4071429 1035 24 20.8101852 ……… …… 5000 …… …… Question of great ecological interest is: Whether diversity (species richness) promotes recruitment and seedling survival? Wills, C. et al. 2006. Non-random processes contribute to the maintenance of diversity in tropical forests. Science 311:527-531.

9 9 >association.main(bci.recruit.dat, map1=2, map2=3,cellsize=10,boxcox=“no”) The results are: Correlation coef. r = -0.05455 Original sample size = 5000 p-value = 1e-04 Effective sample size = 1512.2 p-value = 0.0339 map1 = 2 is “number of species”, map2=3 is “number of recruit” The correlation coefficient between the two maps is -0.05455. Without considering autocorrelation, it is highly significant with p- value = 0.0001. After taking account of spatial autocorrelation, it is marginally different from 0, with p-value = 0.0339. (It is significant at p=0.05 level, but not at p=0.001 level.) Example: BCI plot – correlation between number of recruits and number of species. Cell size = 10×10 m. Total number of cells N = 5000 Note: You need package geoR to run this program.


Download ppt "1 Testing spatial correlation (autocorrelation) 1.Moran’s I 2.Geary’s c 3.Variogram 4.Join counts Cliff, A. D. & Ord, J. K. 1981. Spatial processes: models."

Similar presentations


Ads by Google