The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Ethiopia » Calculating stillbirth using Ethiopia DHS 2000
Calculating stillbirth using Ethiopia DHS 2000 [message #9859] Wed, 01 June 2016 07:07 Go to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Dear DHS forum,

I was trying to calculate total number of stillbirth five years preceding the survey using Ethiopia DHS 2000 individual recode data file. I could not find calander, pregnancy history and pregnancy outcome variables in this data file. Can anyone help me what variables I should be working with to calculate stillbirths for Ethiopia 2000 DHS?

Thank you heaps

Sammy
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #9896 is a reply to message #9859] Fri, 03 June 2016 16:10 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
The stillbirth information can be found by using the duration of pregnancies from the calendar. The calendar data is in vcal_1. Please see the example code already on the forum.
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #9915 is a reply to message #9896] Mon, 06 June 2016 10:15 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member

Dear Trevor,

Thank you so much for your reply. However, Ethiopia DHS 2011 has no calendar information (Vcal_1), neither it has variable of pregnancy outcome (Live born/ Born dead/ lost before pregnancy). EDHS 2000 IR data file has no variable such as pregnancy history. I used the code you gave me but it did not work with EDHS 2000 IR data file. In this situation, how can i calculate stillbirth using EDHS 2011 IR data file.

Yours sincerely
Sammy
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #9917 is a reply to message #9915] Mon, 06 June 2016 10:20 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Sorry, i made mistake.

i was using EDHS 2000 not 2011. I actually calculated the stillbirth for EDHS 2005 and 2011.

I just need the help to calculate stillbirth using EDHS 2000.

Thank you so much.

Yours sincerely

Sammy
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #9927 is a reply to message #9917] Mon, 06 June 2016 17:20 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
Sorry, the example given before was for a survey with a calendar, but Ethiopia 2000 does not have a calendar.

Instead, you may want to look at the example code in the linked message. This code refers to Nepal 2001 data, but the concept is very similar. The EDHS 2000 uses a pregnancy history, and the pregnancy history variables needed can be found in the variables S231AC*, and S231C*.
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #9933 is a reply to message #9927] Mon, 06 June 2016 22:19 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Dear Trevor,

Thank you so much for getting back to me.

I used the code you gave me which was used for Nepal DHS 2001 data file.

I have couple of issues here:

1. EDHS 2000 do not have variable such as s216 which was used to calculate stillbirth for 2001 Nepal DHS.
2. After reshaping, i used idx92_==. to drop empty entries that contain no data but it gives me total number of live births in five years preceding the survey rather than total number of pregnancies five years proceeding the survey.

I would like to share the code i used which was initially made by you for Nepal DHS 2001. Unfortunately it did not work.

Can you please advise what wrong did i do to calculate stillbirth using EDHS 2000 IR data file?

use "C:\Data\DHS_Stata\ETIR41FL.DTA" , clear


keep caseid v001 v002 v003 v005 v008 v011 v013 v017 v018 v019 v021 v022 v023 s231c_* s231ac_* g231ac_* bidx_* bord_* idx92_* idx94_* v* b0_* b1_* b2_* b3_* b4_* b5_* b6_* b7_* b8_* b9_* b10_* b11_* b12_* b13_* b15_* b16_* scol24_* s230amg s230ayg s231ac_* g231am_* s231am_*

rename *_0* *_*

reshape long idx92_ idx94_ bord_ bidx_ b0_ b1_ b2_ b3_ b4_ b5_ b6_ b7_ b8_ b9_ b10_ b11_ b12_ b13_ b15_ b16_ s231ac_ s231c_ g231ac_ scol24_ g231am_ s231am_, i(caseid) j(i)

drop if idx92_==.


rename idx92_ idx
rename s*_ s*
rename b* p*

keep if p3 > v008-60|s231ac> v008-60


keep if s231c==.|s231c>=7
tab type [iw=v005/1000000]

Thank you so much.

Yours sincerely

Sammy


Re: Calculating stillbirth using Ethiopia DHS 2000 [message #9999 is a reply to message #9933] Wed, 15 June 2016 00:40 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
Your approach above is close, but not correct. The main problem is your reshape command. This assumes that the birth history and the non-live pregnancy history are in parallel, that is the first entry in the birth history and the first entry in the non-live pregnancy history are for the same event - they are not. The birth history and the non-live birth history are completely mutually exclusive. You need to extract all of the stillbirths from the non-live pregnancy history, and then add these to the birth history file before trying to calculate stillbirth estimates.

Below is code for extracting the still births from the non-live pregnancy history:
use "C:\Data\DHS_Stata\ETIR41FL.DTA" , clear

keep caseid v001 v002 v003 v005 v008 v011 v013 v017 v018 v019 v021 v022 v023 v* s231ac_* s231c_*

rename *_0* *_*

reshape long s231ac_ s231c_, i(caseid) j(i)

drop if s231ac_==. 
keep if s231ac_ > v008-60 & s231c>=7
Following this, you need to rename s231ac_ to b3 and then append this file to the BR dataset to produce a file of births and non-live pregnancies.
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #10085 is a reply to message #9999] Fri, 24 June 2016 02:13 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member

Dear Trevor,

Thank you so much for the support.

Regards

Sammy
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #10620 is a reply to message #9927] Thu, 18 August 2016 21:41 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Dear Trevor,

I hope you are doing well.

I was trying to calculate stillbirth using Pakistan DHS 2012-13. This time i was trying not to use calendar. Instead of calendar, i intend to use pregnancy history information but my number does not match the number. Can you please advise me if i am using the right code. The code i used was:

use "PKIR61FL.DTA", clear

keep caseid v001 v002 v003 v005 v008 v011 v012 v013 v021 v022 v023 v024 v025 v201 v208 v211 v212 v218 v222 v224 v225 v228 v229 v230 v231 v232 v233 v234 v235 v239 v240 v241 v242 idx97_* ord97_* s2*_* midx_* m2n_* m13_* m14_* s* b*

rename *_0* *_*

reshape long bidx_ bord_ b0_ b1_ b2_ b3_ b4_ b5_ b6_ b7_ b8_ b9_ b10_ b11_ b12_ b13_ b15_ b16_ idx97_ ord97_ s215_ s216_ s217_ s219_ s220m_ s220y_ s220c_ s220f_ s225c_ s225f_ midx_ m2n_ m13_ m14_ s221_ s222_ s223_ s224_ s225u_ s225n_ s226m_ s226y_ s227_ s228_ s229_, i(caseid) j(idx)
count
drop if idx97_==.
count
rename s*_ s*
rename b* p*
keep if s220c > v008-60
tab s227 s216 [iw=v005/1000000],m
keep if s227 == . | s227 >= 7
recode s216 (1=1 "Live birth")(2/3=2 "Stillbirth"), gen(type)
tab type
tab type [iw=v005/1000000]


Thank you so much for your time.

Sammy

Re: Calculating stillbirth using Ethiopia DHS 2000 [message #10623 is a reply to message #10620] Fri, 19 August 2016 17:33 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
A few problems with the code you provided. You cannot mix the b* variables with the s2* variables and the m* variables. The b* and m* variables are for births and bidx_01 and midx_1 are the same birth, so you can use these together in a reshape command. However, the s2*, idx97* and ord97* variables are for pregnancies, not births and so idx97_01 and bidx_01 are not necessarily the same pregnancy/birth.

For the stillbirths, you don't need the b* and m* variables.

Here is a revised piece of code:
use "PKIR61FL.DTA", clear 

keep caseid v001 v002 v003 v005 v008 v011 v012 v013 v021 v022 v023 v024 v025 v201 v208 v211 v212 v218 v222 v224 v225 v228 v229 v230 v231 v232 v233 v234 v235 v239 v240 v241 v242 idx97_* ord97_* s2*_* 

rename *_0* *_*

local varlist idx97_ ord97_ s215_ s216_ s217_ s219_ s220m_ s220y_ s220c_ s220f_ s225c_ s225f_ s221_ s222_ s223_ s224_ s225u_ s225n_ s226m_ s226y_ s227_ s228_ s229_

* capture the variable labels
foreach v of local varlist { 
di "`v'"
	local l`v' : variable label `v'1
} 

reshape long `varlist', i(caseid) j(idx)

* copy the variable labels back to the variables
foreach v of local varlist {
  label variable `v' `"`l`v''"'
}

rename s*_ s*
rename idx97_ idx97
rename ord97_ ord97

drop if idx97==. 

keep if v008-s220c < 60

gen type = .
replace type = 1 if s216==1 | s217==1
replace type = 2 if type==. & s227 >= 7 & s227 < 98 
replace type = 3 if type==. & (s227 < 7 | s227 >= 98) & s228 == 1
replace type = 4 if type==. & (s227 < 7 | s227 >= 98)
lab def type 1 "Live birth" 2 "Stillbirth" 3 "Abortion" 4 "Miscarriage"
lab val type type
lab var type "Type of pregnancy"

tab type [iw=v005/1000000] 

I also added code above to carry the variable labels over from before the reshape to the new variables after the reshape.
This code produces slightly more stillbirths than in the DHS report as the DHS report calculates stillbirths from the calendar where a stillbirth at the time of live birth is not included, and where twin stillbirths are only counted once. Thus this code is producing about 12 extra stillbirths than the code based on the calendar, and similarly the total pregnancies of 7 months or more is high by the same number.
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #10629 is a reply to message #10623] Mon, 22 August 2016 06:54 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Dear Trevor,

Your help is so much appreciable.

Sammy
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #10848 is a reply to message #10623] Sat, 24 September 2016 02:23 Go to previous messageGo to next message
chr8850
Messages: 20
Registered: July 2016
Member
Hi Trevor,

I am doing a similar analysis with Pakistan DHS data using pretty much the same code you posted and wondered about your statement on mixing the b* m* and s* variables. Is it ok to include some of the m* (with the idx and s variables) variables in the reshape in order to look at the maternity care variables for the live and non-live births?

Regards
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #10853 is a reply to message #10848] Sun, 25 September 2016 08:36 Go to previous messageGo to next message
chr8850
Messages: 20
Registered: July 2016
Member
Also just in addition to the same dataset I have a query about the index variables idx97, idx, and midx. When i look at the last live birth for each mother and tabulate that by restricting to idx==1 (or idx97 gives the same number) i get 10,476 births, but when i look at the data when midx==1 there is data for only 6,892 and the remainder appears to be missing/not applicable. Does this mean that not all of the mothers last births are included in the maternity care section? I'm just trying to understand why the data is not collected for all of the 10,476 births or if I have done something incorrectly.
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #11687 is a reply to message #9927] Mon, 30 January 2017 05:38 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Dear Sir,

I was trying to calculate total number of stillbirth using Nepal DHS dada 2011 (NPIR60FL.dta) using pregnancy history information. I used similar approach you previously used for Nepal DHS 2001. But my number does not match the number as appeared as 53 stillbirth and 5444 total pregnancy 7+ month' gestation. Here is the code I used to calculate stillbirth.


use "C:NPIR60FL.DTA"

keep caseid v214 v219 v220 v223 v225 v228 v229 v230 v231 v233 v001 v002 v003 v005 v008 v011 v013 ///
v017 v018 v019 v021 v022 v023 pidx97_* bord92_* pord97_* bidx97_* b0_* b1_* b2_* b3_* b4_* b5_* b6_* ///
b7_* b8_* b9_* b10_* b11_* b12_* b13_* b15_* b16_* s216_* s216b_* s217_* s228_* s220ab_* s220a_* ///
s220c_* sprego_* s226m_* s227_* s226c_* s229_* vcal_* m1_* m4_* m10_* m13_* m14_* m15_* m17_* m18_* ///
m46_* m45_* m34_* m3a_* m3b_* m3c_* m3d_* m3e_* m3f_* m3g_* m3h_* m3i_* m3j_* m3k_* m3l_* m3m_* m3n_* ///
v102 v168 v012 v502 v155 v463a v463b v463e v463f v463g v463x v024 sdevreg v212 v364 v206 v207 v717 v731 ///
v106 v705 v729 v130 v113 v116 v161 v158 v157 v159 v113 v116 v119 v120 v121 v123 v127 v153 v190 caseid v001 ///
v002 v003 v005 v008 v011 v013 v017 v018 v019 v021 v022 v023 v024 v*
rename *_0* *_*
reshape long pidx97_ pord97_ bord92_ bidx97_ b0_ b1_ b2_ b3_ b4_ b5_ b6_ b7_ b8_ b9_ b10_ b11_ b12_ b13_ b15_ ///
b16_ s216_ s216b_ s217_ s226m_ s227_ s228_ sprego_ s220ab_ s220a_ s226c_ s220c_ s229_ vcal_ m1_ m4_ m10_ m13_ ///
m14_ m15_ m17_ m18_ m46_ m45_ m34_ m3a_ m3b_ m3c_ m3d_ m3e_ m3f_ m3g_ m3h_ m3i_ m3j_ m3k_ m3l_ m3m_ m3n_, i(caseid) j(p)
count
drop if pidx97_==.
count
rename pidx97_ pidx
rename bord92_ bord
rename bidx97_ bidx
rename s*_ s*
rename b*_ p*
rename vcal_ vcal


keep if (v008-p3)<=59| (v008-s226c)<=59

tab s220ab s216 [iw=v005/1000000],m

replace s216=1 if s220ab==. & s216==2

replace s216=3 if s220ab==3 & s216==2

keep if s220ab == . | s220ab >= 7
recode s216 (1=1 "Live birth")(2/3=2 "Stillbirth"), gen(type)
tab type
tab type [iw=v005/1000000]


Can you please advise me what wrong did I do in the above command? because I do not want to use calendar information to calculate stillbirth. (I would like to apply similar approach you used to calculate stillbirth for 2001 Nepal dhs data)

Thank you so much.

Warm regards

Sammy

Re: Calculating stillbirth using Ethiopia DHS 2000 [message #15665 is a reply to message #11687] Tue, 28 August 2018 21:03 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Dear expert,

I am following above my qyuarry as i posted this more than a year ago. I am still waiting any assistance through DHS fourum.

Thank you

Sammy
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #15678 is a reply to message #15665] Wed, 29 August 2018 14:44 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
1) The main problem you have is that you cannot reshape births and pregnancies together at the same time. Some of the variables relate to pregnancies (including births, still births, miscarriages and pregnancies) and some just to births. The b*_1 variables and the s2*_1 variables are not about the same pregnancy if the last pregnancy was not a live birth, so you cannot reshape them into the same record - you would be mixing up births and pregnancies.

For example, if a pregnancy history was like the following:
_1 Miscarriage 08/2015
_2 Live birth  06/2014
_3 Abortion    02/2012
_4 Live birth  06/2009

then the birth history would look like:
_1 Live birth  06/2014
_2 Live birth  06/2009

if you reshape the pregnancy history and birth history data together it would mix the records together as below and would not match them up properly:
_1 Miscarriage 08/2015  _1 Live birth  06/2014
_2 Live birth  06/2014  _2 Live birth  06/2009
_3 Abortion    02/2012  empty
_4 Live birth  06/2009  empty

If you need to use both history variables and pregnancy history variables then you have to reshape the pregnancy history first and save the file, and then merge it to the birth history data in the BR file.

2) In reviewing this I discovered that there were errors in the construction of the pregnancy history variables in the Nepal 2011 survey and some variables (not all) were reversed (s220c s220f s225c s225f s226c s226f sprego). Essentially the data in these variables is in the reverse order from the order for other variables, so s2nn_x has the data for s2nn_y and vice versa. The below code fixes the problem and corrects the reversal for these variables.
use "NPIR60FL.DTA", clear

rename *_0* *_*

* fix for pidx97 pord97 s220c s220f s225c s225f s226c s226f and sprego

replace s209 = 0 if s209 == .
capture gen tot_pregs = v201 + s209
capture gen flipmax = int(tot_pregs/2)
capture gen tempvar = .

* reverse values of some variables to fix errors in the data file
capture program drop flip_var
program flip_var
syntax anything if
replace tempvar = `1'_`2' `if'
replace `1'_`2' = `1'_`3' `if'
replace `1'_`3' = tempvar `if'
end

local vlist pidx97 pord97 s220c s220f s225c s225f s226c s226f sprego
* maximum of 15 entries used in pregnancy history, minimum of 2 as no need to flip when only 1 pregnancy
forvalues p = 2/15 { 
	forvalues i = 1/7 {
		local j = `p'-`i'+1
		if `j' > `i' {
			foreach v of local vlist {
				flip_var `v' `i' `j' if tot_pregs == `p'
				di "flip_var `v' `i' `j' if tot_pregs == `p'"
			}
		}
	}
}
drop flipmax tempvar
* end of fix for s220c s220f s225c s225f s226c s226f and sprego
The datasets will be corrected and an updated version of the data will be available in the future.

