Home » Topics » Mortality » DHS Cameroon (Maternal mortality rates calculation)
Re: DHS Cameroon [message #24949 is a reply to message #24649] |
Mon, 08 August 2022 04:45   |
Muhibbi
Messages: 11 Registered: June 2022
|
Member |
|
|
Hello,
In this code :
//Go to the IR file and reshape the mm variables.
program define setup_adult_mm_vars
//Setup local path and data file name
local lpath=spath
local lfn_IR=sfn_IR
use "`lpath'\\`lfn_IR'", clear
//Make a file of sisters
keep v000 v001 v002 v003 v005 v008 v010 v013 v021-v025 mm* awfact*
//This file includes all women, including women with no siblings, and is needed later
sort v001 v002 v003
save IR_all_women.dta, replace
gen clusterid=v021
-> //check for v023 for stratum id
if sv023_NA==0 {
rename v023 stratumid
}
if sv023_NA==1 {
egen stratumid=group(v024 v025)
}
//Need to check for mm16; if an older survey, must give it a value
scalar smissing_mm16=0
capture confirm numeric variable mm16_01, exact
if _rc>0 {
scalar smissing_mm16=1
local li=1
while `li'<=20 {
gen mm16_`li'=.
local li=`li'+1
}
}
ren *_0* *_*
drop mmc* mmidx* mm5* mm10* mm11* mm12* mm13* mm14* mm15*
//reshape data file
quietly reshape long mm1_ mm2_ mm3_ mm4_ mm6_ mm7_ mm8_ mm9_ mm16_, i(v001 v002 v003) j(mmidx)
rename mm*_ mm*
//Drop any cases with sex missing, i.e. mm1>2
drop if mm1>2
/*---------------------------------------------------------- ----------------
NOTE:
Important for redefinition of Pregnancy Related Mortality Ratio (PRMR)
in surveys from 2016 onwards
If mm9=2, and mm16=1 or 2, recode mm9 to 1
replace mm9=1 if mm9==2 & (mm16==1 | mm16==2)
For earlier surveys that do not include mm16, it is only possible to
calculate PRMR; what was previously called maternal mortality (MM) is now called
pregancy related mortality (PRM)
See https://blog.dhsprogram.com/mmr-prmr/ for more information on these indicators.
------------------------------------------------------------ --------------*/
//This file has one record for each sibling. It is needed for the tables on completeness of information.
save workfile.dta, replace
//Crucial: drop cases in which survival status is don't know (dk) AFTER saving workfile
drop if mm2>1
//specify the lower and upper cmcs of the interval of observation, start_month and end_month,
/*---------------------------------------------------------- ----------------
NOTE:
This uses scalars lw and uw that were set earlier; usually lw=-6 and uw=0,
but not always!
------------------------------------------------------------ --------------*/
//execute program to create start and end month for window of time
-> start_month_end_month
rename mm1 sex
//Tabulate the timing--during pregnancy, at childbirth, afterwards
//tabulate mm9 for all maternal deaths, unweighted
tab mm9
//tabulate mm9 for all maternal deaths, weighted
tab mm9 [iweight=v005/1000000]
//tabulate mm9 for all maternal deaths in the window, unweighted
tab mm9 if mm8>=start_month & mm8<=end_month
//tabulate mm9 for all maternal deaths in the window, weighted
tab mm9 if mm8>=start_month & mm8<=end_month [iweight=v005/1000000]
save adult_mm_vars.dta, replace
/*---------------------------------------------------------- ----------------
NOTE:
adult_mm_vars.dta is an individual-level file for with one record for each
sibling in the IR file. If there was also a sibling module in the men's survey,
a parallel routine must be added.
------------------------------------------------------------ --------------*/
end
What are "sv023" and "start_month_end_month"? Stata displays "sv023_NA not found" and "command start_month_end_month is unrecognized" respectively when I try to run it.
|
|
|
 |
|
DHS Cameroon
By: Muhibbi on Tue, 14 June 2022 05:38
|
 |
|
Re: DHS Cameroon
|
 |
|
Re: DHS Cameroon
By: Muhibbi on Wed, 15 June 2022 11:43
|
 |
|
Re: DHS Cameroon
By: Muhibbi on Mon, 20 June 2022 05:07
|
 |
|
Re: DHS Cameroon
|
 |
|
Re: DHS Cameroon
By: Muhibbi on Thu, 23 June 2022 05:46
|
 |
|
Re: DHS Cameroon
By: Muhibbi on Tue, 19 July 2022 03:57
|
 |
|
Re: DHS Cameroon
|
 |
|
Re: DHS Cameroon
By: Muhibbi on Mon, 25 July 2022 05:49
|
 |
|
Re: DHS Cameroon
By: Muhibbi on Mon, 25 July 2022 11:47
|
 |
|
Re: DHS Cameroon
|
 |
|
Re: DHS Cameroon
By: Muhibbi on Wed, 03 August 2022 10:57
|
 |
|
Re: DHS Cameroon
By: Muhibbi on Mon, 08 August 2022 04:45
|
 |
|
Re: DHS Cameroon
By: Muhibbi on Mon, 08 August 2022 09:26
|
 |
|
Re: DHS Cameroon
|
 |
|
Re: DHS Cameroon
By: Muhibbi on Fri, 12 August 2022 03:57
|
Goto Forum:
Current Time: Wed Feb 19 21:24:34 Coordinated Universal Time 2025
|