Nambia DHS 2013 - merging problem [message #11882] |
Fri, 24 February 2017 05:45 |
Christian Bommer
Messages: 13 Registered: June 2015
|
Member |
|
|
Dear DHS team,
I tried to merge data from the individual recode (IR) file to the household recode (HR) file from Namibia DHS 2013 using Stata 14. The merging works in the sense that all individuals from the IR file find a match but 3177 households are not matched. The response rate of women as reported in the final report was above 90%, so this shouldn't be the reason. I am facing similar problems when merging the HR file to the birth recode (BR) file or when first appending the IR file and the men recode (MR) file and then merging both to the HR file. Oddly, when I tried to merge the HR file to the household member (PR) file it worked without problems (i.e. every household member has a match). Here is my Stata code:
local imported_vars v024 v025 v026 // just an example
use "NMHR61FL.dta", clear
rename hv001 v001
rename hv002 v002
merge 1:m v001 v002 using "NMIR61FL.dta", keepusing(`imported_vars') // apparently not all households are in individual dataset
Could you please tell me where my mistake is?
Kind regards
Christian
|
|
|
|
|