Hi!
I am trying to understand the calculations behind Local Moran's I and I was wondering how the mean (X bar) was calculated. I think I understand the consept of neighbourhood and the weight matrix, W, but what the corresponding attributes mean is not clear to me. Do you include the value of i in the mean or du you leav it out of the equation?
Any help would be great, thanks!
X bar is just the mean. If you are running Local Moran's I on a variable X, then X bar is the mean for all X values. I don't remember if the mean is computed as sum of all X values divided by N or the sum of all X values divided by N-1, though. If you locate the tool in the system toolbox, you can right click on it and select Edit to see the tool code.
I hope this helps!
Best wishes,
Lauren
Hi Lauren - I tried right clicking on the tool and selected Edit but I got a pop-up box that says the Script File is empty. Is there any other way to view the tool code?
What version of the software are you using? (It shouldn't matter, but I can try to reproduce what you're seeing). This is what I'm seeing:
In the Geoprocessing pane, I select Toolboxes. In The Spatial Statistics toolbox under Mapping Clusters, I right click on the Cluster and Outlier Analysis tool, select Edit, and up pops the script.
Another way to find it is to navigate to: <your ArcGIS folder, where ever you installed the software... like maybe in ProgramFiles\ArcGIS> then navigate to: \Pro\Resources\ArcToolBox\Scripts and view the LocalMorans.py python script file. For example, you should be able to right click that file and choose open with <Notepad or Wordpad, for example>
I hope this works for you!
Best wishes,
Lauren
Hi Lauren, thank you for the instructions, they worked! I was trying to find the tool by searching the tool box instead of accessing it in the way you suggested.