In addition I find in my files a program -dist-,
which produces a dataset of distances between
points from two variables containing Cartesian
coordinates. It's just another brute force
solution for some isolated task.
Nick
[email protected]
Michael Blasnik
> You should check out nearest.ado on SSC (by Nick Cox). It
> will identify the
> nearest neighbor (Euclidian distance). I have written an
> alternate version
> that allow a globe option (for spherical distances) and is
> much faster on
> larger datasets (avoids brute-force N*N loop). If you find
> nearest too
> slow or need global distances, I can email you my program.
> Either program
> could probably be revised to identify all observations within
> a certain
> distance, but it is not clear how it would deal with cases
> where there are
> many observations meeting the criteria (just list them out?
> or create many
> added variables to hold their identities?)
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/