The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging IR and KR with PR - no unique identifiers (for particular countries only)
Merging IR and KR with PR - no unique identifiers (for particular countries only) [message #14974] Wed, 23 May 2018 07:21 Go to previous message
nibiti is currently offline  nibiti
Messages: 20
Registered: April 2018
Location: Göttingen
Member
Hi guys,

I've posted this in another thread but I guess it makes more sense to have it as a stand-alone topic.

I am working with Sub-Saharan African countries and have already merged PR with the GE files (for GPS coordinates). Now, I am merging these combined PR/GE files with MR, IR and KR datasets. This works fine except for a few countries/waves for IR and KR. Following the guiudelines from other forums, I am using as identifiers hv001 hv002 and hvidx (PR), v001, v002 and v003 (IR) and v001, v002 and b16 (KR). I have renamed the variables in IR and KR to match the PR variable names.

As said, I am using Sub-Saharan African countries in waves 3 to 7. I have excluded KR from wave 3 because the b16 identifier does not exist there. Also, I am also using the Stata commands "drop if b16==0" and "drop if b16==." and have also removed duplicates in the Using dataset with the command "duplicates drop v001 v002 v003, force" (for IR) and "duplicates drop v001 v002 b16, force" (for KR).


There are several countries for which the three variables are still not unqiue identifiers when trying to merge. Here's a list of those countries and waves:

Wave 3:
IR: ML, NI, TG --> all not uniquely identified in the Using data

Wave 4:
IR: ML, SN --> all not uniquely identified in the Using data

Wave 6:
KR: BJ, LS, ML --> all not uniquely identified in the Using data


Separately for each wave, I am using a loop over all countries. For all other countries it works fine, which means that the code is not the problem and all the merge commands are correct. It should be something about the raw data, is what I suspect. Maybe someone has an idea?

Many thanks in advance
Best
Timo

[Updated on: Wed, 23 May 2018 07:26]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: Generating ID variable
Next Topic: Nigeria 2003 merging datasets
Goto Forum:
  


Current Time: Fri Nov 29 00:41:51 Coordinated Universal Time 2024