The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging Child and Household data for a new user of Stata
Re: Merging Child and Household data for a new user of Stata [message #26636 is a reply to message #26634] Wed, 12 April 2023 08:10 Go to previous messageGo to previous message
rachelsb98 is currently offline  rachelsb98
Messages: 6
Registered: April 2023
Member
Thank you, I was wondering if you could help me with another issue I'm coming across. I followed the video, but am still receiving an error that variables "do not uniquely identify observations in the master data". I am using the following code


use "D:\Raw data sets\Albania\Albania 17-18 HH Raw\ALPR71FL.DTA"
*Merging HH and CHild dataset using "https://www.youtube.com/watch?v=SJkJmtgaqBc"
drop if hc60>12
rename hvidx c_line
rename hv001 cluster_line
rename hv002 hh_line
rename hc60 mom_line
order c_line cluster_line hh_line mom_line
save "D:\Raw data sets\Albania\Albania 17-18 HH Raw\Albania 17-18 Merge.DTA", replace

use "D:\Raw data sets\Albania\Albania 17-18 Raw\Albania 17-18 Raw.DTA"
drop if b16==0
rename b16 c_line
rename v001 cluster_line
rename v002 hh_line
rename v003 mom_line
order c_line cluster_line hh_line mom_line

merge 1:1 c_line cluster_line hh_line mom_line using "D:\Raw data sets\Albania\Albania 17-18 HH Raw\Albania 17-18 Merge.DTA"


Do you know what could be the issue? Btw i tried looking at other posts, but couldn't find any with this issue. Thank you!

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Merging KR to MR OR (KR, IR, MR)
Next Topic: How to merge KR and IR
Goto Forum:
  


Current Time: Tue Nov 26 15:12:58 Coordinated Universal Time 2024