The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » HIV » Merging IR and AR datasets (Uganda AIS 2011)
Merging IR and AR datasets (Uganda AIS 2011) [message #10894] Fri, 30 September 2016 14:21 Go to next message
pearlapb is currently offline  pearlapb
Messages: 1
Registered: September 2016
Member
Hi! I'm working on HIV and education and I'm trying to merge the HIV dataset of UAIS with the IR on STATA:

This is what I've done:

--------------

use "/Users/pb/Desktop/UGAR6AFL.DTA", clear
rename hivclust v001
rename hivnumb v002
rename hivline v003
rename hiv03 vhiv03
rename hiv05 vhiv05
keep v*

sort v001 v002 v003

save "/Users/pb/Desktop/UAIS_HIV.dta", replace

use "/Users/pb/Desktop/FINAL UAIS Dataset.dta", clear
sort v001 v002 v003
merge v001 v002 v003 using "Users/pb/Desktop/UAIS_HIV.dta"
rename _merge _merge_HIV

-------------

My initial dataset was composed of 21,741 observations, but I end up with a merged dataset of 32,021 observations. I don't understand where the 10,280 extra observations come from.
I had understood that the UAIS 2011 IR file was for both women and men, as there is no men only dataset (no MR) and the IR file has an aidsex variable showing if the respondent is male or female... (?)

Can anyone explain what I am not understanding and where I am making the mistake?

Thank you!

Re: Merging IR and AR datasets (Uganda AIS 2011) [message #10903 is a reply to message #10894] Mon, 03 October 2016 11:38 Go to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
The Uganda AIS 2011 included HIV testing for children as well as adults 15-59. If open just UGAR6AFL.DTA and tabulate hiv03 by slage, you can see which cases are for adults and which for children.

Basically in your analysis file you will just need to keep cases with _merge_HIV == 3.

Previous Topic: Downloaded HIV data Zimbabwe
Next Topic: Rwanda 2014 Children's HIV
Goto Forum:
  


Current Time: Fri Mar 29 02:08:19 Coordinated Universal Time 2024