The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » General » MERGING IR AND HR FILE ((Problem with STATA compilation))
MERGING IR AND HR FILE [message #28965] Wed, 03 April 2024 12:31 Go to previous message
Noyel Sebastian is currently offline  Noyel Sebastian
Messages: 11
Registered: March 2024
Member
Hello,

I tried to merge the IR file with HR file for NFHS in STATA and used the following codes:

*Saving the IR file alternatively
use IAIR74FL, clear
save irtemp.dta, replace

*Renaming Key variables in HR file.
use IAHR74FL, clear
rename (hv001 hv002) (v001 v002)
save hrtemp.dta, replace

*Merging master IR file with HR file
use irtemp.dta, clear
merge m:1 (v001 v002) using hrtemp.dta
keep if _merge==3
save Merged_File, replace

However, STATA takes a long time to compile and does not merge. Is there any problem with this code? Can you give me an alternative code, if any? I want to extract certain Household characteristics for each woman and Domestic violence characteristics. Later, I have to analyse this with the BR file (by merging it). Can you help me with the IR and HR merger, or are there any alternatives to get the HH characteristics for each record in the BR file?



Thank You
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Regional variable v024
Next Topic: Agricultural Land ownership: Treatment of Zero values
Goto Forum:
  


Current Time: Tue Dec 17 21:15:05 Coordinated Universal Time 2024