The DHS Program User Forum      
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging KR with PR for Ethiopia 2011
Merging KR with PR for Ethiopia 2011 [message #14997] Thu, 24 May 2018 10:56 Go to next message
Messages: 2
Registered: May 2018
Location: Washington D.C.
Dear DHS Experts,

I am trying to replicate Table 10.7 Prevalence of diarrhoea in Ethiopia's 2011 report. However, I am having troubles merging PR dataset with KR. I have tried different ways but none of them works. I copied my codes as below.

use "/Ethiopia/2011/ETPR61DT/ETPR61FL.DTA", clear
keep hv001 hv002 hvidx hv201 hv205 hv225
rename hv001 v001
rename hv002 v002
rename hvidx b16
sort v001 v002 b16
save "/Ethiopia/2011/ETKR61DT/ETkKR61FLdiarrhoea.dta", replace

use "/Ethiopia/2011/ETKR61DT/ETKR61FL.DTA", clear
keep v001 v002 b16 v005 v008 b3 b5 h11 h11b v024 v025
sort v001 v002 b16
merge v001 v002 b16 using "/Ethiopia/2011/ETPR61DT/ETPR61FLdiarrhoea.dta"

Stata reports that the variables don't uniquely identify observations. If that's the case, which variables should I use instead? Thanks in advance!

Yue Chen
Re: Merging KR with PR for Ethiopia 2011 [message #15193 is a reply to message #14997] Thu, 14 June 2018 12:02 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1416
Registered: February 2013
Senior Member
Please reference the response to a similar post: 15192

Previous Topic: Merge PR and KR in wave 3, b16 does not exist
Next Topic: Merging HW to IR for Mali DHS IV - Missing HWCASEID
Goto Forum:

Current Time: Thu Jun 21 06:32:42 Eastern Daylight Time 2018