Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Fwd: Constructing Household IDs


From   Andrea Smurra <andrea.smurra@theigc.org>
To   statalist@hsphsun2.harvard.edu
Subject   st: Fwd: Constructing Household IDs
Date   Wed, 30 Jan 2013 13:27:01 +0630

Hello Statalists,
I am working with an household survey which doesn't have household IDs.
Each household is identified by a series of variables (State, district, township, ..., household number). Within each state, the numbering of districts always starts from the integer 1, the same for towns within each district and so on up to the household in each ward. I tried to build unique HH identifier with the command "group", but I'd like to build a HH ID which looks like SSSDDDTTT...HHH where SSS is the state identifier (with the correct number of zeros appended when necessary (i don't know how to do it)), DDD is the District identifier and so on. I'm using STATA 12 for windows 7. I'm sure it will be an easy task for an expert statalist, but I am still a beginner.
Thanks
Andrea


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index