The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Reproductive Health » Pregnancy History
Re: Pregnancy History [message #12304 is a reply to message #10045] Thu, 27 April 2017 08:35 Go to previous messageGo to previous message
gafap is currently offline  gafap
Messages: 3
Registered: April 2017
Member
Dear all,

I have a related question. I'm following the code before for reshaping the data into a pregnancy level dataset. I start from the IR (women) dataset, for Armenia 2010 DHS. After correcting for variable names, the code I run is below.

I want to replicate table 8.1 from the DHS 2010 report. But I cannot even get the number of pregnancies right. In report, the total number of pregnancies in the 3 years prior to survey are 1,457. After my code, I get 1,368. Hence I am missing some pregnancies somehow. Can you help?

Thanks!


************************************************************ *********************************


use "AMIR61FL.DTA", replace

gen weights=v005/1000000

* Rename variables to permit reshaping
ren bidx_0* bidx_*
ren bord_0* bord_*
ren s2*_0* s2*_*
ren b0_0* b0_*

* keep the variables ytou need - you may need more than this list
keep caseid weights v013 v008 v102 s209a s215a_* s222c_* s214y_* s214m_* s214c_* bidx_*



reshape long s215a_ s222c_ s214y_ s214m_ s214c_ bidx_, i(caseid) j(order)

ren s2*_ s2*
ren bidx_ bidx

* drop empty pregnancies
drop if bidx == .
cap drop bidx_1 -bidx_24


* Keep those who were aborted (born) within the last 3 years from interview
cap drop timesincepreg
gen timesincepreg = v008 - s214c


tab s215a if timesincepreg<=36


s215a | Freq. Percent Cum.
------------+-----------------------------------
live birth | 913 66.74 66.74
still birth | 3 0.22 66.96
miscarriage | 81 5.92 72.88
abortion | 371 27.12 100.00
------------+-----------------------------------
Total | 1,368 100.00


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Manual calculation of fertility
Next Topic: TIMELY & COMPLETION ANTENATAL
Goto Forum:
  


Current Time: Sun Dec 29 10:55:51 Coordinated Universal Time 2024