The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging variables from original DHS with IPUMS DHS
Re: Merging variables from original DHS with IPUMS DHS [message #18991 is a reply to message #18989] Tue, 31 March 2020 11:20 Go to previous messageGo to previous message
Maemae93 is currently offline  Maemae93
Messages: 2
Registered: March 2020
Member
I realise I have made a mistake and created the unique identifier IDHSPID. However, after trying to merge using the following code on Stata:

gen sample = string(81805)

gen str idhspid = sample + caseid


In master file:

merge 1:1 idhspid using "original DHS data"

I get the following, where the observations are not matched

Result # of obs.
-----------------------------------------
not matched 126,364
from master 106,890 (_merge==1)
from using 19,474 (_merge==2)

matched 0 (_merge==3)
 
Read Message
Read Message
Read Message
Previous Topic: Are the merging commands and results correct
Next Topic: Mismatch of number of clusters
Goto Forum:
  


Current Time: Fri Apr 26 12:48:06 Coordinated Universal Time 2024