The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » Merging NFHS4 files
Merging NFHS4 files [message #17862] Fri, 28 June 2019 01:48 Go to previous message
Archana is currently offline  Archana
Messages: 6
Registered: March 2019
Member
I have merged MR,IR and PR files to study BMI, height and weight of men and women. But only 10% of the observations are merged.
I have used the following codes for merging.

use "C:\Dissertation\NFHS 4\Individual\IRnew.dta",clear
rename v001 hv001
rename v002 hv002
rename v003 hvidx
save "C:\Dissertation\NFHS 4\Individual\IRtemp.dta",replace
use "C:\Dissertation\NFHS 4\Men's\MRnew.dta",clear
rename mv* v*
rename v001 hv001
rename v002 hv002
rename v003 hvidx
save "C:\Dissertation\NFHS 4\Men's\MRtemp.dta",replace
use "C:\Dissertation\NFHS 4\Individual\IRtemp.dta",clear
append using "C:\Dissertation\NFHS 4\Men's\MRtemp.dta"
sort hv001 hv002 hvidx
save "C:\Dissertation\NFHS 4\IR_MRtemp.dta",replace
use "C:\Dissertation\NFHS 4\HouseholdNumber\PRnew.dta",clear
sort hv001 hv002 hvidx
save "C:\Dissertation\NFHS 4\HouseholdNumber\PRtemp.dta",replace
merge 1:m hv001 hv002 hvidx using "C:\Dissertation\NFHS 4\IR_MRtemp.dta"

Please let me know where am I going wrong!
 
Read Message
Read Message
Previous Topic: SMART Methodology
Next Topic: Error calculating the prevalence of stunting and wasting
Goto Forum:
  


Current Time: Sat Dec 21 12:01:09 Coordinated Universal Time 2024