The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » 2014 Kenya DHS merging household and men's datafile
Re: 2014 Kenya DHS merging household and men's datafile [message #10141 is a reply to message #10140] Thu, 30 June 2016 09:35 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3214
Registered: February 2013
Senior Member
Senior DHS Stata Specialist, Tom Pullum has provided the following Stata syntax:

use MRfile, clear
rename mv001 hv001
rename mv002 hv002
rename mv003 hvidx
sort hv001 hv002 hvidx
save MRtemp.dta, replace

use PRfile, clear
sort hv001 hv002 hvidx
merge hv001 hv002 hvidx using MRtemp.dta
tab _merge
keep if _merge==3
drop _merge
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Merging DHS Files
Next Topic: Merging data
Goto Forum:
  


Current Time: Sun Dec 22 05:59:58 Coordinated Universal Time 2024