3) Below is code for reshaping the pregnancy history, after applying the corrections above, and checking the number of stillbirths in the five years preceding the interview:
* keep just the variables needed
keep caseid v001 v002 v003 v005 v008 v011 v013 v017 v018 v019 v021 v022 v023 v024 v025 v201 tot_pregs b3_1  /// 
  pidx97_* pord97_* bidx97_* s215_* s216_* s217_* s219_* s220m_* s220y_* s220c_* s220f_* s220a_* s221_* ///
  s226m_* s226y_* s226c_* s226f_* s227_* s228_* s229_* sprego_* 

* set up list for reshape
local varlist pidx97_ pord97_ bidx97_ s215_ s216_ s217_ s219_ s220m_ s220y_ s220c_ s220f_ ///
  s220a_ s221_ s226m_ s226y_ s226c_ s226f_ s227_ s228_ s229_ sprego_

* capture the variable labels
foreach v of local varlist { 
	local l`v' : variable label `v'1
}

* reshape into long format file of pregnancies
reshape long `varlist', i(caseid) j(p)

* copy the variable labels back to the variables
foreach v of local varlist {
	label variable `v' `"`l`v''"'
}

* drop the empty pregnancy records
drop if pidx97_==. 

* rename the variables 
rename pidx97_ pidx97
rename pord97_ pord97
rename s*_ s*

