Statalist The Stata Listserver


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

st: reorganizing data


From   "Anna Lehman" <annallehman@hotmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: reorganizing data
Date   Sun, 03 Sep 2006 21:55:56 -0500

Dear statalist users,
I have a dataset with the following structure:

City Person_id
A 1
A 2
B 1
B 5
C 1
C 5
C 4
D 8
D 1

I would like to obtain the following:
for each and every person, a list with the people that have apartments in the same city (independently of which city). For example, for person 1, this list would be: 2, 5 4 and 8. And for person 5 the list would be: 1 .

Can you think of a relatively easy way of acomplishing this?
Thanks for your help!
Anna

_________________________________________________________________
Get real-time traffic reports with Windows Live Local Search http://local.live.com/default.aspx?v=2&cp=42.336065~-109.392273&style=r&lvl=4&scene=3712634&trfc=1

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index