The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Nigeria » Merging Household member and Individual Recode files for Nigeria 1999
Re: Merging Household member and Individual Recode files for Nigeria 1999 [message #3011 is a reply to message #3009] Fri, 03 October 2014 11:11 Go to previous messageGo to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
Hi Anna,

This is a strange case and it took a bit to pinpoint the issue. When I browsed the data I could see the data that were supposed to match but using the commands you used I couldn't get them to match either. If I did a rename of variables rather than generating new variables I got the data to match. Finally I discovered that the gen command with v001 was not creating a variable of the same type, but rather was creating a float type variable. So to solve the problem, you need to set the type of variable when using the gen command for v001 as follows:
gen long v001 = hv001
gen v002 = hv002
gen v003 = hvidx
Then when you merge you should find all cases matching.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Variables related to country's regions
Next Topic: Migrant Variable
Goto Forum:
  


Current Time: Mon Jan 13 09:35:08 Coordinated Universal Time 2025