The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging household and women's individual data Myanmar 2015-2016
Re: Merging household and women's individual data Myanmar 2015-2016 [message #22032 is a reply to message #21993] Fri, 22 January 2021 03:37 Go to previous messageGo to previous message
anikhpg42@gmail.com is currently offline  anikhpg42@gmail.com
Messages: 38
Registered: December 2017
Location: Bangladesh
Member

Dear Kerry MacQuarrie,
For merging two recent datasets of BDHS, i.e. BDPR18 and BDIR18, I have applied the same command that you indicated. But, the result doesn't match. the error status showed "variables v001 v002 do not uniquely identify observations in the master data". What am I missing?

I have used the following commands:


clear all
set maxvar 30000
set more off

use "D:\data\BDPR18.DTA"
gen v001=hv001 //recode PR survey cluster number variable to match women's data set
gen v002 = hv002 //recode PR survey household number variable to match women's data set
keep v001 v002 hv005 hv022 hv021 sb333aa sb333ab sb318a sb335b sb327a
sort v001 v002
save "D:\data\BDPR18_MERGED.dta", replace

use "D:\data\BDIR18.DTA"
sort v001 v002
merge 1:m v001 v002 using "D:\data\BDPR18_MERGED.dta"



ASIBUL ISLAM ANIK
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Merge PR and KR in wave 3, b16 does not exist
Next Topic: MERGING HIV DATASETS AND WOMEN DATASETS, DHS 2016-2017, HAITI.
Goto Forum:
  


Current Time: Fri Nov 8 05:41:19 Coordinated Universal Time 2024