Home » Countries » Ethiopia » Cesarean section and associated factors ( how to recede place of delivery using Ethiopian DHS )
|
Re: Cesarean section and associated factors [message #18365 is a reply to message #18363] |
Tue, 19 November 2019 04:38 |
Mlue
Messages: 92 Registered: February 2017 Location: North West
|
Senior Member |
|
|
Hello,
You did not specify which year you are working with (i.e. 2011 or 2016?), and you did not specify the software package you are using (i.e. Stata, SAS, SPSS, R?).
I have used Ethiopia DHS 2016 data, and Stata to produce the following (I hope it points you in the right direction):
//** ETHIOPIA DHS 2016 **//
clear all
set matsize 800
set mem 1g
set maxvar 9000
cd "C:\Users\User88\Desktop\ETHIOPIA DHS 2016\ETKR70DT"
use "ETKR70FL", 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)
********************************************************************************
********************************************************************************
rename v013 age
rename v106 education
rename v190 wealth
rename v025 residence
rename v024 region
********************************************************************************
**PLACE OF DELIVERY
cap drop DHS_delivery
recode m15 (21/27=1 "Public sector")(31/36=2 "Private sector") (41/46=3 "NGO") ///
(11/12=4 "Home") (96=5 "Other"), gen(DHS_delivery)
label var DHS_delivery "place of delivery as in DHS eport"
label val DHS_delivery DHS_delivery
cap drop DHS_delivery2
recode m15 (21/27=1 "Public sector")(31/36=2 "Private sector") ///
(11/12=4 "Home") (41/46 96=5 "NGO/Other"), gen(DHS_delivery2)
label var DHS_delivery2 "Place of delivery"
label val DHS_delivery2 DHS_delivery2
********************************************************************************
**DELIVERY IN HEALTH FACILITY
cap drop facility_delivery
recode m15 (21/46=1 "Facility-based deliveries") (11/12 96=0 "Non-facility deliverie"), gen(facility_delivery)
label var facility_delivery "Facility-based deliveries"
label val facility_delivery facility_delivery
********************************************************************************
** ASSISTED BY MEDICALLY TRAINED PROVIDER DURING DELIVERY
gen skilled_birth = 0
label define skilled_birth 0"Unskilled" 1"Skilled"
label var skilled_birth "Birth delivered by skilled birth attendant"
label val skilled_birth skilled_birth
foreach xvar of varlist m3a m3b m3c m3d m3e {
replace skilled_birth=1 if `xvar'==1
}
*
cap drop skilled_provider
egen skilled_provider = rowmax(m3a m3b m3c m3d m3e)
label define skilled_provider 0"Unskilled" 1"Skilled"
label var skilled_provider "Percentage delivered by a skilled provider"
label val skilled_provider skilled_provider
*tab skilled_provider [iw=weight], m
********************************************************************************
** DROP MISSING CASES
keep if DHS_delivery!=.
********************************************************************************
** CHECK
svy: tab wealth DHS_delivery, percent format(%4.1f) miss row
svy: tab wealth facility_delivery, percent format(%4.1f) miss row
svy: tab wealth skilled_birth, percent format(%4.1f) miss row
*svy: tab wealth skilled_provider, percent format(%4.1f) miss row
********************************************************************************
** RECODE VARIABLES FOR ANALYSIS **
* Mother's age at birth
cap drop agebirth
gen agebirth=(b3-v011)/12
cap drop age_at_birth
recode agebirth (min/19.91667=1 "<20") (20/34.91667=2 "20-34") ///
(35/max=3 "35-49"), gen(age_at_birth)
label var age_at_birth "Mother's age at birth"
label val age_at_birth age_at_birth
* 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
* Antenatal care visits
cap drop antenatal_dhs
recode m14 (0=0 "None") (1/3=1 "1-3") (4/20=4 "4+") ///
(98=88 "DNK") (else =99 "Missing"), gen(antenatal_dhs)
label var antenatal_dhs "Antenatal visits - as in DHS report"
label val antenatal_dhs antenatal_dhs
** ========================================================================== **
** ========================================================================== **
** REPLICATING TABLE 9.8 (page 149)
svy: tab age_at_birth DHS_delivery, percent format(%4.1f) row
svy: tab birth_order DHS_delivery, percent format(%4.1f) row
svy: tab antenatal_dhs DHS_delivery, percent format(%4.1f) row // report excludes DNK & Missing
svy: tab residence DHS_delivery, percent format(%4.1f) row
svy: tab region DHS_delivery, percent format(%4.1f) row
svy: tab education DHS_delivery, percent format(%4.1f) row
svy: tab wealth DHS_delivery, percent format(%4.1f) row
****************
/*
** COUNTS
svy: tab age_at_birth DHS_delivery, count format(%4.0f) miss
svy: tab birth_order DHS_delivery, count format(%4.0f) miss
svy: tab antenatal_dhs DHS_delivery, count format(%4.0f) miss
svy: tab residence DHS_delivery, count format(%4.0f) miss
svy: tab region DHS_delivery, count format(%4.0f) miss
svy: tab education DHS_delivery, count format(%4.0f) miss
svy: tab wealth DHS_delivery, count format(%4.0f) miss
*/
** ========================================================================== **
** REPLICATING TABLE 9.8 (page 149) - Facility Births
svy: tab age_at_birth facility_delivery, percent format(%4.1f) row
svy: tab birth_order facility_delivery, percent format(%4.1f) row
svy: tab antenatal_dhs facility_delivery, percent format(%4.1f) row
svy: tab residence facility_delivery, percent format(%4.1f) row
svy: tab region facility_delivery, percent format(%4.1f) row
svy: tab education facility_delivery, percent format(%4.1f) row
svy: tab wealth facility_delivery, percent format(%4.1f) row
****************
/*
svy: tab age_at_birth facility_delivery, count format(%4.0f) miss
svy: tab birth_order facility_delivery, count format(%4.0f) miss
svy: tab antenatal_dhs facility_delivery, count format(%4.0f) miss
svy: tab residence facility_delivery, count format(%4.0f) miss
svy: tab region facility_delivery, count format(%4.0f) miss
svy: tab education facility_delivery, count format(%4.0f) miss
svy: tab wealth facility_delivery, count format(%4.0f) miss
*/
** ========================================================================== **
** REPLICATING TABLE 9.9 (page 150) - Percentage delivered by a skilled provider
svy: tab age_at_birth skilled_provider, percent format(%4.1f) row
svy: tab birth_order skilled_provider, percent format(%4.1f) row
svy: tab antenatal_dhs skilled_provider, percent format(%4.1f) row
svy: tab residence skilled_provider, percent format(%4.1f) row
svy: tab region skilled_provider, percent format(%4.1f) row
svy: tab education skilled_provider, percent format(%4.1f) row
svy: tab wealth skilled_provider, percent format(%4.1f) row
****************
/*
svy: tab age_at_birth skilled_birth, count format(%4.0f) miss
svy: tab birth_order skilled_birth, count format(%4.0f) miss
svy: tab antenatal_dhs skilled_birth, count format(%4.0f) miss
svy: tab residence skilled_birth, count format(%4.0f) miss
svy: tab region skilled_birth, count format(%4.0f) miss
svy: tab education skilled_birth, count format(%4.0f) miss
svy: tab wealth skilled_birth, count format(%4.0f) miss
*/
** ========================================================================== **
** ================================= GRAPHS ================================= **
** ========================================================================== **
ssc install hplot, replace //needs internet connection
ssc install catplot, replace //needs internet connection
catplot DHS_delivery2 [aw=weight], by(wealth, compact note("") col(1)) ///
bar(1, blcolor(gs8) bfcolor(brown*.4)) blabel(bar, format(%9.1f) ///
pos(base)) percent(wealth) subtitle(, pos(9) ring(1) bcolor(none) nobexpand place(e)) ///
ytitle(Place of delivery (%)) var1opts(gap(*0.1) axis(noline)) ///
var2opts(gap(*.2)) ysize(5) yla(none) ysc(noline) ///
plotregion(lcolor(none))
catplot DHS_delivery2 wealth [aw=weight], percent(wealth) stack asyvars ///
bar(1, bcolor(ltblue)) bar(2, bcolor(pink*.2)) bar(3, bcolor(brown*.4)) ///
bar(4, bcolor(bluishgray)) bar(5, bcolor(gs10)) bar(6, bcolor(red*.4)) ///
bar(7, bcolor(sand)) blabel(bar, format(%9.1f) pos(center)) ///
blabel(bar, format(%9.1f) pos(center) size(tiny)orientation(vertical) color(black)) ///
ytitle(%) title(Place of delivery by HH wealth) subtitle(Ethiopia DHS 2016)
catplot facility_delivery wealth [aw=weight], percent(wealth) stack asyvars ///
bar(1, bcolor(gold)) bar(2, bcolor(ltblue)) bar(3, bcolor(gs0)) ///
blabel(bar, format(%9.1f) pos(center)) bar(4, bcolor(g)) ytitle(%) ///
title(Percentage delivered in a health facility) subtitle(Ethiopia DHS 2016)
catplot skilled_provider wealth [aw=weight], percent(wealth) stack asyvars ///
bar(1, bcolor(gold)) bar(2, bcolor(ltblue)) bar(3, bcolor(gs0)) ///
blabel(bar, format(%9.1f) pos(center)) bar(4, bcolor(g)) ytitle(%) ///
title(Prevalence of skilled birth attendance) subtitle(Ethiopia DHS 2016)
** ========================================================================== **
exit
|
|
|
Goto Forum:
Current Time: Thu Dec 26 20:22:14 Coordinated Universal Time 2024
|