The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Questions about weighting when using merged data sets
Questions about weighting when using merged data sets [message #79] Wed, 20 February 2013 12:07 Go to next message
DHS user is currently offline  DHS user
Messages: 111
Registered: February 2013
Senior Member
I am trying to merge the HIV test and Household members data. I am confused as to how to apply the weights--which are different for the different data sets--to dichotomous variables, when comparing HIV occurrence from one data set with another variable (wealth index or anemia level are examples) from the other data set.
Re: Questions about weighting when using merged data sets [message #80 is a reply to message #79] Wed, 20 February 2013 12:10 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3017
Registered: February 2013
Senior Member
Here is a response from one of our STATA experts Tom Pullum, that should answer your question.

I will insert some lines that show the correct way to do the merge.  I assume you are using Stata.  I am using the "old" version of the merge syntax, which I prefer.  Merges are always done with cluster number, household number, and line number.

* use the AR file

ren hivclust hv001
ren hivnumb hv002
ren hivline hv003
sort hv001 hv002 hv003
save ARtemp.dta, replace

* use the PR file

sort hv001 hv002 hv003

merge hv001 hv002 hv003 using ARtemp.dta
tab _merge
keep if _merge==3
drop _merge

* the correct weight variable will now be hiv05

The general rule about which weight to use is that hiv05 takes precedence over hv005 or v005 or mv005.   If your file includes hiv05, that would be the correct weight.

The wealth index, hv270, is already coded with numbers 1 through 5.  If you enter "tab hv270" you will see the labels, not the codes.  If you enter "tab hv270, nolabel", you will see the codes.  For more on the syntax of labels, enter "help label".

I hope this helps.

Bridgette-DHS

[Updated on: Mon, 18 March 2013 09:07]

Report message to a moderator

Next Topic: Domestic Violence Weighting
Goto Forum:
  


Current Time: Fri Mar 29 03:34:41 Coordinated Universal Time 2024