File Exchange

image thumbnail

Nearest Neighbor Spatial Weights Matrix

version 1.1 (2.14 KB) by

uses x,y coordinates to produce one of several types of nearest-neighbor spatial weight matrix.



View License

There are several other nearest neighbor SWM programs out there, but many of them require significantly more memory to run and do not work on large datasets. This file should work on large datasets (have tested on >100,000 obs). Furthermore, several options are available for the weights. The user can choose equal weights for each neighbor, or weights based on distance. This allows the NN specification more accuracy.

Comments and Ratings (0)



Code made more efficient and a potential error corrected.

MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video