Thanks so much for the guidance. I sincerely appreciate.
I have replaced age with b19 as per the code below but I still can't replicate the results
use "${gsdDataRaw}/2022/DHS/KEKR8AFL.dta", clear
*** Breastfeeding and complemenatry feeding ***
//currently breastfed
gen nt_bf_curr= m4==95
label values nt_bf_curr yesno
label var nt_bf_curr "Currently breastfeeding - last-born under 2 years"
//breastfeeding status
gen water=0
gen liquids=0
gen milk=0
gen solids=0
*Child is given water
replace water=1 if (v409>=1 & v409<=7)
*Child given liquids
foreach xvar of varlist v409a v410 v410a v412c v413* {
replace liquids=1 if `xvar'>=1 & `xvar'<=7
}
*Given powder/tinned milk, formula, or fresh milk
foreach xvar of varlist v411 v411a {
replace milk=1 if `xvar'>=1 & `xvar'<=7
}
*Given any solid food
foreach xvar of varlist v414* {
replace solids=1 if `xvar'>=1 & `xvar'<=7
}
replace solids=1 if v412a==1 | v412b==1 | m39a==1
gen nt_bf_status=1
replace nt_bf_status=2 if water==1
replace nt_bf_status=3 if liquids==1
replace nt_bf_status=4 if milk==1
replace nt_bf_status=5 if solids==1
replace nt_bf_status=0 if nt_bf_curr==0
label define bf_status 0"not bf" 1"exclusively bf" 2"bf & plain water" 3"bf & non-milk liquids" 4"bf & other milk" 5"bf & complemenatry foods"
label values nt_bf_status bf_status
label var nt_bf_status "Breastfeeding status for last-born child under 2 years"
//exclusively breastfed
recode nt_bf_status (1=1) (else=0) if b19<6, gen(nt_ebf)
label values nt_ebf yesno
label var nt_ebf "Exclusively breastfed - last-born under 6 months"
ta nt_ebf [iw=v005] if b9==0