The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Ethiopia » Cesarean section trends and associated factors ( how to recede antenatal visit (m14) y using Ethiopian DHS 2016)
Cesarean section trends and associated factors [message #18495] Mon, 09 December 2019 10:21 Go to next message
Shumetkassaw1@gmail.com is currently offline  Shumetkassaw1@gmail.com
Messages: 5
Registered: October 2019
Member
dear all
how to re code antenatal visit (m14) in to "no visit" ,"1-4 visit" and 4 more visit" using KR file STATA soft wore.in Ethiopia DHS 2016.
Re: Cesarean section trends and associated factors [message #18498 is a reply to message #18495] Mon, 09 December 2019 14:43 Go to previous message
Mlue
Messages: 89
Registered: February 2017
Location: North West
Senior Member
Hello,


The following may point you in the right direction. Please try this:


/* ANTENATAL CARE: ETHIOPIA DHS 2016 */

clear all
set matsize 800
set mem 1g
set maxvar 9000
cd "C:\Users\User1\Documents\ETHIOPIA DHS 2016\ETBR70DT"
use "ETBR70FL", 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)
*svydes

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

// RENAME

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

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

/* FOR TABLE 9.1 */

/*
m2a             byte    %8.0g      M2A        prenatal: doctor
m2b             byte    %8.0g      M2B        prenatal: nurse
m2c             byte    %8.0g      M2C        prenatal: midwife
m2d             byte    %8.0g      M2D        prenatal: health officer
m2e             byte    %8.0g      M2E        prenatal: health extension worker
m2f             byte    %8.0g      M2F        prenatal: cs health professional
m2g             byte    %8.0g      M2G        prenatal: traditional birth attendant
m2h             byte    %8.0g      M2H        prenatal: cs other person
m2i             byte    %8.0g      M2I        prenatal: cs other person
m2j             byte    %8.0g      M2J        prenatal: cs other person
m2k             byte    %8.0g      M2K        prenatal: other
m2l             byte    %8.0g      M2L        prenatal: cs other
m2m             byte    %8.0g      M2M        prenatal: cs other
m2n             byte    %8.0g      M2N        prenatal: no one
*/

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

** ANTENATAL CARE PROVIDER

cap drop ANC_provider
gen ANC_provider = 7 if m2a !=.
replace ANC_provider = 6 if m2f==1 | m2g==1 | m2h==1 | m2i==1 | m2j==1 | m2k==1 | m2l==1 | m2m==1
replace ANC_provider = 5 if m2g==1
replace ANC_provider = 4 if m2e==1
replace ANC_provider = 3 if m2d==1
replace ANC_provider = 2 if m2b==1 | m2c==1
replace ANC_provider = 1 if m2a==1
replace ANC_provider = 9 if m2a==9
label var ANC_provider "Antenatal care provider"
labe define ANC_provider 1"Doctor" 2"Nurse/midwife" 3"Health officer" ///
4"Health extension worker" 5"Traditional birth attendant" 6"Other" 7"No ANC"
label val ANC_provider ANC_provider

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

** SKILLED ANTENATAL CARE PROVIDER

cap drop skilled_ANC
gen skilled_ANC=0
replace skilled_ANC=1 if inrange(ANC_provider,1,4)
tab skilled_ANC, m
label define skilled_ANC 0"Unskilled" 1"Skilled provider"
label var skilled_ANC "Antenatal care from a skilled provider"
label val skilled_ANC skilled_ANC

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

** ANTENATAL CARE VISITS
cap drop antenatal_dhs
recode m14 (0=0 "None") (1=1 "1") (2/3=2 "2-3") (4/20=4 "4+") ///
(else=88 "DNK/Missing"), gen(antenatal_dhs)
label var antenatal_dhs "Antenatal visits - as in DHS report"
label val antenatal_dhs antenatal_dhs

* Any antenatal care
cap drop any_ANC
recode m14 (0 99=0 "None") (1/60 98=1 "1+ ANC visit"), gen(any_ANC)
label var any_ANC "Any antenatal care visit"
label val any_ANC any_ANC

* Four or more (4+) antenatal care
/*
cap drop four_plus_ANC
recode m14 (4/20=1 "4+") ///
(else=0 "None/<4/DNK/Missing"), gen(four_plus_ANC)
label var four_plus_ANC "Four or more antenatal care visits (recommended by WHO)"
label val four_plus_ANC four_plus_ANC
*/

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

** TIMING OF FIRST VISIT
cap drop fisrt_ANC_visit
gen fisrt_ANC_visit =98
replace fisrt_ANC_visit = 0 if m14 == 0
replace fisrt_ANC_visit = 1 if m13 >= 0 & m13 <=3
replace fisrt_ANC_visit = 2 if m13 >= 4 & m13 <=5
replace fisrt_ANC_visit = 3 if m13 >= 6 & m13 <=7
replace fisrt_ANC_visit = 4 if m13 >= 8 & m13 <=10
label define fisrt_ANC_visit 0"No antenatal care" 1"<4" 2"4-5" 3"6-7" 4"8+" 98"Dont know"
label var fisrt_ANC_visit "Number of months pregnant at time of first ANC visit"
label val fisrt_ANC_visit fisrt_ANC_visit

/*
cap drop rh_anc_moprg
recode m13 (.=0 "None") (0/3=1 "<4") (4 5=2 "4-5") (6 7=3 "6-7") ///
(8/90=4 "8+") (else=9 "DNK"), gen(rh_anc_moprg)
*/

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

** DROP IF NOT WITHIN SAMPLE
keep if ANC_provider !=.

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

**** CHECKS ****

** PART OF TABLE 9.2 - EDHS 2016: Number of ANC visits **
svy: tab antenatal_dhs residence, count format(%9.0f) miss
svy: tab antenatal_dhs residence, percent format(%9.1f) miss col

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

exit

Previous Topic: prevalence of anemia and associated factors in children
Next Topic: Cesarean section trends and associated factors
Goto Forum:
  


Current Time: Fri Feb 26 08:15:56 Coordinated Universal Time 2021