Re: KDHS 2022 : Table 11.13.1 Nutritional status of women age 2049 [message #28327 is a reply to message #28293] |
Thu, 14 December 2023 13:56 |
Bridgette-DHS
Messages: 3199 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS staff member, Tom Pullum:
The following Stata lines will match table 11.13.1 exactly. I just include the results for the wealth quintiles and the total.
To get the match I had to express the ranges a little differently than in the table headings. Note that it is necessary to omit women who had a birth in the past two months or are pregnant from the BMI indicator.
For tabstat you need to use fweights. You can avoid the use of tabstat, but I think it's a nice command and it is under-used. It is used in the GitHub version.
Something I had never encountered before, and that I only figured out by trial and error, is that for "short", i.e. height less than 145 cm, to get a match you must drop the 5 shortest women in the sample. Apparently a lower plausible bound for height was enforced--but no upper bound. As I said, I have never seen this before and I don't know whether it is done for other tables on anthropometry in this survey or is done for other surveys.
use "...KEIR8BFL.DTA" , clear
gen ht=v438/10 if v438<9994
gen short=0 if ht<.
replace short=100 if ht<145
gen bmi=v445/100 if v445<9998
replace bmi=. if b19_01<2 | v213==1
foreach lv in normal totalthin mildlythin modsevthin overwtobese overwt obese {
gen bmi_`lv'=0 if bmi<.
}
replace bmi_normal =100 if bmi>=18.5 & bmi<25
replace bmi_totalthin =100 if bmi<18.5
replace bmi_mildlythin =100 if bmi>=17.0 & bmi<18.5
replace bmi_modsevthin =100 if bmi<17.0
replace bmi_overwtobese=100 if bmi>=25.0 & bmi<.
replace bmi_overwt =100 if bmi>=25.0 & bmi<30.0
replace bmi_obese =100 if bmi>=30.0 & bmi<.
tabstat bmi* [fweight=v005] if v013>1, statistics(mean) by(v190)
tab v190 if v013>1 & bmi<. [iweight=v005/1000000]
* to match the table for "short" we must drop the 6 shortest women!
sort ht
tabstat short [fweight=v005] if v013>1 & _n>6, statistics(mean) by(v190)
tab v190 if v013>1 & short<. & _n>6 [iweight=v005/1000000]
|
|
|