Stas Kolenikov
>
> is there an easy way to code the distance between two
> points on the Earth
> surface along the great-circle arc given their longitudes
> and latitudes? I
> want to cluster a few geographical locations... I know a
> messy way to do
> it -- to go through all 2400 lines of cluster.ado and find
> out where the
> (dis)similarity measures are computed, and make a new one
> that I need. (Is
> this possible with the programmer's extensions to cluster that Stata
> provides for, instead? I looked it up rather quickly, and
> decided it is
> not quite what I need.) My gut feeling though is that it is the
> responsibility of the built-in -_cluster-, so there is not
> much I can do
> to define my own distance function, is there?
Ken Simons has written a -globdist- which may help. It assumes
the planet is a perfect sphere, which isn't true,
but that is a pretty good approximation by e.g.
econometric standards.
Nick
[email protected]
*
* 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/