I'm fairly new and entirely self-taught in using QGIS 3.4. I'm looking at turtle nest sites and trying to run a nearest neighbor analysis to analyze their distribution and establish whether or not they are clumped, dispersed or random. I'm doing this for a number of different years to determine whether nest sites are becoming more clumped as a result of environmental changes.
However, i'm not sure i understand the results that are being output. the z scores are just astronomical and the expected values are effectively 0s. How is QGIS establishing expected distances?
Maybe i'm just doing something fundamentally wrong, but i'm selecting the vector analysis -> Nearest Neighbor Analysis -> and selecting my vector layer containing the nest site points. These are some of the outputs I'm getting for different years:
Observed mean distance: 5.451281160546463
Expected mean distance: 0.00026372940677887315
Nearest neighbour index: 20669.97847197658
Number of points: 125
Z-Score: 442084.1070632401
Observed mean distance: 5.40372033661974
Expected mean distance: 0.00019992349282925835
Nearest neighbour index: 27028.941222203965
Number of points: 134
Z-Score: 598544.2290450602
Maybe i'm just doing something fundamentally wrong? Or maybe theres just a better way of achieving what i'm trying to do. I'm not sure.
Best Answer
I think that QGIS uses an algorithm that doesn't get the right answer. Personally I was not able to find out their process. I performed Nearest Neighbor Analysis on a data set using four different methods: pure Python, ArcMap Pro with ArcPy, ArcMap, and QGIS. The results of the first three methods were very, very close, while the QGIS method results were way off.
Here are a few points:
If you send me your data, I would do the analysis using Python and ArcMap, just to see what results do we get.