The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » DPT coverage in DHS Zambia 2007 using Births Recode
DPT coverage in DHS Zambia 2007 using Births Recode [message #12435] Wed, 17 May 2017 07:58 Go to next message
ychin3y is currently offline  ychin3y
Messages: 3
Registered: May 2017
Member
I am looking at DPT coverage using Births Recode of DHS Zambia 2007.
The final report says very high coverage. For example, 92.3% of children aged 12 and 23 months received the first dose of DPT (Table 10.2).
But when I tabulate variable "h3" (DPT1), about 73.93% of children aged 12 and 23 months did not receive DPT1.
I attached the table and my commands. I did not use weights.
Are there errors in the data or am I doing something wrong?

use zmbr51fl.dta,clear
gen hypage=(v008-b3)/12
keep if hypage>=1 & hypage<2
tab h3

received dpt 1 | Freq. Percent Cum.
---------------------+-----------------------------------
no | 936 73.93 73.93
vacc. date on card | 106 8.37 82.31
reported by mother | 217 17.14 99.45
vacc. marked on card | 6 0.47 99.92
9 | 1 0.08 100.00
---------------------+-----------------------------------
Total | 1,266 100.00





Re: DPT coverage in DHS Zambia 2007 using Births Recode [message #12436 is a reply to message #12435] Wed, 17 May 2017 10:07 Go to previous messageGo to next message
Mlue
Messages: 92
Registered: February 2017
Location: North West
Senior Member
Hello ychin3y,

Please see example attached below, using Ethiopia DHS of 2011.

I used ETBR61FL.DTA dataset

**** I used Stata for the data analysis



** ||| IMMUNIZATION OF CHILDREN AGED 12-23 MONTHS (ETHIOPIA)

** 2011 DHS **

clear all
set mem 1g
set more off

***************************************************************************
** WEIGHT VARIABLE
gen weight = v005/1000000

**************************

** SURVEY SET
gen psu =    v021
gen strata = v022
svyset psu [pw = weight], strata(strata)

**************************************************************************

// RENAME

rename v013 age
rename v106 education
rename v190 wealth
rename v025 residence
rename v024 region

///////////////////////////////////////////////////////////////////////////

** Child_age = 12-23 months old
gen months = v008 - b3
keep if b5 == 1 & months >= 12 & months <=23

gen child_age = months
replace child_age = 1 if b5 == 1 & months >= 12 & months <=13
replace child_age = 2 if b5 == 1 & months >= 14 & months <=15
replace child_age = 3 if b5 == 1 & months >= 16 & months <=17
replace child_age = 4 if b5 == 1 & months >= 18 & months <=19
replace child_age = 5 if b5 == 1 & months >= 20 & months <=21
replace child_age = 6 if b5 == 1 & months >= 22 & months <=23
label define child_age 1"12-13" 2"14-15" 3"16-17" 4"18-19" 5"20-21" 6"22-23"
label var child_age "Child age in months"
label val child_age child_age

** Recode of vaccination variables

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) /* Not available in Sierra Leone 2013 data */

gen ms		=	inrange(h9,1,3)

forvalues x = 1/3 {
gen Polio`x'	=	(Polio>=`x')
gen DPT`x'		=	(DPT>=`x')

}
**

** ========================================================================== **
** DEPENDENT VARIABLE
gen vaccination	=	(BCG==1 & Polio==3 & DPT==3 & ms==1)
label var vaccination "Received all vaccinations"
label define vaccination 0"No" 1"Yes"
label values vaccination vaccination

** All basic vaccinations
tab vaccination [iw = weight]	/* Total weighted sample = 2 169 */
tab vaccination					/* Total unweighted sample = 2 090 */
svy: tab vaccination, count percent format(%4.0f) col

** ========================================================================== **

** DROP IF NOT WITHIN SAMPLE
qui regr DPT if v208 >0 & v208 !=. [pw=weight]		
drop if e(sample)!=1	

********************************************************************************

** BIRTH ORDER
gen birth_order1		= 	bord
replace birth_order1	=	bord-1 if b0 == 2
replace birth_order1	=	bord-2 if b0 == 3

recode birth_order1 (1=1 "1") (2/3=2 "2-3") (4/5=3 "4-5") ///
(6/20=4 "6+"), gen(birth_order)
label var birth_order "Birth order"
label values birth_order birth_order

** ========================================================================== **

****** ANALYSIS *****

* Table 10.2
label define DPT1 0"No" 1"Yes"
label define DPT2 0"No" 1"Yes"
label define DPT3 0"No" 1"Yes"

label val DPT1 DPT1
label val DPT2 DPT2
label val DPT3 DPT3

svy: tab DPT1, percent format(%4.1f) col
svy: tab DPT2, percent format(%4.1f) col
svy: tab DPT3, percent format(%4.1f) col

** ========================================================================== **


**** Table 10.3 Vaccinations by background characteristics - for DPT1

** FOR DPT1

** Sex
svy: tab b4 DPT1, count format(%4.0f)
svy: tab b4 DPT1, percent format(%4.1f) row

** Birth order
svy: tab birth_order DPT1, count format(%4.0f)
svy: tab birth_order DPT1, percent format(%4.1f) row

** Wealth quintile
svy: tab wealth DPT1, count format(%4.0f)
svy: tab wealth DPT1, percent format(%4.1f) row

////////////////////////////

**** Table 10.3 Vaccinations by background characteristics - for DPT2

** FOR DPT2

** Sex
svy: tab b4 DPT2, percent format(%4.1f) row

** Birth order
svy: tab birth_order DPT2, percent format(%4.1f) row

** Wealth quintile
svy: tab wealth DPT2, percent format(%4.1f) row

* ====================== *

**** Table 10.3 Vaccinations by background characteristics - for DPT3

** FOR DPT3

** Sex
svy: tab b4 DPT3, percent format(%4.1f) row

** Birth order
svy: tab birth_order DPT3, percent format(%4.1f) row

** Wealth quintile
svy: tab wealth DPT3, percent format(%4.1f) row

** ========================================================================== **


*** FOR ALL VACCINATIONS

svy: tab child_age vaccination, count format(%4.0f)

svy: tab b4 vaccination, count format(%4.0f)

svy: tab birth_order vaccination, count format(%4.0f)

svy: tab residence vaccination, count format(%4.0f)

svy: tab region vaccination, count format(%4.0f)

svy: tab wealth vaccination, count format(%4.0f)


** ======================= **

*** Percentages / Coverage = All basic vaccinations

svy: tab child_age vaccination, percent format(%4.1f) row

svy: tab b4 vaccination, percent format(%4.1f) row

svy: tab birth_order vaccination, percent format(%4.1f) row miss 

svy: tab residence vaccination, percent format(%4.1f) row

svy: tab region vaccination, percent format(%4.1f) row

svy: tab wealth vaccination, percent format(%4.1f) row


** ========================================================================== **

exit

[Updated on: Wed, 17 May 2017 10:09]

Report message to a moderator

Re: DPT coverage in DHS Zambia 2007 using Births Recode [message #12437 is a reply to message #12436] Wed, 17 May 2017 11:12 Go to previous messageGo to next message
ychin3y is currently offline  ychin3y
Messages: 3
Registered: May 2017
Member
Mlue

Thanks very much for sharing your code.
I ran your code, but it still shows that only 26.1% of children aged 12 and 23 received the first dose of DPT and 73.1% did not receive it. (I attached the result)
My concern is that this is a totally different result from the final report. The report says 92.1% received it.
I also tried it with individual recode (zmir51fl.dta) using a slightly different coding, but the result is the same.
I wonder whether there are errors in the data.


. svy: tab DPT1, percent format(%4.1f) col
(running tabulate on estimation sample)

Number of strata = 18 Number of obs = 1,266
Number of PSUs = 302 Population size = 1,272.2038
Design df = 284

----------------------
DPT1 | column
----------+-----------
No | 73.9
Yes | 26.1
|
Total | 100.0
----------------------
Key: column = column percentage

[Updated on: Wed, 17 May 2017 12:37]

Report message to a moderator

Re: DPT coverage in DHS Zambia 2007 using Births Recode [message #12479 is a reply to message #12437] Thu, 25 May 2017 06:01 Go to previous messageGo to next message
Mlue
Messages: 92
Registered: February 2017
Location: North West
Senior Member
Hello ychin3y,

I sorted out the the code ... Now you should be getting the same results as in the report

See code below for Zambia DHS 2007 - ZMBR51FL




** ||| IMMUNIZATION OF CHILDREN AGED 12-23 MONTHS (ZAMBIA)

** 2007 DHS **

***************************************************************************
** WEIGHT VARIABLE
gen weight = v005/1000000

**************************

** SURVEY SET
gen psu =    v021
gen strata = v023
svyset psu [pw = weight], strata(strata)

**************************************************************************

// RENAME

rename v013 age
rename v106 education
rename v190 wealth
rename v025 residence
rename v024 region

///////////////////////////////////////////////////////////////////////////

** Child_age = 12-23 months old
gen months = v008 - b3
keep if b5 == 1 & months >= 12 & months <=23

gen child_age = months
replace child_age = 1 if b5 == 1 & months >= 12 & months <=13
replace child_age = 2 if b5 == 1 & months >= 14 & months <=15
replace child_age = 3 if b5 == 1 & months >= 16 & months <=17
replace child_age = 4 if b5 == 1 & months >= 18 & months <=19
replace child_age = 5 if b5 == 1 & months >= 20 & months <=21
replace child_age = 6 if b5 == 1 & months >= 22 & months <=23
label define child_age 1"12-13" 2"14-15" 3"16-17" 4"18-19" 5"20-21" 6"22-23"
label var child_age "Child age in months"
label val child_age child_age


** Recode of vaccination variables

gen	BCG	=	inrange(h2,1,3)

gen Polio0	=	inrange(h0,1,3)

gen DPT		=	(inrange(h3,1,3) | inrange(sdhh1,1,3))+(inrange(h5,1,3) | inrange(sdhh2,1,3))+(inrange(h7,1,3) | inrange(sdhh3,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) /* Not available in Sierra Leone 2013 data */

gen ms		=	inrange(h9,1,3)

forvalues x = 1/3 {
gen Polio`x'	=	(Polio>=`x')
gen DPT`x'		=	(DPT>=`x')
/*gen Penta`c'	=	(pv>=`x')*/
}
**

** ========================================================================== **
** DEPENDENT VARIABLE
gen vaccination	=	(BCG==1 & Polio==3 & DPT==3 & ms==1)
label var vaccination "Received all vaccinations"
label define vaccination 0"No" 1"Yes"
label values vaccination vaccination

** All basic vaccinations
tab vaccination [iw = weight]	
tab vaccination					 
svy: tab vaccination, count percent format(%4.1f) col

** ========================================================================== **

** DROP IF NOT WITHIN SAMPLE
qui regr vaccination if v208 >0 & v208 !=. [pw=weight]		
drop if e(sample)!=1	

********************************************************************************

** BIRTH ORDER
gen birth_order1	= 	bord
replace birth_order1	=	bord-1 if b0 == 2
replace birth_order1	=	bord-2 if b0 == 3

recode birth_order1 (1=1 "1") (2/3=2 "2-3") (4/5=3 "4-5") ///
(6/20=4 "6+"), gen(birth_order)
label var birth_order "Birth order"
label values birth_order birth_order

** ========================================================================== **

****** ANALYSIS *****

* Table 10.2
label define DPT1 0"No" 1"Yes"
label define DPT2 0"No" 1"Yes"
label define DPT3 0"No" 1"Yes"

label val DPT1 DPT1
label val DPT2 DPT2
label val DPT3 DPT3

svy: tab DPT1, percent format(%4.1f) col
svy: tab DPT2, percent format(%4.1f) col
svy: tab DPT3, percent format(%4.1f) col

*****
* Selected characteristics on Table 10.3

* DPT1
svy: tab child_age DPT1, percent format(%4.1f) row
svy: tab b4 DPT1, percent format(%4.1f) row

* DPT2
svy: tab child_age DPT2, percent format(%4.1f) row
svy: tab b4 DPT2, percent format(%4.1f) row

* DPT3
svy: tab child_age DPT3, percent format(%4.1f) row
svy: tab b4 DPT3, percent format(%4.1f) row

* All vaccinations
svy: tab child_age vaccination, percent format(%4.1f) row
svy: tab b4 vaccination, percent format(%4.1f) row
svy: tab education vaccination, percent format(%4.1f) row
svy: tab wealth vaccination, percent format(%4.1f) row

exit

Re: DPT coverage in DHS Zambia 2007 using Births Recode [message #12480 is a reply to message #12479] Thu, 25 May 2017 19:37 Go to previous messageGo to next message
ychin3y is currently offline  ychin3y
Messages: 3
Registered: May 2017
Member
Mlue:

So, the key is sdhh1~3 for DPT.
That solves the mystery.
Thanks so much!
I appreciate it.
Re: DPT coverage in DHS Zambia 2007 using Births Recode [message #12481 is a reply to message #12480] Fri, 26 May 2017 02:06 Go to previous message
Mlue
Messages: 92
Registered: February 2017
Location: North West
Senior Member
Glad I could help
Previous Topic: Vaccinated by 12 months of age
Next Topic: SPSS syntax Infant and Child Mortality NDHS
Goto Forum:
  


Current Time: Sun Dec 8 10:16:25 Coordinated Universal Time 2024