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)
Merging MR and HR and analyzing a variable from HR [message #17998] Mon, 12 August 2019 16:25 Go to next message
abark is currently offline  abark
Messages: 1
Registered: August 2019
Member
Hi: I'm using data from the 2015 Tanzanian DHS. I can merge MR and HR by hv001 and hv002 but I want to analyze how many men own a mosquito bed net. That variable for bed net ownership is in the HR dataset (var HV227). In the accompanying IR dataset, this variable is available as V459 and states that it was received from the HR dataset.

Why doesn't the MR dataset have a parallel "mv459" variable?
And how can I figure out how many men own mosquito bed nets after I have merged the MR and IR datasets in SAS? (I have over 14,000 observations and only 3 variables in my merged data sets-- var hv001 hv002 and hv003).

Thank you in advance.
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: 1667
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).

Previous Topic: Merging of NFHS-4 dataset
Next Topic: STATA codes to merge women and household datasets
Goto Forum:
  


Current Time: Sun Sep 22 06:49:40 Eastern Daylight Time 2019