Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Re: st: Re: st: Re: st: Re: st: RE: Calculatin​g the shortest distances between observatio​ns (based on longitude and latitude)

From   Nick Cox <>
Subject   st: Re: st: Re: st: Re: st: Re: st: RE: Calculatin​g the shortest distances between observatio​ns (based on longitude and latitude)
Date   Fri, 3 Feb 2012 11:21:17 +0000

That's already been explained by Stata to you, but cryptically. The
-version- statements are only part of the story; they don't in
themselves _guarantee_ that the program will work with in this case
10.1. They only _guarantee_ that it won't work with versions less than

In this case what bites is that the Mata code was compiled with a
later version.

-version- is a stranger and more limited command than might be
guessed. There is much more discussion at

I have a certain version of Stata and have come across a user-written
program that is apparently written for a later version of Stata. What
are my options?

If you're confused by this, you're in good company. There is a lot to
explain. A mantra that may help is that -version- is not a time
machine; so it does not set everything to what it was in 10.1, in this


On Fri, Feb 3, 2012 at 11:06 AM, Rüdiger Vollmeier
<> wrote:
> I have just had a look at the .ado and .mata files. Both state that
> the program version is Stata 10.1 (see below). Hence, it should be
> working... So I am wondering why this problem actually ocurrs(?).
> best regards, Ruediger
> ------------------------
> program define nearstat, rclass
>        version 10.1
> 2012/2/3 Nick Cox <>:
>> I can only conclude that the SSC documentation for -nearstat- (SSC) is
>> out-of-date and needs to be fixed. That's the author's responsibility.
>> So, you cannot use -nearstat- unless an older version is provided to
>> you or you upgrade your Stata (not STATA) to 12.
>> Nick
>> On Fri, Feb 3, 2012 at 10:02 AM, Rüdiger Vollmeier
>> <> wrote:
>>> Thanks for the insightful replies.
>>> Nearstat actually seems to look pretty much like what I ve been
>>> looking for. However, it seems that there are some problems with the
>>> STATA versions. I am using STATA 11 and it is stated that nearstat can
>>> be used by STATA 10 or higher.
>>> However, whenever I run nearstat, I get the following error message:
>>> (nearstat_calcdist() in lnearstat, compiled by Stata 12.0, is too new
>>> to be run by
>>> this version of Stata and so was ignored)
>>>                 <istmt>:  3499  nearstat_calcdist() not found
>>> r(3499);
>>> Confusing right? Does anybody know why this happens?

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index