Dear Statalisters,
I'm relatively new to Stata, I have a dataset as
follows:
hhid psid year
1 1 1989
1 1 1991
1 1 1993
1 1 2000
1 2 1989
1 2 1991
1 2 1993
1 2 2000
2 1 1989
2 1 1991
2 1 1993
2 1 2000
... ... ...
hhid=household ID
psid=personal ID within a household
And my question is how to create a personal ID (say
uid) applied to the whold panel dataset that looks
like:
hhid psid year uid
1 1 1989 1
1 1 1991 1
1 1 1993 1
1 1 2000 1
1 2 1989 2
1 2 1991 2
1 2 1993 2
1 2 2000 2
2 1 1989 3
2 1 1991 3
2 1 1993 3
2 1 2000 3
... ... ... ....
Any help would be highly appreciated.
Thanks,
Eric Wang
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
* 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/