Re: Merging household and women's individual data Myanmar 2015-2016 [message #21993 is a reply to message #21897] |
Thu, 14 January 2021 13:50 |
Bridgette-DHS
Messages: 3203 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Specialist, Kerry MacQuarrie:
Dear Stephanie,
You have renamed and matched the cluster and household number appropriately. However, hv003 does not match with v003. The variable hv003 refers to the line number of the person who answered the household questionnaire, not the line number of all individual women. You don't need it. Try the following:
use "C:\Users\qlu4\Desktop\mdhs_hh.dta"
gen v001=hv001 //recode hh survey cluster number variable to match women's data set
gen v002 = hv002 //recode hh survey household number variable to match women's data set
keep v001 v002 sh148 sh148f sh149 sh150 sh151 sh152 sh153 sh154 sh155 sh156 sh157 sh158 sh159 sh160 sh161 //keep only relevant variables
sort v001 v002
save "C:\Users\qlu4\Desktop\mdhs_hh.dta", replace
use "C:\Users\qlu4\Desktop\mdhs_women.dta"
sort v001 v002
merge 1:m v001 v002 using "C:\Users\qlu4\Desktop\mdhs_hh.dta"
In the Myanmar DHS, this matches 12,885 cases and leaves 3,095 cases in the HR file unmatched (ie households that did not have a corresponding eligible woman in the IR file)
-
Attachment: mrg.png
(Size: 10.33KB, Downloaded 817 times)
|
|
|