No BSD License  

Highlights from
Moran's I

3.0

3.0 | 2 ratings Rate this file 20 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
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
20 Jun 2007 Jay Lennard

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

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.

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.

27 Jan 2012 amit

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

Please login to add a comment or rating.
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

.

Tag Activity for this File
Tag Applied By Date/Time
morans i Felix Hebeler 22 Oct 2008 08:57:03
local morans i Felix Hebeler 22 Oct 2008 08:57:03
spatial autocorrelation Felix Hebeler 22 Oct 2008 08:57:03
earth Felix Hebeler 22 Oct 2008 08:57:03
geary 3omyer 3omayer 08 Nov 2011 11:27:17
spatiale autocorrelation 3omyer 3omayer 08 Nov 2011 11:27:17
morans i amit 27 Jan 2012 15:46:51

Contact us at files@mathworks.com