Hi,
I am trying to replicate in the column "Percentage given vitamin A supplements in last 6 months" in Table 11.12 using the code below taken from DHS GitHub repository
use "$KEKR8AFL.dta", clear
**** child's age ****
gen age = v008 - b3
//Received Vit. A supplements
recode h33m (98=.), gen(h33m2)
recode h33d (98=15), gen(h33d2)
recode h33y (9998=.), gen(h33y2)
*gen nt_ch_micro_vas= h34==1 | (int((v008a - (mdy(h33m2,h33d2,h33y2) + 21916) )/30.4375) < 6)
gen nt_ch_micro_vas= h34==1 | (int((mdy(v006,v016,v007) - mdy(h33m2,h33d2,h33y2) )/30.4375) < 6)
replace nt_ch_micro_vas=. if !inrange(age,6,59) | b5==0
label values nt_ch_micro_vas yesno
label var nt_ch_micro_vas "Children age 6-59 mos given Vit. A supplements"
with no success. Any help will be greatly appreciated.