The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Mortality » Calculating pregnancy related maternal mortality by year using ETHIOPIA DHSs 2000-2016
Re: Calculating pregnancy related maternal mortality by year using ETHIOPIA DHSs 2000-2016 [message #22440 is a reply to message #22435] Thu, 11 March 2021 21:38 Go to previous messageGo to previous message
Melese is currently offline  Melese
Messages: 17
Registered: August 2019
Member
Dear Bridgette and Tom, thank you very much for the reply.
Dear experts, can you please help me with this STATA syntax (program) to calculate these rates over different time intervals, please? I ccouldn't get it on the GitHub site.
Regards
Melese

*The following is the syntax that I used to calculate the pregnancy-related maternal mortality rate (out of the 15-49 reproductive age women) over the 05 years preceding the survey by using the ETHIOPIA 2011 survey IR dataset.

keep caseid v001 v002 v003 v005 v008 v011 v012 v013 v021 v023 v024 v025 v106 v190 awfactt mm* mmc*
rename mm*_0* mm*_*
reshape long mmidx_ mm1_ mm2_ mm3_ mm4_ mm5_ mm6_ mm7_ mm8_ mm9_ mm10_ mm11_ mm12_ mm13_ mm14_ mm15_, i(caseid) j(mmindex)
rename mm*_ mm*
drop if mmidx==.
tab mm1
drop if (mm1 == 8 | mm1 == 9 | mm2 == 8 | mm2 == 9 | mm1 == . | mm2 == .)
tab mm2 mm1
local period 60
gen upplim = v008-1
replace upplim = mm8 if mm2 == 0
gen lowlim = v008-`period'
gen exposure = upplim-lowlim+1
replace exposure = 0 if exposure < 0
gen agegrp1 = int((upplim-mm4)/60)
gen expo1 = min(exposure,upplim - (mm4 + agegrp1*60) + 1)
gen deaths1 = (mm2==0 & expo1 > 0)
replace exposure = exposure - expo1
gen agegrp2 = agegrp1 - 1
gen expo2 = min(60,exposure)
gen deaths2 = 0
replace exposure = exposure - expo2
gen agegrp3 = agegrp2 - 1
gen expo3 = min(60,exposure)
gen deaths3 = 0
reshape long agegrp expo deaths, i(caseid mmindex) j(j)
keep if agegrp >= 3 & agegrp <= 9
label define agegrp 3 "15-19" 4 "20-24" 5 "25-29" 6 "30-34" 7 "35-39" 8 "40-44" 9 " 45-49"
label values agegrp agegrp
gen wt = v005/1000000
tab agegrp mm1 [iw=deaths*wt]
tab agegrp mm1 [iw=expo*wt/12]
tab agegrp [iw=deaths*wt] if mm1 == 2 & mm9 >= 2 & mm9 <= 6
tab agegrp [iw=expo*wt/12] if mm1 == 2
gen PregMMR = 0 if [(agegrp==3 | agegrp==4 | agegrp==5 | agegrp==6 | agegrp==7 | agegrp==8 | agegrp==9) & (mm1 == 2)]
replace PregMMR = 1 if [(agegrp==3 | agegrp==4 | agegrp==5 | agegrp==6 | agegrp==7 | agegrp==8 | agegrp==9) & (mm1 == 2) & (mm1 == 2) & (mm9 >= 2) & (mm9 <= 6)]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Modelling of determinants of under five mortality
Next Topic: Maternal Mortality
Goto Forum:
  


Current Time: Fri Nov 29 10:06:04 Coordinated Universal Time 2024