MERGING IR AND HR FILE [message #28965] |
Wed, 03 April 2024 12:31 |
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
|
|
|