Home » Countries » Kenya » KDHS 2022 : Table 11.13.1 Nutritional status of women age 2049
KDHS 2022 : Table 11.13.1 Nutritional status of women age 2049 [message #28293] |
Sun, 10 December 2023 03:43 |
sokiya
Messages: 78 Registered: May 2017 Location: Nairobi
|
Senior Member |
|
|
I am trying to replicate Table 11.13.1 Nutritional status of women age 2049 using the code below that I extracted from the DHS GitHub repo
use "KEIR8AFL.dta", clear
cap label define yesno 0"No" 1"Yes"
gen wt=v005/1000000
*** Anemia indicators ***
//Any anemia
gen nt_wm_any_anem=0 if v042==1 & v455==0
replace nt_wm_any_anem=1 if v457<4
label values nt_wm_any_anem yesno
label var nt_wm_any_anem "Any anemia - women"
//Mild anemia
gen nt_wm_mild_anem=0 if v042==1 & v455==0
replace nt_wm_mild_anem=1 if v457==3
label values nt_wm_mild_anem yesno
label var nt_wm_mild_anem "Mild anemia - women"
//Moderate anemia
gen nt_wm_mod_anem=0 if v042==1 & v455==0
replace nt_wm_mod_anem=1 if v457==2
label values nt_wm_mod_anem yesno
label var nt_wm_mod_anem "Moderate anemia - women"
//Severe anemia
gen nt_wm_sev_anem=0 if v042==1 & v455==0
replace nt_wm_sev_anem=1 if v457==1
label values nt_wm_sev_anem yesno
label var nt_wm_sev_anem "Severe anemia - women"
*** Anthropometry indicators ***
* age of most recent child
gen age = v008 - b3_01
* to check if survey has b19, which should be used instead to compute age.
scalar b19_included=1
capture confirm numeric variable b19_01, exact
if _rc>0 {
* b19 is not present
scalar b19_included=0
}
if _rc==0 {
* b19 is present; check for values
summarize b19_01
if r(sd)==0 | r(sd)==. {
scalar b19_included=0
}
}
if b19_included==1 {
drop age
gen age=b19_01
}
//Height less than 145cm
gen nt_wm_ht= v438<1450 if inrange(v438,1300,2200)
label values nt_wm_ht yesno
label var nt_wm_ht "Height under 145cm - women"
//Mean BMI
gen bmi=v445/100
summarize bmi if inrange(bmi,12,60) & (v213!=1 & (v208==0 | age>=2)) [iw=wt]
gen nt_wm_bmi_mean=round(r(mean),0.1)
label var nt_wm_bmi_mean "Mean BMI - women"
//Normal weight
gen nt_wm_norm= inrange(v445,1850,2499) if inrange(v445,1200,6000)
replace nt_wm_norm=. if (v213==1 | age<2)
label values nt_wm_norm yesno
label var nt_wm_norm "Normal BMI - women"
//Thin
gen nt_wm_thin= inrange(v445,1200,1849) if inrange(v445,1200,6000)
replace nt_wm_thin=. if (v213==1 | age<2)
label values nt_wm_thin yesno
label var nt_wm_thin "Thin BMI - women"
//Mildly thin
gen nt_wm_mthin= inrange(v445,1700,1849) if inrange(v445,1200,6000)
replace nt_wm_mthin=. if (v213==1 | age<2)
label values nt_wm_mthin yesno
label var nt_wm_mthin "Mildly thin BMI - women"
//Moderately and severely thin
gen nt_wm_modsevthin= inrange(v445,1200,1699) if inrange(v445,1200,6000)
replace nt_wm_modsevthin=. if (v213==1 | age<2)
label values nt_wm_modsevthin yesno
label var nt_wm_modsevthin "Moderately and severely thin BMI - women"
//Overweight or obese
gen nt_wm_ovobese= inrange(v445,2500,6000) if inrange(v445,1200,6000)
replace nt_wm_ovobese=. if (v213==1 | age<2)
label values nt_wm_ovobese yesno
label var nt_wm_ovobese "Overweight or obese BMI - women"
//Overweight
gen nt_wm_ovwt= inrange(v445,2500,2999) if inrange(v445,1200,6000)
replace nt_wm_ovwt=. if (v213==1 | age<2)
label values nt_wm_ovwt yesno
label var nt_wm_ovwt "Overweight BMI - women"
//Obese
gen nt_wm_obese= inrange(v445,3000,6000) if inrange(v445,1200,6000)
replace nt_wm_obese=. if (v213==1 | age<2)
label values nt_wm_obese yesno
label var nt_wm_obese "Obese BMI - women"
tabstat nt_wm_ht nt_wm_bmi_mean nt_wm_norm nt_wm_thin nt_wm_mthin nt_wm_modsevthin nt_wm_ovobese nt_wm_ovwt nt_wm_obese [fw=wt] if inrange(age, 20, 49) & sshort == 0, statistics(mean) save
but the results are not matching. Any help will be appreciated.
|
|
|
Goto Forum:
Current Time: Fri Nov 22 19:59:36 Coordinated Universal Time 2024
|