Statalist


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

Re: st: Constructing assignment var for Spatial RDD: For each id in region 1 need shortest distance to an id in region 0


From   Stata Chris <[email protected]>
To   [email protected]
Subject   Re: st: Constructing assignment var for Spatial RDD: For each id in region 1 need shortest distance to an id in region 0
Date   Mon, 30 Nov 2009 18:55:57 -0500

Thanks for your suggestions!! Since my internet was dysfunctional
since Saturday, I'm taking them up all at once now:

(1)
Nick:
You're right that the help menu for -nearest- says if conditions are
allowed, yet whenever I try to execute nearest in combination with
some if command (I also tried simple ones, to make sure it's not just
due to the specifics of which if-command I use), Stata tells me
"option if not allowed; r(198)". Not sure what to make of that?

(2)
Roy:
Thanks for pointing out the need to multiply by that factor--I have to
admit that I was not considering this so far. Not sure though whether
it applies only when positions are in deci-grades, or also when they
are in "hectometers", which is what mine are in?

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.

(3) Austin:
I'm looking into the earlier thread on border distances now...







2009/11/29 Roy Wada <[email protected]>:
>> -nearest- supports -if- and -in-. Thus I do not know why Stata Chris  is
>> in doubt on this point, or why Roy is trying to explain their absence!
>
> Okay so I should have checked, but that's what I might have done, not
> allowing [if] [in] as a possible source of confusion. Chris was
> probably doing just that, trying to use it for the other purpose,
> tried to say so, and I took him literally.
>
> Roy
>
> *
> *   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/
>

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



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