Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Nick Cox <njcoxstata@gmail.com> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: Re: Nearstat version |

Date |
Mon, 6 Feb 2012 17:41:30 +0000 |

I'd recommend to Wilner

Nick On 6 Feb 2012, at 16:33, "P. Wilner Jeanty" <pwjeanty@gmail.com> wrote:

2012/2/5 Rüdiger Vollmeier <ruediger.vollmeier@googlemail.com>:Thanks a lot for the good advice how to run the program.I ve got one question regarding the programming: It seems that incaseof non-identical observations with identical longitude and latitude, the programs does not return the distance 0 but calculates the shortest distance to non-identical latitude and longitudes. Am Iright? This is surprising and, I guess, for many users not desired.Isit possible to change that (such that the distance 0 will be returned in these cases)?This is a legitimate behavior by the program. Because it does not stand to reason that two different locations have identical latitudes and longitudes, -nearstat- thinks that it is computing the distance between an observation and itself. In order to identify the nearest neighbors (1st, 2nd, 3rd, and so forth), distance computed from an observation to itself is intentionally set to missing as part of the programming process. Ruediger's case where non-identical observations have identical latitudes and longitudes is an unusual one. As a result, I don't intend to modify -nearstat- to allow for it, at least not now, unless many users want this change to be made. Without more information, I find it odd that non-identical observations or areal units have identical latitudes and longitudes. FYI, a new version of -nearstat- with Mata code compiled in Stata 10.1 has been submitted to SSC.

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

**Follow-Ups**:**Re: st: Re: Nearstat version***From:*"P. Wilner Jeanty" <pwjeanty@gmail.com>

**References**:**st: Re: Nearstat version***From:*"P. Wilner Jeanty" <pwjeanty@gmail.com>

- Prev by Date:
**Re: st: Anonymous nonnies** - Next by Date:
**Re: st: Anonymous nonnies** - Previous by thread:
**Re: st: Re: Nearstat version** - Next by thread:
**Re: st: Re: Nearstat version** - Index(es):