The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Creating unique household id in Women's data
Re: Creating unique household id in Women's data [message #11561 is a reply to message #11533] Tue, 10 January 2017 16:49 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3214
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:

Quote:
In IR files, v001 is the cluster number; v002 is the household number (within v001) and v003 is the woman's line number (within v001 and v002). Together, v001 and v002 identify the household; v001 and v002 and v003 identify the individual woman. In IAIR42FL.dta, caseid is a character string that includes v001, v002, and v003. To get a household id, you can remove the last three columns (which give v003) from caseid. That is, use this line in Stata:

gen hhid=substr(caseid,1,12)


 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Child's weight in Kg (1 decimal) variable in SAS
Next Topic: Merging mother's data with children's data in SAS
Goto Forum:
  


Current Time: Sun Dec 22 06:50:36 Coordinated Universal Time 2024