Statalist The Stata Listserver


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

[no subject]


From   "Richardson, Kelly K." <[email protected]>
To   <[email protected]>
Date   Wed, 3 Jan 2007 13:43:27 -0600

Dear Statalisters,
I would like to calculate the distance between a patient's home and the
nearest hospital to their home. I have the x,y coordinates for the
patient's home and the x,y coordinates for every hospital in the
country. How do I get the distance to the nearest hospital? I looked at
the globdist command but I can't see how to enter coordinate variables
for both locations. For example, say I have 1000 patients across the
country and 5000 hospitals. How do I get one distance for each patient
that represents the distance to the nearest hospital? I'm not clear on
how my data should be constructed or which command to use. Right now the
data are in separate files, one for patients (n=1000) and one for
hospitals (n=5000). Each file has an x-coordinate and a y-coordinate
identifying the location of either the patient's home or the hospital
address. There is no unique identifier linking the patients to any of
the hospitals. In fact, I have no way of knowing where any patient
actually went. I just need to know where the closest hospital is to
where they live. I am also interested in identifying the nearest VA
Hospital versus the nearest Non-VA hospital. I have an indicator in the
hospital data file (1=VA 0=non-VA). In the end I hope to have 2 distance
measures for each individual. I'm not sure Stata is appropriate for this
task. Any suggestions would be greatly appreciated.
Thank you,
Kelly



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