Maptitude GISDK Help |
Computes statistics for Moran's I, a measure of spatial autocorrelation.
Added to Version 2017.
array = MoransI(string layer_bar_set, string field_spec, array options)
Argument |
Contents |
layer_bar_set |
The layer|set of an area layer |
field_spec |
The full field spec of the field of interest |
Options |
Type |
Contents |
Clustering |
String |
A full field spec for Adjacency clustering |
Adjacency |
String |
The type of adjacency: "Edge" (default), "Node" or "Island" |
Matrix |
String |
The adjacency value needed: "Adjacency" (default), "Adjacency Level", "Common Border Length" or "Inter-centroid Distance" |
Search Distance |
Number |
A numeric value, used for Island Adjacency, in User Units (default= 1 mile) |
Temp |
String |
A path for temporary files (default is the current temporary path) |
Returns an options array with the Moran's I statistics:
Option |
Contents |
Observations |
The number of cells |
S1 |
The S1 statistic |
S2 |
The S2 statistic |
Sum of Weights |
The sum of the spatial weights |
Moran's I |
The measure of spatial autocorrelation |
Expected Value |
The expected value, E(I) = -1 / (N - 1) |
Std Error |
The standard error |
95% C.I. Upper |
The upper bound of the 95% confidence interval |
95% C.I. Lower |
The lower bound of the 95% confidence interval |
Moran's I is -1 for perfect dispersion (such as a checkerboard), 0 for a random arrangement, and close to 1 for high spatial autocorrelation.
The Clustering option is Group by the chosen field. For example, using the State field for Counties will compute adjacency based on their cluster (group) code.
In the Matrix option, "Common Border Length" is the sum of the lengths of the border in common between the two regions, and "Adjacency Level" is Common Border Length / Average Perimeter.
a = MoransI("County|", "County.Population",)
Error Type |
Meaning |
Error |
Inputs are not valid or could not generate the Moran's I value |
©2025 Caliper Corporation | www.caliper.com |