The DHS Program User Forum - RDF feed
https://userforum.dhsprogram.com/index.php
Merging MR and HR and analyzing a variable from HR
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=17998&th=8314#msg_17998
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. ]]>abark2019-08-12T20:25:40-00:00Re: Merging MR and HR and analyzing a variable from HR
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=18039&th=8314#msg_18039
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).