The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Problems with merging Namibia 2013 IR MR and HIV data
Problems with merging Namibia 2013 IR MR and HIV data [message #7072] Wed, 19 August 2015 04:54 Go to next message
hannarekola is currently offline  hannarekola
Messages: 2
Registered: April 2015
Member
Hello,

I am trying to merge individual recode for women and men to the HIV dataset as instructed behind the link attached.

http:// userforum.dhsprogram.com/index.php?t=msg&th=49&S=33b 528e9992e63e95e4eecb857ea4122#msg_70

I thought I already managed to do this, but frequencies of the new file do not match with those of the final report of NDHS 2013. I can not pursue with the analysis until I find out what is going wrong with the merging. Combining the data for women and men went smoothly and the frequencies of gender and age seem to match. The problem occurs when merging the HIV data.

The frequencies of the dataset I created are as follows:
Tested for HIV and interviewed 8858
Women 4984
Men 3874

In the NDHS 2013 final report frequencies are as follows:
Tested for HIV and interviewed 8858
Women 4740
Men 4118

I used the graphical user interface but the code printed to output was as follows:

GET
FILE='E:\ArcMap\DATA\total.SAV'.
DATASET NAME DataSet1 WINDOW=FRONT.
GET
FILE='E:\ArcMap\DATA\nmar61sv\hiv.sav'.
DATASET NAME DataSet2 WINDOW=FRONT.
DATASET ACTIVATE DataSet1.
SORT CASES BY HIVCLUST(A) HIVNUMB(A) HIVLINE(A)
/OUTFILE='E:\ArcMap\DATA\total_sort.sav'.
DATASET ACTIVATE DataSet2.
SORT CASES BY HIVCLUST(A) HIVNUMB(A) HIVLINE(A)
/OUTFILE='E:\ArcMap\DATA\hiv_sort.sav'.
DATASET ACTIVATE DataSet1.

SAVE OUTFILE='E:\ArcMap\DATA\total_hiv.sav'
/COMPRESSED.
MATCH FILES /FILE=*
/FILE='DataSet2'
/BY HIVCLUST HIVNUMB HIVLINE.
EXECUTE.

Also here is a crosstabulation of my result:

Sex * Blood test result Crosstabulation
Count
Blood test result
Sex HIV negative HIV positive Total
Men 3455 419 3874
Women 4170 814 4984
Total 7625 1233 8858


Could you help me find out what is going wrong?

[Updated on: Wed, 19 August 2015 04:57]

Report message to a moderator

Re: Problems with merging Namibia 2013 IR MR and HIV data [message #8116 is a reply to message #7072] Tue, 25 August 2015 11:07 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1763
Registered: February 2013
Senior Member
Following is a response from Senior Data Processing Specialist, Ladys Ortiz:

In order for you to reproduce the numbers from the DHS report, you need to apply the HIV weights. The HIV weight variable is HIV05 and should be divided by 1 million before using it. There are 4,984 women unweighted and 4740 women weighted. See example below:

COMPUTE WT = HIV05 / 1000000.
WEIGHT BY WT.
FREQUENCIES HIV03.
Re: Problems with merging Namibia 2013 IR MR and HIV data [message #8127 is a reply to message #8116] Wed, 26 August 2015 12:29 Go to previous message
hannarekola is currently offline  hannarekola
Messages: 2
Registered: April 2015
Member
Thank you very much! This seems to have worked.
Previous Topic: Merging African countries and discrepancy between births and household file
Next Topic: Which data files can be merged one with another
Goto Forum:
  


Current Time: Sat Mar 28 19:56:22 Eastern Daylight Time 2020