Please, I have worked on a study which the outcome was age-appropriate vaccination. I have consulted this forum widely and also the DHS site below

https://dhsprogram.com/data/Guide-to-DHS-Statistics/Vaccinat ion.htm

The codes I used are written below. However, there has been back and forth comments if the codes are correct to derive age-appropriate vaccination, rather it seems the codes are for complete vaccination.

Please is the below code correct for age-appropriate vaccination? or is it for complete vaccination? If my codes are wrong, then what is the right way to get age-appropriate vaccination, and if codes are correct, how do I derive complete vaccination. This clarification is highly needed to conclude this multi-country study.

KINDLY ASSIST.

Thank you all.

gen bcg=0

replace bcg=1 if h2>0 & h2<8

replace bcg=. if hw1<12 | hw1>23

gen dpt=0

replace dpt=1 if h3>0 & h3<8 & h5>0 & h5<8 & h7>0 & h7<8

replace dpt=. if hw1<12 | hw1>23

gen measles=(h9==1|h9==2|h9==3)

replace measles = . if hw1<12 | hw1>23

gen polio=0

replace polio=1 if h4>0 & h4<8 & h6>0 & h6<8 & h8>0 & h8<8

replace polio = . if hw1<12 | hw1>23

gen vaccine=0

replace vaccine=1 if polio==1 & dpt==1 & measles==1 & bcg==1

replace vaccine= . if hw1<12 | hw1>23

]]>