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 Go to previous message](/theme/default/images/up.png) |
Janet-DHS
Messages: 810 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: Sun Sep 1 05:51:54 Coordinated Universal Time 2024
|