I'm wondering if you have a problem with the way v190 is merged into your dataset. The copy of the dataset I have here does not include v190, but instead it needs to be merged from a file of wealth quintiles. Here is my code:
* Merge the wealth index into the dataset
use "C:\Data\DHS_Stata\UGKR41FL.DTA", clear
gen whhid = substr(caseid,1,12)
merge m:1 whhid using "C:\Data\DHS_Stata\UGWI41FL.dta"
keep if _merge==3
clonevar v190=wlthind5
* generate a weight variable and tabulate as in the table
gen wt=v005/1000000
* treat the few missing cases as No for doctor
replace m3a = 0 if m3a == .
* tabulate
tab v190 m3a [iw=wt],m row
* now using svy:prop, taking stratification into account
egen stratum=group(v024 v025)
svyset v021 [pweight=wt], strata(stratum)
svy:prop m3a, over(v190)
The tab and svy:prop command produce results that match the table in the report.
[Updated on: Wed, 23 November 2016 18:34]
Report message to a moderator