mesa.ecospatial.global_moran
- mesa.ecospatial.global_moran(grid: ndarray, tissue_only=False, plot_weights=False)
Perform global Moran’s I test for spatial autocorrelation.
- Parameters:
grid (numpy.ndarray) – The 2D grid of diversity indices to be analyzed.
tissue_only (bool, optional) – If True, the analysis is restricted to tissue regions. Defaults to False.
plot_weights (bool, optional) – If True, visualize the spatial weights matrix. Defaults to False.
- Returns:
I (float) – The Moran’s I statistic.
p (float) – The p-value for the test.