You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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.
Cite As
Patrick Walsh (2026). Nearest Neighbor Spatial Weights Matrix (https://www.mathworks.com/matlabcentral/fileexchange/36601-nearest-neighbor-spatial-weights-matrix), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.1.0.0 (2.14 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
