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 |
Janet-DHS
Messages: 938 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
|
|
|
Goto Forum:
Current Time: Wed Feb 5 00:55:44 Coordinated Universal Time 2025
|