The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Basic Vaccination and Nutritional Status STATA HELP
Re: Basic Vaccination and Nutritional Status STATA HELP [message #21765 is a reply to message #20107] Wed, 16 December 2020 02:54 Go to previous message
summera is currently offline  summera
Messages: 1
Registered: September 2020
Member


That might be help full to you.
(vaccination)
gen dpt=0

. replace dpt=1 if h3>0 & h3<8 & h5>0 & h5<8 & h7>0 & h7<8
(4210 real changes made)

. replace dpt=. if age<12 | age>23 | b5==0
(48164 real changes made, 48164 to missing)

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

. replace measles = . if age<12 | age>23 | b5==0
(48164 real changes made, 48164 to missing)

. gen polio=0

. replace polio=1 if h4>0 & h4<8 & h6>0 & h6<8 & h8>0 & h8<8
(5126 real changes made)

. replace polio = . if age<12 | age>23 | b5==0
(48164 real changes made, 48164 to missing)

. gen bcg=0

. replace bcg=1 if h2>0 & h2<8
(5771 real changes made)

. replace bcg = . if age<12 | age>23 | b5==0
(48164 real changes made, 48164 to missing)

. gen vaccine=0

. replace vaccine=1 if polio==1 & dpt==1 & measles==1 & bcg==1
(1410 real changes made)

. replace vaccine = . if age<12 | age>23 | b5==0
(48164 real changes made, 48164 to missing)
 
Read Message
Read Message
Read Message
Previous Topic: Support for Education among child 36-59 month
Next Topic: No. of U5 in HH coded "0" ?.
Goto Forum:
  


Current Time: Thu Apr 18 15:39:54 Coordinated Universal Time 2024