The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Merging Birth's / Chidren's with Household Member Recode
Re: Merging Birth's / Chidren's with Household Member Recode [message #28838 is a reply to message #28815] Mon, 18 March 2024 07:22 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

When you do this kind of merge, a variable called "_merge" is constructed with 3 categories. The category you are most interested in is _merge=3, which identifies children that are in both files. However, there are two other categories, "_merge=1" and "_merge=2". The codes 1 and 2 depend on which file is the "master" file, the one you start with, and which file is the "using" file, the one named after the word "using" in the merge command.

There are many cases in the PR file that are not in the KR file. These are household members above the age of 5, as well as children under 5 who were present in the household but whose mothers were not present, so they do not appear in a birth history. You almost certainly want to drop these cases.

There are relatively few cases in the KR file that are not in the PR file. These are children with b16=., who have died, and children with b16=0, who are living but are living elsewhere. In order to do the merge, you probably removed them already.

If you just enter "keep if _merge==3" and "drop _merge" you will then have the cases you want. I hope this is what you were asking about.


 
Read Message
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: Measles vaccination NFHS 5 India
Next Topic: DHS 5 India dataset IR file-r900 error
Goto Forum:
  


Current Time: Wed Nov 27 05:57:01 Coordinated Universal Time 2024