The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Fertility » Indonesia vcal calendar data
Re: Indonesia vcal calendar data [message #11396 is a reply to message #3648] Mon, 12 December 2016 01:15 Go to previous messageGo to previous message
tege2004@gmail.com is currently offline  tege2004@gmail.com
Messages: 3
Registered: August 2016
Member
Hi i am tegene i tried to understand the code given for still birth calculation but i did not understand it particularly the following part.

Set length of calendar to use
gen callen = v018 + 59
* If calendar is aligned right (as in original dataset), use the following:
gen beg = v018
gen end = callen
* If calendar is aligned left (as it appears to be), use the following:
*gen beg = 1
*gen end = 60

* Loop through calendar summing births, non-live pregnancies and stillbirths
forvalues i = 1/80 {
* Restrict to 60 months preceding survey
replace births = births+1 if `i' >= beg & `i' <= end & substr(vcal_1,`i',1) == "B"
replace nlbirths = nlbirths+1 if `i' >= beg & `i' <= end & substr(vcal_1,`i',1) == "T"
replace stillbirths = stillbirths+1 if `i' >= beg & `i' <= end & substr(vcal_1,`i',7) == "TPPPPPP"
}




please is there any one to help me to understand how to find still birth by using calendar? or please tell me the above command with simple language??

 
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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: B11 is actually missing or it represent first birth?
Next Topic: last birth
Goto Forum:
  


Current Time: Tue Mar 31 16:22:20 Eastern Daylight Time 2020