The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging DHS data in Stata
Re: Merging DHS data in Stata [message #5493 is a reply to message #4393] Sat, 30 May 2015 13:46 Go to previous messageGo to previous message
Malachi Arunda is currently offline  Malachi Arunda
Messages: 30
Registered: February 2014
Member
Dear DHS experts,
Thank you once again for the guidance, however, I still seem to be having hitches with Tanzania SPSS 2011-12 datasets and the HIV datasets. I have tried to merge the two datasets using the syntax guideline you provided in the forum but they seem to merge with different case IDs, and the HIV dataset merges only as new cases with own variables with. Here is the syntax I used. Could I get further guidance. Thank you.

DATASET ACTIVATE DataSet4.
SORT CASES BY hivCLUST(A) hivNUMB(A) hivLINE(A).

DATASET ACTIVATE DataSet1.
SORT CASES BY V001(A) V002(A) V003(A).
SAVE

RENAME VARIABLES (V001 V002 V003 =
hivCLUST hivNUMB hivLINE).
EXECUTE

DATASET ACTIVATE DataSet6.
MATCH FILES /FILE=*
/FILE='DataSet4'
/BY hivCLUST hivNUMB hivLINE.
EXECUTE.
Kind regards,
Malachi

[Updated on: Sat, 30 May 2015 13:53]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to match women to their husbands
Next Topic: Merging HR and PR Files
Goto Forum:
  


Current Time: Wed Dec 25 10:04:59 Coordinated Universal Time 2024