The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merge PR and KR in wave 3, b16 does not exist
Re: Merge PR and KR in wave 3, b16 does not exist [message #14961 is a reply to message #14958] Tue, 22 May 2018 08:28 Go to previous messageGo to previous message
nibiti is currently offline  nibiti
Messages: 20
Registered: April 2018
Location: Göttingen
Member
Hi Tom,

thanks for your reply. I have dropped the KR wave 3 data now.


But do you also have an answer for my second question? hv001/v001, hv002/v002 and hvidx/b16 do not uniquely identify the data in wave 4 and in wave 6, independent of the country (I am using all Sub-Saharan African countries).

I am using the exact same code for wave 5 and there the merge works fine. But for wave 4 and wave 6 it does not seem to work. My code broadly looks like this:

In KR file:
rename v001 hv001
rename v002 hv002
rename b16 hvidx

In PR file:
sort hv001 hv002 hvidx
merge 1:1 hv001 hv002 hvidx using "KR.dta"

This leads to the following error message:

"variables hv001 hv002 hvidx do not uniquely
identify observations in the using data
r(459);"


Any ideas?

Best
Timo
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Survey identifiers
Next Topic: Merging household and women's individual data Myanmar 2015-2016
Goto Forum:
  


Current Time: Wed Apr 24 18:30:23 Coordinated Universal Time 2024