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 #4377 is a reply to message #275] Sat, 16 May 2015 07:46 Go to previous messageGo to previous message
Malachi Arunda is currently offline  Malachi Arunda
Messages: 30
Registered: February 2014
Member
Dear DHS expert,
Below is my syntax for merging HIV dataset AR to individual dataset IR using Tanzania 2011-12 dataset on SPSS. Please let know why I do not get the desired results. The combined dataset does not have HIV data for IR, rather the AR (HIV test results) data is scattered within the combined IR/AR dataset and seem to be no connection.


DATASET ACTIVATE DataSet4.
SORT CASES BY HIVCLUST(A) HIVNUMB(A) HIV01(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.
Thank you

[Updated on: Sun, 17 May 2015 10:12]

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 09:55:41 Coordinated Universal Time 2024