The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging MR and HR and analyzing a variable from HR (After merging MR and HR datasets, I want to use a variable from the HR dataset to analyze mosquito bed net ownership by men)
Re: Merging MR and HR and analyzing a variable from HR [message #18039 is a reply to message #17998] Fri, 23 August 2019 14:18 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member

Following is a response from DHS Research and Data Analysis Director, Tom Pullum:

The 2015-16 survey of Tanzania was a regular DHS. It's identified as "TZ7A". There was a Malaria Indicator Survey in Tanzania in 2017, identified as "TZ7I" (where "I" is the letter in the alphabet between "H" and "J"). I hope you are also using that survey, because it has more information about malaria.

Yes, I see that v459 is in TZIR7A but there is no mv459 in TZMR7A. This must be an oversight, because the variable was obtained for everyone in the household, regardless of sex and age. Thanks for pointing if out.

The variable is called hv227, as you say, in the HR file, but the easiest way to get it is by merging the MR and PR files, rather than the MR and HR files. The HR file has just one record per household, whereas the PR file has a record for everyone in the household.

I suggest that you open the PR file, restrict it to males (hv104=1), reduce to just hv001, hv002, hvidx, and hv227, rename hv227 to be mv459, sort on hv001 hv002 hvidx, and save as a temporary file. Then open the MR file, rename v001 v002 v003 to hv001 hv002 hvidx, respectively, merge hv001 hv002 hvidx with the temporary file, and keep if _merge==3. You will then have mv459 analogously to v459. Let us know if you have problems doing this. I am describing it in Stata rather than SPSS--I don't use SPSS.

You can find out how many males and females own bednets by opening TZPR7A and cross-tabulating hv227 with hv104. You would want to use weights and restrict on age (hv105) if you just want adults. You can do the same with the IR and MR files separately (after adding mv459 to the MR file).

 
Read Message
Read Message
Previous Topic: Merging of NFHS-4 dataset
Next Topic: Merge NFHS 4 recode files
Goto Forum:
  


Current Time: Fri Apr 26 11:32:23 Coordinated Universal Time 2024