The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » BMI indicator in KR File (clarification on DHS GitHub code)
BMI indicator in KR File [message #29181] Sun, 05 May 2024 07:01 Go to previous message
Noyel Sebastian is currently offline  Noyel Sebastian
Messages: 9
Registered: March 2024
Member
I was trying to calculate the BMI of the mother from the KR file of NFHS using this code. NFHS 5's KR file does not have b3_01, and the code breaks. What change should I make to run the command and get the mother's BMI indicator in the KR file?

*** 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"


Thank You
 
Read Message
Read Message
Previous Topic: HAZ,WHZ,WAZ Scores from NFHS IR File
Next Topic: Nutrition of children & adults
Goto Forum:
  


Current Time: Tue Jul 23 02:17:40 Coordinated Universal Time 2024