Merging Household file to children file [message #16153] |
Mon, 12 November 2018 11:47 |
kbrindle
Messages: 3 Registered: November 2018
|
Member |
|
|
Hello,
I am having issues merging the household file to the childrens file. I am only interesting in merging because there is a district-level variable in household that is not in childs data file. I used the following code, but this did not seem to match effectively in Stata.
(Master is child file, and using file is household)
gen hh_uniqID (in household file) = (hv001*100)+hv002
gen hh_uniqID (in child file) = (v001*100)+v002
merge m:1 hh_uniqID using "file location"
I've seen the website in merging the data sets, https://dhsprogram.com/data/Merging-Datasets.cfm however, following this does not allow to merge properly with children and household data.
|
|
|