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

From |
David Torres <torresd@umich.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: spatial analysis - DISTANCE |

Date |
Sat, 29 Aug 2009 16:26:17 -0400 |

the ids for the xy coordinates used to calculate the distance. Here is the piece of code I'm working with: code excerpt: g long rad10=. g double dist1=. g id1="" merge using univpoints00_0 forv i=1/`np' { qui vincenty `=latitude[`i']' `=longitude[`i']' sch_lat sch_lon, hav(dis) g within10=dis<10 su within10, meanonly qui replace rad10=r(sum) in `i' su dis, meanonly qui replace dist1=r(min) in `i' qui levelsof unitid if dis==dist1[`i'], loc(vs) foreach v of loc vs { qui replace id1="`v' "+id1 in `i' } drop dis within10 } end excerpt

attached to the point the distance to which is being calculated? Thanks David Torres UMich * * 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/

**Follow-Ups**:**Re: st: spatial analysis - DISTANCE***From:*Austin Nichols <austinnichols@gmail.com>

- Prev by Date:
**Re: st: Error with MIM installed command** - Next by Date:
**RE: st: suppress some results in latex table using outreg2 after 3sls estimation** - Previous by thread:
**st: Error with MIM installed command** - Next by thread:
**Re: st: spatial analysis - DISTANCE** - Index(es):

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