Highlights fromMoran's I

3.0

3.0 | 2 ratings Rate this file 26 Downloads (last 30 days) File Size: 2.53 KB File ID: #13663

Moran's I

15 Jan 2007 (Updated 14 Oct 2008)

Calculates local Moran's I index of spatial correlation for raster.

File Information
Description

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.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File
Everyone's Tags
Tags I've Applied
Comments and Ratings (4)
27 Jan 2012

on my MATLABR2010B, the Morans function is not available.
What I can do now?
Plz sort out it.

08 Nov 2011

I would like to calculate the Geary's index for 2 dimension data. the equation is same as the Moran's index but it's not local.
Can you help me please.

07 Feb 2010

Should this function work in one dimension? When I call,

M = morans_I(sourceDataRow,ones(1,3)./3,'true');

I get zeros. When I call,

M = moransI(sourceDataRow,ones(1,3)./3,'true');

I get seemingly correct results, but some values are greater than 1, which should not exist.

20 Jun 2007

Ok, but use of confilt or nlfilter would speed up things (would require imageprocessing toolbox)

18 Jun 2007

Updated version
- Includes loop for whole matrix
- use zscores()
- includes example

14 Oct 2008

-> updated version uses colfilt to increase speed about factor 10 - image processing toolbox required.
-> Original version renamed to morans_I() does not need IPT.

14 Oct 2008

.