# Comparing the strength of spatial autocorrelation of two datasets on the same studied area

I want to compare the strength of the spatial autocorrelation of two sets of values that are located on the same area. The data are individual growth rates.

I want to compare the strength of the spatial autocorrelation within groups (species) and of the spatial autocorrelation among all groups together (whole dataset), on the same plot.

Until now I used Moran's I test to determine if each group had a significant spatial autocorrelation and did not compare the strength.

I have several problems. How to compare the strength of the spatial autocorrelation given that :

• Each group is included in the whole dataset (the points of each group are also in the whole dataset)
• Therefore the whole dataset is much bigger than each group and p-values might be affected
• Each group has a different sample size and therefore p-values might be affected.

Maybe it is not feasible... I am looking for the simplest possible method to be very clear with what I am doing. I use R.

• If data A has a larger Moran statistic than data B, then it has greater spatial autocorrelation. That's all there is to it. There's no p-values unless you also want to put together a statistical model with some unknown which you can compute a distribution for. With a single data set the test is usually if the spatial autocorrelation is non-zero under the assumption of random relabelling of the points (as in `moran.mc`). Jul 1 at 15:54
• @Spacedman thank you for your answer. I use statistical tests to determine if the spatial distribution of the values is different from a random distribution, with a normal distribution assumption I think (ape::Moran.I function). Therefore, it seems to me that the size of the dataset is crucial, isn't it ? Jul 1 at 16:04
• Nope. If your Q is "Is data set A more autocorrelated than data set B?" then the answer is a yes or no depending on which has the larger test statistic. There's no uncertainty in a Moran coefficient (unless you have an uncertainty on positions or values) and your data are the whole population and not a sample. Its like asking "is the mean of data X bigger than the mean of data Y?". Without some uncertainty or source of variation the answer is a yes or no. Jul 1 at 19:53
• @Spacedman well I would still perform a T-test to know if two means differ significantly, that is what makes me doubt about just comparing two coefficients without uncertainty. I would be really happy if I just need to compare two numbers however ;) Jul 2 at 8:36
• The t-test is a test that makes inference about a population based on a sample. The question "Are these specific 12 boys here on average taller than those 14 girls over there?" is a simple yes-no answer. "Are boys on average taller than girls, given these 12 boys and those 14 girls as a sample from all boys and all girls?" is a question for a t-test. Jul 2 at 9:16

Suppose you measure the Moran coefficient for your two data sets. Suppose its 0.7632 for data A, and 0.7633 for data B.

Data B is more autocorrelated than data A.

"But its only 0.0001 bigger! That might not be significant!" says you.

Well, unless you can tell me where the "noise" might be -- something that could mean that both autocorrelation measures are estimates of some true underlying autocorrelation parameter -- you can't make a statement about "significance".

Maybe your data is only measured to a spatial accuracy of 100 metres. In which case you can run a Monte-carlo test where you jitter the points around 100 metres, do that a hundred or more times to get a distribution of Moran coefficients for A and B under the assumption of 100m spatial accuracy. Now you can test if A or B is significantly larger, under that distribution.

Or maybe your data measurements (the "Z" values) are only precise to 2 decimal points? Do another Monte-carlo test where you set the third decimal place randomly, compute a whole load of Moran coefficients for A and B, and again you can test if A is more correlated than B under that new possible source of variation.

But if your data is "given", then without introducing some other reason for thinking there might be variation in the Moran autocorrelation coefficient, its sufficient to say that if Moran(A) < Moran(B) then B is more spatially autocorrelated than A.