The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Nepal » Merging Nepal 2016 HR + IR data
Merging Nepal 2016 HR + IR data [message #14052] Wed, 07 February 2018 02:51
DavidFM is currently offline  DavidFM
Messages: 1
Registered: February 2018
Member
Dear DHS team,
Currently I'm carrying out a projected based on Nepal DHS 2016 data about migrant women. Given that the migration characteristics are in the household data, I would like to merge the household (HR) and individual women's data (IR). However, I would like to merge it individually using V001 (cluster), v002 (household) and V003 (individual) in order to differentiate migrant women (women who migrated themselves) and migrant wives (women with a migrant husband). For this purpose, I used the following Stata commands:

* Selecting variables of interest
keep hhid hv001 hv002 sh21 sh29 sh24_* sh25y_* sh26_* sh27_* sh28c_* sh28d_*

* Rename variable to drop 0 to facilitate reshape
rename sh24_0* sh24_*
rename sh25y_0* sh25y_*
rename sh26_0* sh26_*
rename sh27_0* sh27_*
rename sh28c_0* sh28c_*
rename sh28d_0* sh28d_*
* Reshaping to get individual rows
reshape long sh24_ sh25y_ sh26_ sh27_ sh28c_ sh28d_, i(hhid) j(v003)

* Rename variables for matching
rename hv001 v001
rename hv002 v002

* Sort and save subset
sort v001 v002 v003
save "migHR.dta"

And finally I merged it with the IR data using v001 v002 v003. Did I do a good job creating v003 and merging the datasets? I have noticed some discrepancies on the variable sh24 (sex of the migrant member) and the variable hv104 (sex of the household member).

Thank you very much for your help! Any comment would be highly appreciated!

David.
Previous Topic: TT injection- table 9.6 of page 170 NDHS 2016
Next Topic: Pregnancy outcome for Nepal DHS 2011
Goto Forum:
  


Current Time: Thu Oct 3 09:40:55 Coordinated Universal Time 2024