The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Vaccination coverage using 2013 ndhs data set: Nigerian & dhs
Re: Vaccination coverage using 2013 ndhs data set: Nigerian & dhs [message #9715 is a reply to message #9705] Mon, 09 May 2016 21:20 Go to previous messageGo to previous message
owraza is currently offline  owraza
Messages: 36
Registered: December 2013
Location: Karachi, Pakistan
Member
There is a minor typo in what kjacob has written and running these line as it is, will produce error.

kjacob wrote on Mon, 09 May 2016 18:26
First generate the vaccinated ...

gen vaccination_status=.
replace vaccination_status=0 if (bcg_vac==0 & measles_vac==0)*****add the other vaccines and separate them using &
replace vaccination_status=1 if (bcg_vac==1 | measles_vac==1)*****add the other vaccines and separate them using |
replace vaccination_status=1 if (bcg_vac==1 & measles_vac==1)*****add the other vaccines and separate them using &

label define vaccination_status 0 "not vaccination" 1 "partial vaccination" 2 "full vaccination", modify
label values vaccination_status vaccination_status


Looking at third last line,

Quote:
replace vaccination_status=1 if ...

It should be written as:
replace vaccination_status = 2 if ...

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Measuring postnatal care for baby (M70)
Next Topic: Immunization
Goto Forum:
  


Current Time: Tue Apr 23 23:23:50 Coordinated Universal Time 2024