Combining KR and PR files [message #10712] |
Mon, 05 September 2016 09:15 |
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
|
|
|