Re: Using separate wealth index [message #26941 is a reply to message #26923] |
Tue, 30 May 2023 16:02 |
Bridgette-DHS
Messages: 3214 Registered: February 2013
|
Senior Member |
|
|
Following is a response from DHS staff member, Tom Pullum:
At the bottom of this response, I will give lines to construct the wealth quintiles from the continuous wealth index. It is set up for a Nigeria survey--change the input file name for the Ethiopia 2016 survey or another survey. This program runs on the HR file. The quintiles are the same for everyone in the household, so when you have them in the HR file you can transfer them to the PR file by merging with hv001 hv002 or to the IR/BR/KR files by merging with v001 v002 or to the MR file by merging with mv001 mv002.
To construct wealth deciles you would use 10 instead of 5 in the "xtile" line.
You can read more about the urban/rural version of the wealth index in working paper 60 by Shea Rutstein: https://dhsprogram.com/pubs/pdf/wp60/wp60.pdf.
If you have hv271 and want to construct hv271a, the following lines will approximately accomplish this, using the PR file. The last line only works if hv271a is already in the data, and for such a file it confirms that the procedure returns a variable that is almost perfectly correlated with hv271a. It does not have the same mean and standard deviation as the official version of hv271a but it will produce the same quintiles.
summarize hv271 if hv025==1 [iweight=hv005/1000000]
scalar mean1=r(mean)
scalar sd1=r(sd)
summarize hv271 if hv025==2 [iweight=hv005/1000000]
scalar mean2=r(mean)
scalar sd2=r(sd)
gen hv271a_test=(hv271-mean1)/sd1 if hv025==1
replace hv271a_test=(hv271-mean2)/sd2 if hv025==2
correlate hv271a_test hv271a
The easiest way to do the urban/rural versions of the quintiles, hv270a, once you have hv271, would be to replace the "xtile" line with these two lines:
xtile hv270_urban=hv271a if hv025==1 [pweight=pwt], nquantiles(5)
xtile hv270_rural=hv271a if hv025==2 [pweight=pwt], nquantiles(5)
For checking, you will get very close to a uniform distribution of quintiles within categories of hv025 if you enter the following line in the PR file:
tab hv270a hv025 [iweight=hv005/1000000] if hv102==1
I have to mention that in some surveys the commands given above and the routine given below will not exactly match the DHS wealth quintiles. I personally would not worry about that. I don't have a program to deal with those exceptions. It is often difficult, using the standard recode files, to reproduce exactly some of the variables calculated during the original data processing.
If you want to include the urban/rural version in a regression in Stata, just put i.hv270a, or i.v190a, on the right hand side of the regression. I would recommend always including hv025 or v025 whenever you include hv270a or v190a. (You don't need "i." with a variable that has only two categories.)
Here is the basic procedure to get the quintiles from the continuous index:
* Need a path to a workspace folder
cd e:\DHS\programs\WEALTH
* SIMPLE STATA CODE TO CONSTRUCT WEALTH QUINTILES THAT ALMOST MATCH DHS
set more off
use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\NGHR7AFL.DTA" , clear
keep hv001 hv002 hv005 hv012 hv013 hv270 hv271
gen mem = hv012
replace mem = hv013 if mem == 0
gen pwt=mem*hv005
gen wt=pwt/1000000
xtile hv270_test1=hv271 [pweight=pwt], nquantiles(5)
tab hv270 hv270_test1 [iweight=wt]
[Updated on: Tue, 30 May 2023 16:05] Report message to a moderator
|
|
|