Merging Egypt 2000 KR and HW files [message #3583] |
Tue, 13 January 2015 15:06 |
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"
|
|
|