* create cmc date of pregnancy for all pregnancies
gen cmc_preg = s220c
replace cmc_preg = s226c if cmc_preg == .

* compute the weight
gen wt=v005/1000000

* tabulate outcome for births and stillbirths
tab sprego [iw=wt] if v008 - cmc_preg < 60 & sprego <= 2

* tabulate outcome dropping stillbirth twin of live birth to match calendar approach
tab sprego [iw=wt] if v008 - cmc_preg < 60 & s226c != b3_1 & sprego <= 2
In the last line I restrict the tabulation of the live and still births to exclude stillbirths that are twins of a live birth. This is to match the number of stillbirths from the calendar where a stillbirth that is a twin of a live birth is not shown in the calendar as only one character can be included in any month of the calendar and the births take precedence.

4) You have also included some m*_ variables in your list of variables, but these also cannot be reshape with the pregnancy history as this series is only for live births and you would be mixing births and pregnancies as in 1) above. It is also of no use to link the m* series of variables as there is no data for non-live births. This also answers the question from chr8850 as there is no maternity data collected for non-live births.

[Updated on: Thu, 30 August 2018 11:39]

Report message to a moderator

Re: Calculating stillbirth using Ethiopia DHS 2000 [message #15680 is a reply to message #15678] Wed, 29 August 2018 15:50 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Dear Trevor,

Thank you for your great help. Can I also assume the code you have given for Nepal DHS 2011 can be applied for Nepal DHS 2006 and Nepal DHS 2016?
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #15681 is a reply to message #15680] Wed, 29 August 2018 16:13 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
The code probably cannot be applied exactly as it is because some of the variable names may differ for the pregnancy history. You should check the names of the variables in the pregnancy history for each survey, and modify those as needed. You should also check sprego against duraiton of pregnancy to ensure that is categorized in the same manner too. Otherwise I think you can use the code as it is.
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #15682 is a reply to message #15678] Wed, 29 August 2018 16:29 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Sorry, one quick question relating to pregnancy order as I can not see b11/p11 in this code. What variable I need to look if I am trying to compute pregnancy order/pregnancy interval.
Thank you.
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #15690 is a reply to message #15682] Thu, 30 August 2018 11:43 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
I have made a couple of change to the code above:
1) I realized that pidx97 and pord97 are also in reverse order, so I have added those to the fixes above.
2) I added v201 and tot_pregs into the keep command to use for calculating pregnancy interval, pregnancy order and birth order.

