1

I recently have found that the Moran's Index calculated in GeoDa and ArcGIS are different based on the same data and the same spatial matrix. For example, this is my testing shapefile, a point shapefile with 547 records and UTM-Zone-50N projection. Here's display of the data and records. enter image description here enter image description here

I created 4-nearest neighbors spatial matrix and calculated the Moran's Index of variable 'lst', using GeoDa 1.6.7, 1.8.12 and ArcGIS 10.2. Results should be absolutely the same, but I got 0.672521, 0.674407, and 0.67824, respectively. Although the difference is very small, we cannot ignore it. And And I am sure the data is fine, no missing/undefined value.

Does anybody find similar problem? Or is there anyone who knows about this problem?

I shared the test data in my google drive (https://drive.google.com/open?id=0BziPQVV2jY0PU2V6Ulo2WE1zeDQ).

This is my python script to calculate Moran's Index.

import arcpy
from arcpy import env
import os
env.overwriteOutput=True
pointfile="e:/temp.shp"
pointswm ="e:/temp.swm"
try:
    #4-nearest neighbors spatial matrix
    swm = arcpy.GenerateSpatialWeightsMatrix_stats(pointfile,"num",pointswm,
                                                "K_NEAREST_NEIGHBORS",
                                                "EUCLIDEAN", "1", "", "4",
                                                "ROW_STANDARDIZATION",
                                                "", "", "", "")
    #calculate Moran Index
    mo = arcpy.SpatialAutocorrelation_stats(pointfile,"lst","NO_REPORT",
                                        "GET_SPATIAL_WEIGHTS_FROM_FILE",
                                        "EUCLIDEAN_DISTANCE", "NONE","",
                                        pointswm)
    print mo.getOutput(0)
except arcpy.ExecuteError:
    print arcpy.GetMessages()

closed as too broad by PolyGeo Jun 9 '17 at 4:14

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What are the settings in your Weights Manager in GeoDa. That could explain why you're getting different results. Also, which Moran's tool are you running? I would also read the methodology that each tool uses to calculate the values. There might be subtle differences. – Fezter Mar 20 '17 at 3:11
  • 1
    My guess is that the weighting settings are different. What settings did you use in ArcGIS? Did you create a spatial weights matrix? If so, did you use k-nearest neighbours? The default number of neighbours is 8 in ArcGIS as opposed to the four that you set in GeoDa. – Fezter Mar 20 '17 at 4:24
  • @Fezter I created a 4-nearest neighbors weights in GeoDa and used 'Spatial--Univariate Moran's I tool. And I am sure the weights are the same. The number of neighbors are both 4. – Boorn Mar 20 '17 at 4:59
  • Rather than asking why they are different, I think you should establish in one question whether one of them gives the correct result. If so, then your second separate question can be why the other gives the wrong result. – PolyGeo Jun 9 '17 at 4:13