The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging Egypt 2000 KR and HW files
Merging Egypt 2000 KR and HW files [message #3583] Tue, 13 January 2015 15:06 Go to previous message
rejone4@emory.edu is currently offline  rejone4@emory.edu
Messages: 8
Registered: November 2014
Location: United States
Member

Hello,
I am trying to merge the KR and HW files from Egypt's DHS 2000 files. I have used this code for other years with the same variables and have had no problems. However
when I run the code below for these two files the code runs but then there are no observations.


*Create the household ID by dropping the 3 d character line number from caseid
gen hwhhid = substr(caseid,1,length(caseid)-3)

*make a copy of the household line number
clonevar hwline = b16

*Sort on the household ID and the line number from the household schedule
sort hwhhid hwline

*merge the data

merge m:1 hwhhid hwline using "H:\Thesis\Egypt_2008\Egypt_2000(IV)\EGHW01FL.dta"

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Merging IR and MR files India
Next Topic: Linking child data with parentals information
Goto Forum:
  


Current Time: Thu Dec 5 04:00:52 Coordinated Universal Time 2024