The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Fertility » Estimating Pregnancy Outcomes using Nepal DHS 2022 (Constructing miscarriage, stillbirth and abortion variables)
Re: Estimating Pregnancy Outcomes using Nepal DHS 2022 [message #27365 is a reply to message #27348] Mon, 31 July 2023 12:57 Go to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 891
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:

The following Stata program has women as units of analysis and includes the numbers of births, stillbirths, miscarriages, or abortions in the past three years. You can tabulate by current marital status, although this is not necessarily the marital status at the time of the pregnancy outcome.



use "...NPIR81FL.DTA", clear

keep v001 v002 v003 v005 v025 v501 p19* p32*

rename *_0* *_*

reshape long p19_ p32_, i(v001 v002 v003) j(order)

rename *_ *

*keep if p19<36

gen births=0

gen stillbirths=0

gen miscarriages=0

gen abortions=0



replace births=1 if p32==1 & p19<36

replace stillbirths=1 if p32==2 & p19<36

replace miscarriages=1 if p32==3 & p19<36

replace abortions=1 if p32==4 & p19<36



collapse (sum) births stillbirths miscarriages abortions (first) v005 v025 v501, by(v001 v002 v003)

label values v501 V501



tab v501 births [iweight=v005/1000000]

tab v501 stillbirths [iweight=v005/1000000]

tab v501 miscarriages [iweight=v005/1000000]

tab v501 abortions [iweight=v005/1000000]



tab1 births stillbirths miscarriages abortions if v501==1 | v501==2 [iweight=v005/1000000]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: PPR: Births in Last year
Next Topic: Questions about calculating general fertility - Nigeria 2018 DHS
Goto Forum:
  


Current Time: Tue Nov 26 22:47:36 Coordinated Universal Time 2024