The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Mortality » Stillbirth calculation for Philippines
Re: Stillbirth calculation for Philippines [message #26544 is a reply to message #26516] Thu, 30 March 2023 15:51 Go to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 739
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:

Again, this post is about a survey in Zambia rather the Philippines.

The following Stata lines count up the number of strings of the two types--B or T preceded by 6 or more P's. I do not include ambiguous strings that overlap the beginning of the calendar. The number of pregnancies you are looking for will be the sum of these two types.

use "...ZMIR71FL.DTA", clear

* for each woman, count up the number of strings of TPPPPPP or BPPPPPP in vcal_1

gen nT=0
gen nB=0
gen str7 compare="."

quietly forvalues lcol=1/74 {
replace compare=substr(vcal_1,`lcol',7)
replace nT=nT+regexm(compare,"TPPPPPP")
replace nB=nB+regexm(compare,"BPPPPPP")
}

drop compare
tab nB nT
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Postnatal care attendance - Liberia 2013 vs 2019
Next Topic: Maternal mortality in Ghana
Goto Forum:
  


Current Time: Sun Jun 23 06:22:18 Coordinated Universal Time 2024