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 #27293 is a reply to message #27224] Thu, 13 July 2023 12:46 Go to previous messageGo to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 753
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:

We apologize for the delay in this response, due to travel. This was a DHS-8 survey and it included a pregnancy history. It's much easier to construct a table such as table 5.14 from a pregnancy history than from a calendar. The following Stata lines illustrate how to do this, using just one of the covariates in the table: place of residence.

use "....NPIR81FL.DTA" , clear
keep v001 v002 v003 v005 v025 p19* p32*
rename *_0* *_*
reshape long p19_ p32_, i(v001 v002 v003) j(order)
keep if p19<36
tab v025 p32 [iweight=v005/1000000], row

p32 is the outcome (birth, stillbirth, miscarriage, or abortion), and p19 is months since the outcome. The IR file is re-shaped into a file in which each of the outcomes is a case. The weight and covariates are carried along in the reshaping
 
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: Sun Jun 30 04:54:30 Coordinated Universal Time 2024