The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Mortality » Neonatal Mortality in India NFHS-4
Re: Neonatal Mortality in India NFHS-4 [message #15761 is a reply to message #15738] Tue, 11 September 2018 10:26 Go to previous messageGo to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
Using the IR file, try the following code:
* Any stillbirths
gen stillbirths = regexm(vcal_1,"TPPPPPP")

gen early_neonatal_deaths = 0
gen infant_deaths = 0
gen child_deaths = 0

* rename birth variables for use in forvalues loop
rename b*_0* b*_*

* Any early neonatal deaths, infant deaths, child deaths
forvalues b = 1/20 {
	* early neonatal - days 0-6
	replace early_neonatal_deaths = 1 if inrange(b6_`b',100,106)
	* infant - from birth trough age 11 months
	replace infant_deaths = 1 if inrange(b6_`b',100,211)
	* child from 12 months up through 4 completed years
	replace child_deaths = 1 if inrange(b6_`b',212,304)
}
* perinatal mortality includes stillbirths and early neonatal deaths
gen perinatal_deaths = (stillbirths | early_neonatal_deaths)

tab stillbirths
tab early_neonatal_deaths
tab infant_deaths
tab child_deaths
tab perinatal_deaths
 
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
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: Mortality rates and binary variable
Next Topic: Child mortality with binary code
Goto Forum:
  


Current Time: Sat Dec 28 08:02:29 Coordinated Universal Time 2024