Dear all,
I have a data-set where individuals are nested in
households.
I have the following unique identifier: consecu (a
long variable).
For example, below, 101 102 and 103 denotes three
individuals of the same household, just like 1284001
1284002 1284003 1284004 and 1284005 denotes five
individuals of another household.
consecu X
101 1
102 1
103 0
201 1
202 0
203 0
.
.
.
1283901 1
1283902 0
1283903 0
1283904 1
1284001 0
1284002 0
1284003 1
1284004 1
1284005 0
Question1 : How can I generate a household identifier?
Maybe a household identifier that goes from 10 to
128400?
Question 2: How can I generate a household level
variable, Xhh, that captures whether any member of a
household scores 1 for the X variable?
Thanks.
fran
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
http://mobile.yahoo.com/go?refer=1GNXIC
*
* 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/