Below is additional code for calculating pregnancy interval, pregnancy order and birth order:
* create pregnancy interval variable
by caseid: gen     pregint = cmc_preg - cmc_preg[_n+1] 
by caseid: replace pregint = cmc_preg - cmc_preg[_n+2] if cmc_preg == cmc_preg[_n+1] // if a twin
by caseid: replace pregint = cmc_preg - cmc_preg[_n+3] if cmc_preg == cmc_preg[_n+2] // if the third of triplets
by caseid: replace pregint = cmc_preg - cmc_preg[_n+4] if cmc_preg == cmc_preg[_n+3] // if the fourth of quadruplets

* create pregnancy order variable
by caseid: gen     pregord = tot_pregs-pidx97+1
by caseid: replace pregord = pregord[_n+1] if cmc_preg == cmc_preg[_n+1] // if a twin
by caseid: replace pregord = pregord[_n+2] if cmc_preg == cmc_preg[_n+2] // if the third of triplets
by caseid: replace pregord = pregord[_n+3] if cmc_preg == cmc_preg[_n+3] // if the fourth of quadruplets

* create birth order variable
by caseid: gen     birthord = v201-bidx97+1 if bidx97 > 0 // a live birth
by caseid: replace birthord = birthord[_n+1] if bidx97 > 0 & bidx97[_n+1] > 0 & cmc_preg == cmc_preg[_n+1] // if a twin
by caseid: replace birthord = birthord[_n+2] if bidx97 > 0 & bidx97[_n+2] > 0 & cmc_preg == cmc_preg[_n+2] // if the third of triplets
by caseid: replace birthord = birthord[_n+3] if bidx97 > 0 & bidx97[_n+3] > 0 & cmc_preg == cmc_preg[_n+3] // if the fourth of quadruplets
This code calculates the pregnancy interval, pregnancy order and birth order, taking into account twins.
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #15696 is a reply to message #15690] Thu, 30 August 2018 20:28 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Dear Trevor,

