4.0

4.0 | 1 rating Rate this file 133 downloads (last 30 days) File Size: 2.53 KB File ID: #13663

Moran's I

by Felix Hebeler

 

15 Jan 2007 (Updated 14 Oct 2008)

No BSD License  

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

Download Now | 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)
Zip File Content  
Other Files moransI.m,
morans_I.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
20 Jun 2007 Jay Lennard

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

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
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com