The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » India » Merging child and Household recode (2015-2016 India survey)
Merging child and Household recode (2015-2016 India survey) [message #14069] Fri, 09 February 2018 08:57 Go to next message
shubham_maurya is currently offline  shubham_maurya
Messages: 1
Registered: February 2018
I am attempting to merge the child and household recode for the India 2015-16 survey. I have gone through previous posts on how to do this, which recommend merging v001, v002 and b16 with hv001,hv002 and hvidx respectively. However, in the household recode file, hvidx is split over 40 variables (hvidx_01, hvidx_02 and so on). How exactly should I merge these files?

Thank you!
Re: Merging child and Household recode (2015-2016 India survey) [message #14086 is a reply to message #14069] Tue, 13 February 2018 09:20 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1504
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:

You should use the PR file rather than the HR file. Both of them are household data files but the PR file has one record per person, whereas the HR file has one record per household, and the individuals have "_1", "_2", etc. attached to their variable names. Moreover, and this is a very important exception to the usual id codes, the person id for this survey includes the state id, hv024 (or v024). The following lines will do this merge (of course you must change the paths to the data files). When you do this merge, you will find 3437 children who are in the KR file but not the PR file. Those are children who have died or for some other reason are not in the same household as the mother, and therefore b16 is "." or "0" .

use e:\DHS\DHS_data\KR_files\IAKR52FL.dta
keep v001 v002 v024 b16
rename v001 hv001
rename v002 hv002
rename v024 hv024
rename b16 hvidx
sort hv024 hv001 hv002 hvidx
save e:\DHS\DHS_data\scratch\IAKR_temp.dta, replace

use e:\DHS\DHS_data\PR_files\IAPR52FL.dta
keep hv001 hv002 hv024 hvidx
sort hv024 hv001 hv002 hvidx
merge hv024 hv001 hv002 hvidx using e:\DHS\DHS_data\scratch\IAKR_temp.dta
tab _merge
Previous Topic: where is final report for whole india
Next Topic: Taking slum into account for sampling (NFHS4)
Goto Forum:

Current Time: Tue Dec 11 02:43:56 Eastern Standard Time 2018