The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Combining KR and PR files
Combining KR and PR files [message #10712] Mon, 05 September 2016 09:15 Go to previous message
waltine is currently offline  waltine
Messages: 21
Registered: March 2013
Location: South Africa
Member
Dear All,

I am trying to merge the KR and BR files but I keep getting this error message even after following steps in previous "Merge threads".

Error: variables hv001 hv002 hvidx do not uniquely identify observations in the using data.

Syntax:
use "E:\NDHS 2013\ngkr6adt\NGKR6AFL.DTA", clear

. ren v001 hv001

. ren v002 hv002

. ren b16 hvidx

. sort hv001 hv002 hvidx

. save "C:\Users\Somefun\Desktop\Working Papers\Child Health Outcomes\KR.dta", replace
file C:\Users\Somefun\Desktop\Working Papers\Child Health Outcomes\KR.dta saved

. use "E:\NDHS 2013\ngpr6adt\NGPR6AFL.DTA", clear

. sort hv001 hv002 hvidx

. merge 1:1 hv001 hv002 hvidx using "C:\Users\Somefun\Desktop\Working Papers\Child Health Outcomes\KR.dta"
variables hv001 hv002 hvidx do not uniquely identify observations in the using data
r(459);


Thank you.


waltine
 
Read Message
Read Message
Read Message
Previous Topic: Merging datasets of different rounds- longitudinal
Next Topic: Merging Men, Women, Child dataset into Household level unit analysis
Goto Forum:
  


Current Time: Sun Dec 22 05:05:16 Coordinated Universal Time 2024