Thank you very much for all your support throughout. i can immagine it could not have have been resolved by me anyway. One last quarry: I used 'pregint' variable to contstruct Previous pregnancy interval in months; but i could not match the number as shown in the Nepal DHS 2011 report(table 8.4).

Your guidence on above matter would be highly appricated.

Thank you.

Sammy

[Updated on: Thu, 30 August 2018 20:45]

Report message to a moderator

Re: Calculating stillbirth using Ethiopia DHS 2000 [message #15933 is a reply to message #15681] Mon, 08 October 2018 02:42 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member

Dear Trevor

First of all, thank you so much for your help so far.

Following your advice, i tried to apply similar approach to replicate table 9.30 Nepal DHS 2016. I have been able to come to the close estimate. However, my estimate is not same to those reported by NDHS 2016.

To replicate the estimate i used NPIR7HFL.dta file in STATA, and the code used for the estimatation is as follow:

use NPIR7HFL.DTA, clear

rename *_0* *_*


* reshape into long format file of pregnancies
reshape long pord97_ pidx97_ bidx97_ s214_ s212b_ s212c_ s213_ s215m_ s215y_ s215c_ s215f_ s220a_ s216_ s220at_ s221_ sprego_ b11_, i(caseid) j(p)

* drop the empty pregnancy records
drop if pidx97_==.

* rename the variables
rename pidx97_ pidx97
rename pord97_ pord97
rename s*_ s*

* create cmc date of pregnancy for all pregnancies
gen cmc_preg = s215c

* compute the weight
gen wt=v005/1000000

* tabulate pegnancy outcomes***

tab sprego [iw=wt] if v008 - cmc_preg < 60



sprego Freq. Percent Cum.

live birth 5,007.4598 80.48 80.48
stillbirth 83.9732008 1.35 81.83
miscarriage 565.400331 9.09 90.92
abortion 564.957424 9.08 100.00

Total 6,221.7907 100.00


Your help to resolve this issue would be highly appricated

Sincerely Yours

Sammy




Re: Calculating stillbirth using Pakistan DHS 2006-07 [message #18567 is a reply to message #9859] Sun, 29 December 2019 22:42 Go to previous messageGo to next message
rishabh21 is currently offline  rishabh21
Messages: 9
Registered: September 2019
Member
No of stillbirths in last 5 year preceding the survey not matching with the report pf Pakistan DHS (2006-07).
How can i calculate no. of stillbirths? please help
Re: Calculating stillbirth using Pakistan DHS 2006-07 [message #18670 is a reply to message #18567] Fri, 24 January 2020 11:18 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3016
Registered: February 2013
Senior Member
Following is a response from Senior DHS Specialist, Kerry MacQuarrie:

When trying to match numbers from a final report table, I find it helpful to systematically work through the following steps, since there are so many different ways one could "go wrong" in matching numbers. Could you work through these steps and identify where you first encounter a mismatch? That will help us help you fix your code.

Check that you have:
1. Correct data file unit of analysis
2. Correct denominator population at risk
3. Correct variables: find and understand your variables (As you undoubtedly already know, there is no pre-calculated variable for stillbirths. Rather, stillbirths are defined as any non-live birth occurring at 7 or more months gestational age.)
4. Correct recoding special values
5. Correct weights
6. Correct tabulation row vs. column percent

You may also want to refer to the coding resources that The DHS Program has on infant and child mortality on Github: https://github.com/DHSProgram

I hope this helps.

Please respond if you still cannot identify the problem after following these steps.
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #18691 is a reply to message #15665] Wed, 29 January 2020 08:00 Go to previous messageGo to next message
Abe Kiyu is currently offline  Abe Kiyu
Messages: 5
Registered: December 2019
Member
Sami wrote on Tue, 28 August 2018 21:03
Dear expert,

I am following above my qyuarry as i posted this more than a year ago. I am still waiting any assistance through DHS forum.

Thank you

Sammy
Dear expert, I am MPH student and know I am doing my thesis on Perinatal mortality by using EDHS data seat but, failed to calculate stillbirth for the 2000 EDHS data. I need your assistance, please
thank you
Abebech
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #18693 is a reply to message #18691] Wed, 29 January 2020 10:25 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
Please provide details of why you need assistance. This thread has a lot of assistance concerning the estimation of perinatal mortality, but we cannot help you solve your issue unless you provide more information as to what exactly your problem is. Please provide your code and your output. Also, please review carefully the thread here and others on the forum. Additionally, please see the DHS code share library on github at https://github.com/DHSProgram.
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #18791 is a reply to message #18693] Fri, 21 February 2020 01:47 Go to previous messageGo to next message
Abe Kiyu is currently offline  Abe Kiyu
Messages: 5
Registered: December 2019
Member
Dear expert, i am MPH student and i am doing my thesis on perinatal mortality rate by using the EDHS data seat but i failed to calculate the perinatal mortality rate at the end. i follow the DHS contraceptive calendar tutorial guideline, but the guideline calculates the perinatal mortality ratio, not the rate. please i need help on how to calculate the PNM rate, thank you in advance.
this is the step i followed.
thank you
  • Attachment: example4.do
    (Size: 3.43KB, Downloaded 443 times)
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #18952 is a reply to message #18791] Tue, 24 March 2020 14:33 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3016
Registered: February 2013
Senior Member
Following is a response from DHS Senior Analysis & Research Manager, Shireen Assaf:

Please visit the new DHS Github site that provides code for our indicators: https://github.com/DHSProgram
You can choose the Stata or SPSS sites. Please read the read me file available.

Perinatal mortality code is found in Chapter 8 in the CM_PMR.do file if you are using Stata. The link is below. You can run this do file from the master do file or run it alone but you will need to change your paths and enter the name of the file for the survey you are working with.
https://github.com/DHSProgram/DHS-Indicators-Stata/tree/mast er/Chap08_CM
Re: Calculating stillbirth using Ethiopia DHS 2000 [message #18954 is a reply to message #18952] Tue, 24 March 2020 15:08 Go to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
Dear Abe Kiyu

The perinatal mortality rate is calculated as a ratio of the number of stillbirths over the number of live births in the five years preceding the survey. Thus the program you have gives you the perinatal mortality rate.

See the Guide to DHS Statistics and search for perinatal mortality for more information.
Previous Topic: Analysis on Exclusive breastfeeding (EBF) in Ethiopian DHS 2016
Next Topic: Computing Newborn Mortality rates
Goto Forum:
  


Current Time: Thu Mar 28 08:54:04 Coordinated Universal Time 2024