mesa.ecospatial.global_spatial_stats
- mesa.ecospatial.global_spatial_stats(grid, mode='MoranI', tissue_only=False, plot_weights=False)
Perform global spatial autocorrelation analysis.
- Parameters:
grid (numpy.ndarray) – The 2D grid of diversity indices to be analyzed.
mode (str, optional (default='MoranI')) – The spatial statistic to use. One of {‘MoranI’, ‘GearyC’, ‘GetisOrdG’}.
tissue_only (bool, optional (default=False)) – If True, the analysis is restricted to tissue regions.
plot_weights (bool, optional (default=False)) – If True, visualize the spatial weights matrix.
- Returns:
stats (float) – The spatial statistic.
p (float) – The p-value for the test.