The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Fertility » compute key figures
Re: compute key figures [message #20298 is a reply to message #20111] Tue, 20 October 2020 17:52 Go to previous message
schoumaker is currently offline  schoumaker
Messages: 66
Registered: May 2013
Location: Belgium
Senior Member
Hello,
You can try this. There may be a more straightforard way, but this should work to compute age at birth for first birth (agebirth_1), second birth (ageirth_2) etc.
Best,
Bruno

**

local listbirths 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20

forval rank=1/20 {
gene agebirth_`rank'=.
foreach birth of local listbirths {
replace agebirth_`rank'=(b3_`birth'-v011)/12 if bord_`birth'==`rank'
}
}
**


Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
 
Read Message
Read Message
Read Message
Previous Topic: Table on Fertility Planning Status from NFHS-4 data
Next Topic: Merging
Goto Forum:
  


Current Time: Sat Dec 28 18:15:43 Coordinated Universal Time 2024