Chris <[email protected]>:
-vincenty- should work fine for you; in some rare cases it may return
a missing value for distance. The help file says:
The Vincenty-style calculations may fail if distance is close to a
quarter of the Earth's circumference, or if it is close
to zero, where the trig functions tax the limits of machine precision.
Haversine calculations and those based on the Law
of Cosines are more robust to these odd cases.
On Mon, Nov 30, 2009 at 6:55 PM, Stata Chris <[email protected]> wrote:
> The -vincenty- command is, according to its help menu, not robust when
> distances are "close to zero"; mine should range between 0 and 100km,
> but with many within 50km; not sure what exactly classifies as "close
> to zero" in this context, but I take it that <50km might, and from the
> two you suggest as possible alternatives to -nearest-, the
> Haversine-based -distmatch- would appear more suitable.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/