Moran’s I in Netlogo

This is a demonstration of the use of Moran’s I as a measure of spatial clustering in a NetLogo model.

Moran’s I is the best established and most widely used statistic of spatial autocorrelation. The I statistic tests if subjects which are located closer together are more likely to have similar characteristics than those which are further apart.

I created the moransI module because I wanted to implement a Moran’s I test in my Town-Based Accent Formation Model.

NetLogo is an agent-based modeling environment.

Running the Program

The moransI NetLogo code is viewable/downloadable here. To run it, install a copy of NetLogo on your computer, run it and open the moransI-dec11.nlogo file.

Or you can just try the web applet here.

(Be warned, it’s java-based and may take a while to load, or complain if you don’t have java installed. It’s about a 2mb download. It also seems to have a few bugs.)

Documentation

The report I wrote about the moransI program for my environmental space-time data analysis class is here. It includes information about formulation and validation of the program. Basic documentation is available either in the “information tab” of the module, or on the web applet page itself.