The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Wealth Index » Problem with recreating Asset quintiles
Re: Problem with recreating Asset quintiles [message #24626 is a reply to message #24620] Thu, 09 June 2022 08:36 Go to previous messageGo to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 893
Registered: April 2022
Senior Member
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

Here is the Stata code to construct wealth quintiles as "hv270_test", which you can compare with hv270. This can be applied to any HR file. (HR, not PR.) It should be easy enough to translate into R.

use "xxHRxxFL.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_test=hv271 [pweight=pwt], nquantiles(5)
tab hv270 hv270_test [iweight=wt]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: sub-national wealth quintiles in STATcompiler
Next Topic: Not positive definite correlation matrix
Goto Forum:
  


Current Time: Fri Nov 29 23:38:56 Coordinated Universal Time 2024