The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Dominican Republic 2007 child immunization
Re: Dominican Republic 2007 child immunization [message #8435 is a reply to message #6943] Tue, 27 October 2015 19:41 Go to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 789
Registered: January 2013
Senior Member
Try the following code:

use "drkr52fl.dta", clear

generate wgt = v005/1000000

gen bcg = inrange(h2,1,3)
gen polio0 = inrange(h0,1,3)
gen dpt = inrange(h3,1,3)+inrange(h5,1,3)+inrange(h7,1,3)
gen polio = inrange(h4,1,3)+inrange(h6,1,3)+inrange(h8,1,3)
gen pv = inrange(pv1,1,3)+inrange(pv2,1,3)+inrange(pv3,1,3)
gen ms = inrange(h9,1,3)
forvalues x = 1/3 {
  gen polio`x' = (polio>=`x')
  gen dpt`x' = (dpt>=`x')
  gen penta`x' = (pv>=`x')
}

gen vac = (bcg==1 & polio==3 & dpt==3 & ms==1)
label var vac "Received all vaccinations"
label define vac 1 "Yes" 0 "No", replace
label values vac vac

gen novac = (bcg==0 & polio==0 & dpt==0 & ms==0)
label var novac "Received no vaccinations"
label values novac vac

gen age = v008-b3

svyset v021 [pw=wgt], strata(v024) 
svy:mean bcg dpt1 dpt2 dpt3 penta1 penta2 penta3 polio0 polio1 polio2 polio3 ms vac novac if b5 == 1 & inrange(age,18,29)


In this code, there are a few things to note:
1) If you tabulate DPT and pentavalent you will see that all cases with pentavalent also have DPT, so you can ignore the pentavalent. Similarly all cases that are recorded on the SRT variable also have the measles vaccinaiton, so you can ignore the SRT variable.
2) We do not tabulate vaccines according to the individual vaccines, but according to the count of vaccines for DPT 1-3 and Polio 1-3
3) When I checked the report results, the results shown in the report for Sarampion/Tripe viral and for "Todas las vacunas" do not match the results in the final tabulations in our records. Instead we show Sarampion/Triple = 78.8% and Todas las vacunas = 57.9. When I run the code above, I match these latter results.
 
Read Message
Read Message
Previous Topic: Low Birth Weight
Next Topic: Age in months: Missing values
Goto Forum:
  


Current Time: Fri Apr 26 03:04:45 Coordinated Universal Time 2024