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
Merging Birth's / Chidren's with Household Member Recode [message #3851] Wed, 25 February 2015 02:12 Go to next message
karlo
Messages: 9
Registered: December 2014
Member
Hello!

I'm having a little difficulty merging the Birth's and Children's Recode with the Household Member Recode (I need both individual and household variables). I can easily merge the individual with the household member recode but is having a hard time for births/children.

I am interested particularly in using individual and household data for ANC and Delivery location (Births + Household member recode) and immunization history of children aged 1-2 years from the last interview (Children + household member recode).

I'm using the variables v001 v002 v003 (hv001 hv002 hvidx) (as with the individual -> household recode) but could not merge the data sets =/ I used http://dhsprogram.com/data/Merging-Datasets.cfm as a reference but STATA is giving me results saying that the entries do not match.

Thanks for your help!


Karlo

[Updated on: Wed, 25 February 2015 20:59]

Report message to a moderator

Re: Merging Birth's / Chidren's with Household Member Recode [message #3899 is a reply to message #3851] Wed, 04 March 2015 09:28 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 621
Registered: January 2013
Senior Member
Please post your code for matching and we can then review it.
Re: Merging Birth's / Chidren's with Household Member Recode [message #8687 is a reply to message #3899] Wed, 02 December 2015 08:12 Go to previous messageGo to next message
karlo
Messages: 9
Registered: December 2014
Member
Hello!

Here's the code that I used:

merge 1:m v001 v002 using "PHPR62FL.DTA"

Is this correct?

Before the merging, I sorted the v001 and v002 as I usually do.

Sorry for the late reply to this message. I still need to merge the files though =(
Re: Merging Birth's / Chidren's with Household Member Recode [message #8702 is a reply to message #8687] Thu, 03 December 2015 10:56 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 621
Registered: January 2013
Senior Member
You need to include the line number of the person in the merge. For the PR file that is in hvidx and for the BR or KR file it is in b16 (line number of child in household). Note that there are some children in the BR and KR files for whom b16 is 0, 99, or missing (.), because the child in the BR file either does not live in the household or is dead or had missing data - it is best to drop these before merging. Then perform a 1:1 merge to merge the data.
Re: Merging Birth's / Chidren's with Household Member Recode [message #8710 is a reply to message #8702] Fri, 04 December 2015 01:24 Go to previous messageGo to next message
karlo
Messages: 9
Registered: December 2014
Member
Hey trevor!

Thanks a lot for the support. Finally able to merge the file.
Re: Merging Birth's / Chidren's with Household Member Recode [message #9317 is a reply to message #8702] Wed, 09 March 2016 16:29 Go to previous messageGo to next message
marron is currently offline  marron
Messages: 1
Registered: March 2016
Member
Hi, I have a follow-up question with regards to your suggestion to use the b16 variable in the birth recode file. I am unable to locate the b16 variable in the DHS surveys from Phase III and earlier, at least for countries in southern Africa. Does this mean that it is impossible to merge the birth recode file with the household file for these earlier surveys?
Re: Merging Birth's / Chidren's with Household Member Recode [message #9321 is a reply to message #9317] Thu, 10 March 2016 07:42 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 621
Registered: January 2013
Senior Member
Yes, it does mean that you can't link the birth history with the household roster. We added b16 into the surveys specifically to allow this.
Re: Merging Birth's / Chidren's with Household Member Recode [message #10940 is a reply to message #9321] Mon, 10 October 2016 10:50 Go to previous messageGo to next message
sammyladele is currently offline  sammyladele
Messages: 11
Registered: June 2015
Location: Nigeria
Member

Hello Trevor, I also have a question. What if I'm merging CR with KR does it follow the same procedure using b16?

Oladele Rotimi
Re: Merging Birth's / Chidren's with Household Member Recode [message #10941 is a reply to message #10940] Mon, 10 October 2016 11:13 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 621
Registered: January 2013
Senior Member
The CR file is the couples recode file. The KR is the children under under five recode file (sometimes known as the kids recode file). B16 is the children's line number from the household schedule and is needed when merging the children's data from the KR file with their information from the household schedule (PR file). The children's line number is not needed for merging with the CR file - you would merge based on the cluster (v001 <-> mv001), household (v002 <-> mv002), and the husband's line number from the women's recode (v034) with the respondent's line number from the men's data (v003).
Re: Merging Birth's / Chidren's with Household Member Recode [message #10942 is a reply to message #10941] Mon, 10 October 2016 11:18 Go to previous messageGo to next message
sammyladele is currently offline  sammyladele
Messages: 11
Registered: June 2015
Location: Nigeria
Member

Thanks Trevor, I will try it now.

Oladele Rotimi
Re: Merging Birth's / Chidren's with Household Member Recode [message #15108 is a reply to message #10942] Mon, 04 June 2018 03:52 Go to previous message
anikhpg42@gmail.com is currently offline  anikhpg42@gmail.com
Messages: 24
Registered: December 2017
Member
Hi Trevor,
I just want to know that, what does the variable 'Line number of the household member' (hvidx) means minutely?
That is, if hvidx = 1, then what does it indicate?


ASIBUL ISLAM ANIK

[Updated on: Mon, 04 June 2018 03:59]

Report message to a moderator

Previous Topic: Discrepancy in stunting, wasting, underweight prevalence for Nepal DHS 2001
Next Topic: Dealing with country-specific codes with panel data across 10 countries
Goto Forum:
  


Current Time: Sun Oct 21 06:54:07 Eastern Daylight Time 2018