Moran's I

Calculates local Moran's I index of spatial correlation for raster.
6.6K Downloads
Updated 31 Mar 2016

View License

PURPOSE: calculate local Moran's I for a local grid using a weight matrix.
-------------------------------------------------------------------
USAGE: m = moransI(grid, W, s);
where: [grid] is the matrix to analyze
[W] is the normalized weight matrix of the size the local Moran's I will be calculated for
[s] is an optional flag to use zscores of input values for calculation. Set to 'true' if zscores of local grid should be calculated. Leave blank if not desired or input values are already standardized. -------------------------------------------------------------------------
OUTPUTS:
[m] Moran's I of input raster weighted using [W]
-------------------------------------------------------------------
NOTES: Weight matrix needs to be 'moving window' style, not contiguity matrix: Moran's I is calculated and weighted for neighbours to center cell. Matrix needs to be normalized (weights sum to 1) and center cell weight will be set to 0 if not already.
See Anselin (1995, 'LISA.', Geogr. Analysis 27(2),p.93f) for details on standardized variables in calculation of local Moran's I.

Cite As

Felix Hebeler (2024). Moran's I (https://www.mathworks.com/matlabcentral/fileexchange/13663-moran-s-i), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2006a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Coordinate Systems in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

BSD update
.