Home » Topics » Child Health » Child immunization (Child immunization for Nigeria)
Child immunization [message #20123] |
Sun, 27 September 2020 19:14 |
Ugonna
Messages: 26 Registered: June 2020
|
Member |
|
|
Hello everyone.
I am working with Stata where I'm trying to combine the different variables on child vaccination into one variable that will show that a child received all the basic vaccines, but the result I'm getting for Nigeria is different from what is on the report.
Here is my code:
gen vacn=bcg&dpt1&dpt2&dpt3&polio1&polio2&am p;polio3&measles
tab vacn [iw=wt]
label values vacn yesno
label var vacn "child received basic vaccination"
tab vacn [iw=wt]
I don't know what I am doing wrong.
Can someone help me please?
Thank you
|
|
|
|
Re: Child immunization [message #20325 is a reply to message #20134] |
Thu, 22 October 2020 17:46 |
Ugonna
Messages: 26 Registered: June 2020
|
Member |
|
|
Hello Shireen,
Thank you for your response.
I have tried running the codes from your github page, but I got a much higher rate than what is on the NDHS report.
See the code I ran below
//***DHS user forum codes***//
*** BCG ***
//BCG either source
recode h2 (0 8=0) (else=1), gen(ch_bcg_either)
tab ch_bcg_either [iw=wt]
label var ch_bcg_either "BCG vaccination according to either source"
*** Pentavalent ***
//DPT 1, 2, 3 either source
recode h3 (0 8=0) (else=1), gen(dpt_1)
recode h5 (0 8=0) (else=1), gen(dpt_2)
recode h7 (0 8=0) (else=1), gen(dpt_3)
gen dptsum= dpt_1+dpt_2+dpt_3
tab dptsum
* this step is performed for multi-dose vaccines to take care of any gaps in the vaccination history. See DHS guide to statistics
* for further explanation
gen ch_dpt1_either=dptsum>=1
label var ch_dpt1_either "Pentavalent 1st dose vaccination according to either source"
gen ch_dpt2_either=dptsum>=2
label var ch_dpt2_either "Pentavalent 2nd dose vaccination according to either source"
gen ch_dpt3_either=dptsum>=3
label var ch_dpt3_either "Pentavalent 3rd dose vaccination according to either source"
drop dpt_1 dpt_2 dpt_3 dptsum
*** Polio ***
//polio 0, 1, 2, 3 either source
recode h0 (0 8=0) (else=1), gen(ch_polio0_either)
label var ch_polio0_either "Polio at birth vaccination according to either source"
recode h4 (0 8=0) (else=1), gen(polio_1)
recode h6 (0 8=0) (else=1), gen(polio_2)
recode h8 (0 8=0) (else=1), gen(polio_3)
gen poliosum=polio_1 + polio_2 + polio_3
tab poliosum
* this step is performed for multi-dose vaccines to take care of any gaps in the vaccination history. See DHS guide to statistics
* for further explanation
gen ch_polio1_either=poliosum>=1
label var ch_polio1_either "Polio 1st dose vaccination according to either source"
gen ch_polio2_either=poliosum>=2
label var ch_polio2_either "Polio 2nd dose vaccination according to either source"
gen ch_polio3_either=poliosum>=3
label var ch_polio3_either "Polio 3rd dose vaccination according to either source"
drop poliosum polio_1 polio_2 polio_3
*** Measles ***
//measles either source
recode h9 (0 8=0) (else=1), gen(ch_meas_either)
label var ch_meas_either "Measles vaccination according to either source"
*** All vaccinations ***
gen ch_allvac_either=ch_bcg_either==1&ch_dpt3_either==1& ch_polio3_either==1&ch_meas_either==1
label var ch_allvac_either "All basic vaccinations according to either source"
tab ch_allvac_either [iw=wt]
***2008 NDHS report gives 22.7% while the output here is 27.7%***
Please what could be wrong?
Thank you.
|
|
|
|
Re: Child immunization [message #20336 is a reply to message #20325] |
Fri, 23 October 2020 22:25 |
Mlue
Messages: 92 Registered: February 2017 Location: North West
|
Senior Member |
|
|
Hello Ugonna & Shireen,
Check this code out. It should work.
-------------------------
** ALL BASIC VACCINATIONS: NDHS 2008 **
** ========================================================================== **
********************************* M. Tsawe, PhD *********************************
************************ Last modified: 24 October 2020 ************************
** ========================================================================== **
clear all
set maxvar 20000
set mem 1g
cd "C:\Users\...\NGKR53DT"
use "NGKR53FL", clear
set more off
** ========================================================================== **
** WEIGHT VARIABLE
gen weight = v005/1000000
** ========================================================================== **
** SURVEY SET
gen psu = v021
gen strata = v023
svyset psu [pw = weight], strata(strata) vce(linearized) singleunit(scaled)
*svydes
** ========================================================================== **
// 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
svy:tab child_age, percent format (%4.1f) miss
** =========================================================================== **
** RECODE OF VACCINATION VARIABLES
gen BCG = inrange(h2,1,3)
gen Polio0 = inrange(h0,1,3)
gen Polio = inrange(h4,1,3)+inrange(h6,1,3)+inrange(h8,1,3)
gen DPT = inrange(h3,1,3)+inrange(h5,1,3)+inrange(h7,1,3)
gen measles = inrange(h9,1,3)
** ========================================================================== **
*** Loop ***
forvalues x = 1/3 {
gen BCG`x' = (BCG>=`x')
gen Polio`x' = (Polio>=`x')
gen DPT`x' = (DPT>=`x')
gen measles`x' = (measles>=`x')
}
**
recode h4 (1/3=1) (else=0), gen(Polios1)
** check if loop worked **
svy: tab wealth DPT3, percent format(%9.1f) miss row
svy: tab wealth DPT3, count format(%9.0f) miss
** ========================================================================== **
/*
ALL BASIC VACCINATIONS:
----------------------
BCG, measles and three doses each of DPT and
polio vaccine (excluding polio vaccine given at birth)
*/
cap drop vaccination
gen vaccination = (BCG==1 & DPT3==1 & Polio3==1 & measles1==1)
label var vaccination "Received all basic vaccinations"
label define vaccination 0"No" 1"Yes"
label values vaccination vaccination
*==============================================================================*
** DROP IF NOT WITHIN SAMPLE
keep if vaccination !=.
*==============================================================================*
** CHECK
svy: tab vaccination, count format(%4.0f)
svy: tab vaccination, percent format(%4.1f)
********************************************************************************
exit
|
|
|
|
|
|
|
|
|
Re: Child immunization [message #23222 is a reply to message #23204] |
Mon, 02 August 2021 09:15 |
Shireen-DHS
Messages: 140 Registered: August 2020 Location: USA
|
Senior Member |
|
|
Hello Ugonna,
Thank you for your question. The Albania 2017 used different variable for the pentavalent or dpt vaccine. So instead of h3 it should be h51, h5 should be h52, and h7 should be h53. Also you need to drop children that are h1==0. The code for the changes you need to the CH_VAC.do file are bellow. You can make those changes then run the rest of the code without changes. After these changes I get a match of 75% for all basic vaccinations and 0.2 for no vaccinations for children 12-23 (458 children) using this code.
I did not understand your questions about combining ch_allvac_either and ch_novac_either. Do you mean you want a variable that has three categories of : 1. all basic vaccinations, partially vaccinated, and no vaccinations? I suggest a crosstab of these two variables to understand what you are looking for.
Hope this helps.
Best,
Shireen Assaf
The DHS Program
Stata code:
gen age=b19
*** Two age groups used for reporting.
* choose age group of interest
*
gen agegroup=0
replace agegroup=1 if age>=12 & age<=23
*/
/*
gen agegroup=0
replace agegroup=1 if age>=24 & age<=35
*/
* selecting children
keep if agegroup==1
keep if b5==1
*For Albania 2017 survey
drop if h1==0
*** Pentavalent ***
//DPT 1, 2, 3 either source
recode h51 (1 2 3=1) (else=0), gen(dpt1)
recode h52 (1 2 3=1) (else=0), gen(dpt2)
recode h53 (1 2 3=1) (else=0), gen(dpt3)
gen dptsum= dpt1+dpt2+dpt3
|
|
|
|
|
|
Re: Child immunization [message #23248 is a reply to message #23243] |
Fri, 06 August 2021 08:21 |
Shireen-DHS
Messages: 140 Registered: August 2020 Location: USA
|
Senior Member |
|
|
Hello,
The code should be the same, you just need to change the age group selection. That part of the code is in the beginning of the vaccination do file.
Best,
Shireen
|
|
|
Goto Forum:
Current Time: Wed Nov 6 15:29:04 Coordinated Universal Time 2024
|