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 next 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!
Re: Merging NFHS4 files [message #17960 is a reply to message #17862] Sat, 27 July 2019 06:39 Go to previous message
sujata is currently offline  sujata
Messages: 18
Registered: May 2019
Member
I hope you got the solution of your problem. I am also working on NFHS-4 dataset and have merged IR, PR and MR files. Since, in MR file there is no data on BMI, therefore i am using variable hb40 from IR sheet for BMI of men. This BMI is giving values for 1,08,817 observations (for 15-54 age group). But in table 10.19.2 the number of observations in this age group is only 1,07,529 and in age group 15-49 total no. of observations is 99.168 whereas when i am applying filters i am getting total of 1,00,459 men in this age group whose BMI is given.
What is the reason for this difference.
Any help will be highly appreciated.

Sujata
Previous Topic: SMART Methodology
Next Topic: Error calculating the prevalence of stunting and wasting
Goto Forum:
  


Current Time: Fri Apr 19 07:43:04 Coordinated Universal Time 2024