The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Link the DHS Individuals (IR) with DHS HIV (AR)
Re: Link the DHS Individuals (IR) with DHS HIV (AR) [message #2851 is a reply to message #2850] Tue, 02 September 2014 08:40 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3054
Registered: February 2013
Senior Member
Following is a response from DHS Senior Stata Specialist, Tom Pullum:

Inserted below are the lines to do this. You will have to change the paths.

use c:\DHS\DHS_data\AR_files\SZar51fl.dta, clear
ren hivclust v001
ren hivnumb v002
ren hivline v003

sort v001 v002 v003

save c:\DHS\DHS_data\scratch\temp.dta, replace

use c:\DHS\DHS_data\IR_files\SZIR51fl.dta, clear
sort v001 v002 v003
merge v001 v002 v003 using c:\DHS\DHS_data\scratch\temp.dta
tab _merge

keep if _merge==3

* hiv03 is the result of the test
* all analysis of the hiv data should use hiv05 for weights, not v005

[Updated on: Tue, 02 September 2014 08:42]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Svy, subpop
Next Topic: Merging datasets from multiple countries
Goto Forum:
  


Current Time: Sun May 12 04:00:23 Coordinated Universal Time 2024