The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging KR and BR data files
Merging KR and BR data files [message #19180] Tue, 05 May 2020 16:25 Go to next message
ask_ans_sri is currently offline  ask_ans_sri
Messages: 2
Registered: June 2018
Location: DELHI
Member
I have tried to replicate table no. 10.12 in NFHS-4, India report. For this I have merged KR and PR by following syntax

use kr.dta

rename caseid hhid
rename (v000 v001 v002 v003)(hv001 hv002 hv003)
rename b16
drop if b16 ==. | b16==0

save kr.dta


use pr.dta

merge m:m using hv001 hv002 hv003 hvidx using kr.dta

save krpr.dta

I am unable to match frequencies with the reported frequency on table 10.12. Even though I got same percentage with KR file, but unable to match frequencies. Please do help me.

I have used all the weights and filtered hv103 ==1 and hv102==1. But still not able to match. Please help me.
Re: Merging KR and BR data files [message #19274 is a reply to message #19180] Wed, 20 May 2020 07:55 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3017
Registered: February 2013
Senior Member
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

For all of the NFHS surveys, the identifiers for cases include hv024. There are other errors too. Try this:

.
use kr.dta 
drop if b16 ==. | b16==0 
rename v024 hv024
rename v001 hv001
rename v002 hv002
rename b16 hvidx
sort hv024 hv001 hv002 hvidx
save krtemp.dta 

use pr.dta 
sort hv024 hv001 hv002 hvidx
merge m:m using hv001 hv002 hv003 hvidx using krtemp.dta 

save krpr.dta

Previous Topic: Apply weight to merge data file
Next Topic: How to match women to their husbands
Goto Forum:
  


Current Time: Thu Mar 28 18:20:54 Coordinated Universal Time 2024