The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » NIGERIA DHS 2024 MERGE (MERGE HR AND IR FOR NIGERIA DHS 2024)
NIGERIA DHS 2024 MERGE [message #31613] Tue, 25 November 2025 22:42
phehintee@gmail.com is currently offline  phehintee@gmail.com
Messages: 6
Registered: July 2018
Member
Hello, please, I want to merge moderate and severe food data from the household survey to the individual mothers dataset. However, there are multiple household line numbers hvidx_1 to hvidx_30. I am not sure which to use.

I planned to follow the command I found in the form
gen line_number_of_mother=v003

ren v001 hv001
ren v002 hv002
ren b16 hvidx
keep hv001 hv002 hvidx line_number_of_mother
sort hv001 hv002 hvidx
save e:\DHS\DHS_data\scratch\temp_child.dta, replace



use e:\DHS\DHS_data\PR_files\NGHR6AFL.dta, clear


sort hv001 hv002 hvidx

merge hv001 hv002 hvidx using e:\DHS\DHS_data\scratch\temp_child.dta
ren _merge merge_child


Look forward to your feedback
 
Read Message
Previous Topic: Merging KR to PR maintaining deceased children
Goto Forum:
  


Current Time: Mon Dec 1 22:34:26 Coordinated Universal Time 2025