The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » merging wealth index from Ethiopia DHS 2000 to women's file
Re: merging wealth index from Ethiopia DHS 2000 to women's file [message #13320 is a reply to message #162] Tue, 17 October 2017 18:16 Go to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 803
Registered: January 2013
Senior Member
The wealth index file for the Burkina Faso 1998 survey does not match to v001 and v002. Instead the variables match to the variables sdepart (departement) sconcess (concession) and snumber (household number within concession). You could extract the equivalents of these variables as follows:
gen str3 wdepart=substr(whhid,5,3)
gen str3 wconcess=substr(whhid,8,3)
gen str2 wnumber=substr(whhid,11,2)
destring wdepart, gen(sdepart)
destring wconcess, gen(sconcess)
destring wnumber, gen(snumber)
drop wdepart wconcess wnumber

However, a much simpler method is just to create whhid in the children's dataset and to merge the wealth index file to the children's dataset using:
gen str12 whhid=substr(caseid,1,12)
merge m:1 whhid using BFWI31FL.dta


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Hypertension in Nepal
Next Topic: Keeping caseid in and keeping missing observations out when using Stata "collapse"
Goto Forum:
  


Current Time: Mon Dec 2 16:03:36 Coordinated Universal Time 2024