Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Distance from home to hospital [originally no subject]


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: Distance from home to hospital [originally no subject]
Date   Wed, 3 Jan 2007 22:43:37 -0500

David--
As may be inferred from my post (by someone with superhuman insight),
I think it is much easier to -merge- and then compute within nested
loops, one across all i persons, and one across all j hospitals, as
Nick does in -nearest- but as always, YMMV.

On 1/3/07, David Kantor <[email protected]> wrote:
In response to Kelly Richardson's question about the distance between
home and hospital:

The structure of this situation suggests a -cross- operation on the
two datasets (persons and hospitals) -- at least in theory.
This would yield a _very_ long dataset.  But this is impractical
You might want to loop through one person at a time, joining hospital
data; then select the nearest (or, say the nearest 5 hospitals); then
somehow output just these (maybe using -post-).
*
*   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/



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