Re: 2011 wealth class data on access to electricity in Benin Burundi Cote d'Ivoire Ethiopia and Cambodia [message #30111 is a reply to message #30075] |
Tue, 24 September 2024 20:55 |
Janet-DHS
Messages: 888 Registered: April 2022
|
Senior Member |
|
|
Following is a response from DHS staff member, Tom Pullum:
I think there may be a problem with the way you are constructing the 20 wealth categories. I see that in Benin 2011, for example, the continuous wealth distribution (hv271) is very skewed, and that may be carrying over into your categorization.
Here are Stata lines that will approximately reproduce the standard quintiles (5 categories), illustrated with a Nigeria survey:
* SIMPLE STATA CODE TO CONSTRUCT WEALTH QUINTILES THAT ALMOST MATCH DHS
set more off
use "...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]
I say "approximately" because DHS has a way of handling ties that is difficult to reproduce exactly.
To get 20 categories, use "nquantiles(20)". You will have to alter for packages other than Stata.
I use the HR file because units are households. However, the goal is to equalize the number of de jure household members who are in each category. The categories produced in the HR file can be copied into the PR file, etc.
I have not checked whether this will solve your issue. Let us know if it does not.
|
|
|