The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » v001 v002 v003 doesnot uniquely identify observation
Re: v001 v002 v003 doesnot uniquely identify observation [message #3081 is a reply to message #3080] Mon, 13 October 2014 11:43 Go to previous messageGo to previous message
kalfikirsisay@gmail.com is currently offline  kalfikirsisay@gmail.com
Messages: 11
Registered: October 2014
Location: NL
Member
dear Trevor,
thanks for quick response
I tried using 1:1 merge command only to get simialr message from STATA as before. I couldnot figure out why this is so, the following was the exact code I used.
use "C:\Users\mademsei\Desktop\CSA data and reports\Biomaker manual\merging files for bio\HH member recode\ETPR61FL.DTA", clear
gen v001 = hv001
gen v002 = hv002
gen v003= hvidx
sort v002 v002 v003
merge 1:1 v001 v002 v003 using "C:\Users\mademsei\Desktop\birth 1 to 1 merge.dta"
variables v001 v002 v003 do not uniquely identify observations in the using data

The master file I am using is HH member and the using file is birthrecode. Neverthless, I used the 1:m merge and get matched data albeit many observations(over 66000) were not matched. This is the table I obtained from 1:m merge command.
merge 1:m v001 v002 v003 using "C:\Users\mademsei\Desktop\birth 1 to 1 merge.dta"

Result # of obs.
-----------------------------------------
not matched 66,848
from master 66,848 (_merge==1)
from using 0 (_merge==2)

matched 45,540 (_merge==3)
-----------------------------------------

Is this the right way? I am a bit sceptic of the merging approach, I thought either m:1 or 1:1 to be proper, ofcourse I merged all observations in my using file and this what I need to appear in the maser file. your last comment on this is of prior value,Thanks in advance,
Kalkidan Sisay

[Updated on: Mon, 13 October 2014 11:58]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Merging child's malaria results from HH member recode dataset with other child data in Child recode
Next Topic: Can continuous DHS be merged with standard DHS?
Goto Forum:
  


Current Time: Wed Dec 4 12:39:36 Coordinated Universal Time 2024