No BSD License  

Highlights from
Moran's I

3.0

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

Moran's I

by Felix Hebeler

 

15 Jan 2007 (Updated 14 Oct 2008)

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

| Watch this File

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
earth, geary, local morans i(2), morans i(2), spatial autocorrelation, spatiale autocorrelation
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
27 Jan 2012 Amit

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

08 Nov 2011 3omyer 3omayer

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 Jim

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 Jay Lennard

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

Updates
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

.

Contact us