Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Is Stata used for spatial statistics/GIS?


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   Re: st: Is Stata used for spatial statistics/GIS?
Date   Thu, 19 Feb 2004 10:59:23 -0500

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?)

Michael Blasnik
[email protected]


----- Original Message ----- 
From: "Tim R. Sass" <[email protected]>
To: <[email protected]>
Sent: Thursday, February 19, 2004 9:19 AM
Subject: Re: st: Is Stata used for spatial statistics/GIS?


> There is a user-written ado file available on the SSC site, sphdist, that
> will compute the spherical distance between two points based on the
> latitude and longitude of each.  Otherwise, I am unaware of any GIS-type
> routines within Stata.  If anyone out there has written an ado file to
list
> the identities of observations within a specified distance of another
> observation (eg. given a listing of hospitals and their
latitude/longitude,
> calculating which hospitals are within 5 miles of hospital A), I would be
> interested in knowing about it.
>
> Tim


*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index