Hi Rafal,
Somewhat...respondent id is a unique identifier for
each respondent. However, respondent #'s 2 and 3 may
have an identical zip. I would want to make sure that
nocomp for each of those would be equal (reflecting
the zip code attached).
Thanks!
--- Rafal Raciborski <[email protected]>
wrote:
> Hi Dari,
> Is this what you want to accomplish?
> rafal
>
>
> . use C:\temp\using.dta
> . list
>
> +----------------+
> | zip no_org |
> |----------------|
> 1. | 12345 23 |
> 2. | 23456 41 |
> 3. | 34567 19 |
> 4. | 56789 56 |
> +----------------+
>
> . sort zip
> . save, replace
>
> . use C:\temp\master.dta, clear
> . list
>
> +----------------+
> | resp_id zip |
> |----------------|
> 1. | 1 12345 |
> 2. | 1 23456 |
> 3. | 1 34567 |
> 4. | 2 12345 |
> 5. | 3 23456 |
> |----------------|
> 6. | 3 56789 |
> +----------------+
>
> . sort zip
>
> . merge zip using C:\temp\using.dta
> . sort resp_id zip
> . list
>
> +----------------------------------+
> | respid zip nocomp _merge |
> |----------------------------------|
> 1. | 1 12345 23 3 |
> 2. | 1 23456 41 3 |
> 3. | 1 34567 19 3 |
> 4. | 2 12345 23 3 |
> 5. | 3 23456 41 3 |
> |----------------------------------|
> 6. | 3 56789 56 3 |
> +----------------------------------+
>
> . drop _merge
>
>
> ================
> Rafal Raciborski
> Graduate student
> Department of Political Science
> Emory University
> 301 Tarbutton Hall
> 1555 Dickey Drive
> Atlanta, GA 30322
> 404-378-9826 (home)
> [email protected] (e-mail)
> www.roofoos.net
>
> *
> * 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/
>
=====
"Can't break now I've been living for this
Won't break now I'm cleansed with hopefulness."
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
*
* 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/