The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Reproductive Health » Pregnancy outcome (Factors associated with pregnancy outcome)
Pregnancy outcome [message #25153] Wed, 07 September 2022 07:52 Go to next message
waqas.hameed1@gmail.com is currently offline  waqas.hameed1@gmail.com
Messages: 7
Registered: July 2021
Member
I want to determine factors associated with pregnancy outcome. For that I need to find a variable that shows the outcome of most recent pregnancy - be it a livebirth, abortion, miscarriage or stillbirth. I found 'midx' series but they tell us live birth. I want to exclude women from the IR file who have never been pregnant.

Would appreciate help which variable I should be using to set my sample.

Thanks

Re: Pregnancy outcome [message #25184 is a reply to message #25153] Fri, 09 September 2022 16:09 Go to previous messageGo to next message
Janet-DHS is currently offline  Janet-DHS
Messages: 888
Registered: April 2022
Senior Member
Following is a response from DHS staff member Tom Pullum:

What survey (country and year) are you using?
Re: Pregnancy outcome [message #25186 is a reply to message #25184] Sat, 10 September 2022 00:08 Go to previous messageGo to next message
waqas.hameed1@gmail.com is currently offline  waqas.hameed1@gmail.com
Messages: 7
Registered: July 2021
Member
We are using Pakistan DHS 2017-18 dataset
Re: Pregnancy outcome [message #25212 is a reply to message #25153] Fri, 16 September 2022 16:59 Go to previous messageGo to next message
Janet-DHS is currently offline  Janet-DHS
Messages: 888
Registered: April 2022
Senior Member
Following is a response from DHS staff member Tom Pullum:

You have to use the calendar. Rather than give an answer that's specific to this survey, I'll describe a strategy to develop an answer.

First, you need to find the code for "miscarriage". The codes for birth (B), abortion (A) and stillbirth (S) are the same in all surveys, but the code for miscarriage can vary. I go to the final report, find the woman's questionnaire, go to the beginning o Section 2, Reproduction. There are some instructions to the interviewer that include the code--it's C.

Second, you want to find WHICH (if any) of the vcal_* variables include the codes B, C, A, and S. At the end of this posting I will give Stata code to do this. PKIR71FL.dta includes 9 vcal variables. The program goes through all the columns in all of them. I look at the results and see that vcal_6 is the only one that includes B, C, A, and S. I see that vcal_1 includes B and T. T, for termination, is the aggregation of C, A, and S. In vcal_1 the letter T occurs 2930 times. In vcal_6, C occurs 2301 times, A occurs 252 times, and S occurs 377 times. The sum of these 3 numbers is 2930. So we have consistency.

It is common for vcal_1 to include B and T, and vcal_6 to include B and the breakdown of T. What I have described is an easy way to confirm this. I have just learned that in the NFHS-5, for example, the breakdown is given in vcal_7, BUT vcal_7 was omitted from the IR file! It will have to be included in the next issue of the IR file.

Third, I want to construct two variables using vcal_6. One is the cmc of the most recent pregnancy and the other is the outcome. I do that as follows. The following conversions are useful:

mbi: months given as months before interview: mbi=col-v018
cmc: months given in century month codes: cmc=v017+80-col

The most recent outcome that is B, C, A, or S will have the maximum value of cmc or the minimum value of mbi or the minimum value of col--they are all equivalent. Here is one approach.

use v001 v002 v003 v017 v018 vcal_6 using "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\PKIR71FL.DTA" , clear

* Use B M A S for birth, miscarriage, abortion, stillbirth
* In this survey, the code for miscarriage is C

gen str1 check="."
gen col_B=.
gen col_M=.
gen col_A=.
gen col_S=.

local li=1
quietly while `li'<=80 {
replace check=substr(vcal_6,`li',1)
replace col_B=`li' if check=="B" & col_B==.
replace col_M=`li' if check=="C" & col_M==.
replace col_A=`li' if check=="A" & col_A==.
replace col_S=`li' if check=="S" & col_S==.
local li=`li'+1
}

egen col_BMAS=rowmin(col_B col_M col_A col_S)

gen BMAS=.
replace BMAS=1 if col_BMAS==col_B & col_BMAS<.
replace BMAS=2 if col_BMAS==col_M & col_BMAS<.
replace BMAS=3 if col_BMAS==col_A & col_BMAS<.
replace BMAS=4 if col_BMAS==col_S & col_BMAS<.

* drop if the most recent outside the last 60 months
replace BMAS=. if col_BMAS-v018>60

label define BMAS 1 "Birth" 2 "Miscarriage" 3 "Abortion" 4 "Stillbirth"
label values BMAS BMAS

replace col_BMAS=. if col_BMAS-v018>60
gen cmc_BMAS=v017+80-col_BMAS

* BMAS is "." if there was no termination within the calendar

tab1 cmc_BMAS BMAS,m

keep v001 v002 v003 BMAS cmc_BMAS
sort v001 v002 v003
save temp.dta, replace

* merge this file back with the IR file



Here is the Stata program to find which codes are in which vcal variables. I have a path to a scratch folder but you can bypass that. I refer to the letters as "check".

cd e:\DHS\DHS_data\scratch

set more off

* open the IR file
use v001 v002 v003 vcal_* using "...PKIR71FL.DTA"

save temp.dta, replace

local lcol=1
while `lcol'<=9 {
scalar scol=`lcol'

use temp.dta, clear

local li=1
quietly while `li'<=80 {
gen str1 check_`li'="."
replace check_`li'=substr(vcal_`lcol',`li',1)
local li=`li'+1
}

reshape long check_, i(v001 v002 v003) j(column)
rename *_ *

scalar list scol
tab check,m

local lcol=`lcol'+1
}

Re: Pregnancy outcome [message #25214 is a reply to message #25212] Sat, 17 September 2022 02:02 Go to previous messageGo to next message
waqas.hameed1@gmail.com is currently offline  waqas.hameed1@gmail.com
Messages: 7
Registered: July 2021
Member
Thank you so much for a very thorough guidance and the syntax.

Just to double-check could of things with you. In Pakistan, we collect details regarding antenatal care on women for the last pregnancy or last live birth? And if I reduced my data to last pregnancy outcome, the ANC details will be for that particular pregnancy record, right?

I shall work on it and get back to you.
Re: Pregnancy outcome [message #25236 is a reply to message #25214] Tue, 20 September 2022 16:47 Go to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 888
Registered: April 2022
Senior Member
Following is a response from DHS staff member Tom Pullum:

To answer this question, I would go to the questionnaire, in the appendix to the final report, and look for the questions on antenatal care. The skip pattern will tell you whether they are asked about the most recent birth or the most recent pregnancy. For most surveys it would be the most recent live birth, but this survey could be different, so it's worth checking.
Previous Topic: Benin 2011-2012 Daughter's circumcision status
Next Topic: Matching most recent sexual activity (women) in India_2019/21
Goto Forum:
  


Current Time: Tue Nov 26 09:39:51 Coordinated Universal Time 2024