Infant death in last 5 years [message #12551] |
Wed, 14 June 2017 03:12 ![Go to next message Go to next message](/theme/default/images/down.png) |
AnvitaDixit
Messages: 7 Registered: June 2017 Location: usa
|
Member |
|
|
Hello. Can you help me on how to create a variable for "Whether the most recently born infant in last 5 years died by age 12 months" into yes/no..in stata?
//Last child born in 5 years preceding survey
gen bornlast5y = .
replace bornlast5y = 1 if b3_01 >= 1297 & b3_01<=1363
tab bornlast5y, mi
svy:tab bornlast5y
//Infant is alive now or died in infancy
gen infantalive = .
replace infantalive = 1 if bornlast5y == 1 & b5_01 == 1
replace infantalive = 0 if bornlast5y == 1 & b5_01 == 0 & b7_01 < 13
label variable infantalive "Whether infant is alive"
tab infantalive, mi
svy: tab infantalive
[Updated on: Wed, 14 June 2017 22:50] Report message to a moderator
|
|
|
Re: Infant death in last 5 years [message #12560 is a reply to message #12551] |
Thu, 15 June 2017 08:17 ![Go to previous message Go to previous message](/theme/default/images/up.png) |
Bridgette-DHS
Messages: 3151 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Stata Specialist, Tom Pullum:
I will assume you are using Stata. You would open the KR file for a country. Then enter
gen d12=0
replace d12=1 if b7<12
These lines will construct a binary variable for all children born in the past five years. If you just want the youngest child, then enter "keep if bidx==1". The variable b7 is age at death, in completed months. The first year is completed months 0-11. If the child did not die, b7 has the missing value code ("."). Note that some children have not been exposed to the risk of dying for a full year, and this will be especially likely for the youngest child. You may want to take that into account.
|
|
|