The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merge IR and KR (Merge IR and KR data file in R)
Merge IR and KR [message #26076] Sat, 04 February 2023 09:25 Go to next message
Kazi_Salahin is currently offline  Kazi_Salahin
Messages: 9
Registered: February 2023
Member
Dear Concern
Please help me to merge the IR and KR data files of Bangladesh (BDHS-2017-2018) in R. Is it okay if I use the following R command? Please tell me.

############################################################ #######################
#Merge the two dataset

KR$match<-paste(KR$V001, KR$v002)
KR$match<-as.numeric(KR$match)

IR$match<-paste(IR$v001, IR$v002, IR$v003)
IR$match<-as.numeric(IR$match)

KRdata<-merge(KR, IR, by = "match", all = TRUE)
############################################################ #######################

Thank you
Re: Merge IR and KR [message #26088 is a reply to message #26076] Mon, 06 February 2023 13:18 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

You should be ok except that the full identifier for a woman (or mother) is v001 v002 v003. You just have v001 v002, which would match households but not women.

However, why would you want to merge the KR and IR files? The KR file includes almost all the information about the woman (mother). What is there in the IR file that you want to add to the child and cannot already find in the KR file?

Re: Merge IR and KR [message #26089 is a reply to message #26076] Mon, 06 February 2023 13:42 Go to previous message
Kazi_Salahin is currently offline  Kazi_Salahin
Messages: 9
Registered: February 2023
Member
Dear Tom Pullum
Thank you for your response. I actually want to calculate the ANC as like as the BDHS 2017-2018 report and also for the IPV vaccine to calculate all vaccine coverage by either source.

If I dong wrong can you please guide me.

Thank you

Previous Topic: Merging 2018 Zambia HR to IR
Next Topic: Merging different rounds
Goto Forum:
  


Current Time: Tue Nov 26 14:48:18 Coordinated Universal Time 2024