The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » India » Birth order and pregnancy outcome
Birth order and pregnancy outcome [message #15487] Tue, 31 July 2018 02:26 Go to next message
kclakhara is currently offline  kclakhara
Messages: 26
Registered: June 2016
Location: New Delhi
Member
Dear Sir/Madam,

I want to know which variable used for the computation of "Pregnancy outcome" table 6.15. I have gone through the variable "V208", "S234" but figures are not matching. Although this table also given in the India report NFHS-2, 1998-99 and given direct variable to generate table.

I have request to you, please suggest how can generate this table using certain variable and conditions.

Regards,

Kailash
Re: Birth order and pregnancy outcome [message #15879 is a reply to message #15487] Wed, 03 October 2018 12:38 Go to previous messageGo to next message
Courtney-DHS is currently offline  Courtney-DHS
Messages: 6
Registered: June 2018
Location: Rockville, Maryland
Member
Because table 6.15 specifically describes last births, you'll need to use the 'calendar data'. Please reference the DHS Contraceptive Calendar Tutorial (https://dhsprogram.com/data/Calendar-Tutorial/index.cfm) for a step-by-step guide in using these data.

The Stata code below should return the same results in Table 6.15. The code searches for the most recent occurrence of a live birth, abortion, miscarriage, or stillbirth. This code uses vcal_7 because this has the raw data from vcal_1 with codes that differentiate between abortion, miscarriage, stillbirths. If vcal_1 is used, all three (abortion, miscarriage, and stillbirth) will be recoded to the same code "T" for terminated birth.

There are likely many ways to do this, but this should show a step by step process for how to use the calendar string data.



*create weight
gen wt=v005/1000000


*limit the calendar to 60 months before the interview
gen cal = substr(vcal_7, v018, 60)

*check length - this shows calendar has been cut to 60 months (5 years)
gen length = strlen(cal)

*find the last occurrence of each code B=birth, A=abortion, M=miscarriage, S=stillbirth
gen last = . 
gen lastb = strpos(cal, "B")
gen lasta = strpos(cal, "A")
gen lastm = strpos(cal, "M")
gen lasts = strpos(cal, "S")

*replace the codes for whichever occurs first in the string (last = most recent in history)
replace last = lastb if (lastb > 0 & lastb < last)
replace last = lasta if (lasta > 0 & lasta < last)
replace last = lastm if (lastm > 0 & lastm < last)
replace last = lasts if (lasts > 0 & lasts < last)

*label the codes with numbers
gen lastcode = substr(cal, last, 1)
gen pregout = .
replace pregout = 1 if strmatch(lastcode,"B")
replace pregout = 2 if strmatch(lastcode,"A")
replace pregout = 3 if strmatch(lastcode,"M")
replace pregout = 4 if strmatch(lastcode,"S")

label var pregout "Last Pregnancy Outcome"
label define pregout 1 "live birth" 2 "abortion" 3 "miscarriage" 4 "stillbirth"
label values pregout pregout
tab pregout [iw=wt]
Re: Birth order and pregnancy outcome [message #15907 is a reply to message #15879] Fri, 05 October 2018 07:20 Go to previous message
kclakhara is currently offline  kclakhara
Messages: 26
Registered: June 2016
Location: New Delhi
Member
Dear Sir/Madam,

Thank you so much for the your support.

Regards,

Kailash
Previous Topic: Sexual Abuse in Children
Next Topic: How to calculate pregnancies in the past 5 years in NFHS-4
Goto Forum:
  


Current Time: Thu Mar 28 08:51:51 Coordinated Universal Time 2024