The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Reproductive Health » Pregnancy History
Pregnancy History [message #9211] Thu, 25 February 2016 01:07 Go to next message
waqas is currently offline  waqas
Messages: 35
Registered: June 2015
Location: Islamabad, Pakistan
Member

I did not find variable indicating total number of pregnancies in pregnancy history of ever married women. I searched out from V224 to V243 but could not get the information about total number of terminated pregnancies. Its available only in binary nature (V228, V234).

Can i get total pregnancies by adding all children ever born to a women + total number of pregnancy losses + whether women currently pregnant or not?

I need:

1. Total number of pregnancies
2. Total number of lost pregnancies.
3. Whether the pregnancy resulting in (i) live birth (ii) miscarriage (iii) abortion (iv) spontaneous. Nominal variable

Which file should i adopt for above calculations!
1) BR-Birth Records
2) KR-Kid Records
3) IR-individual women records

Kindly help me for above problems.


Waqas Imran
Re: Pregnancy History [message #9232 is a reply to message #9211] Thu, 25 February 2016 17:37 Go to previous messageGo to next message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear user,
Your query has been forwarded to one of our experts. For your information, these are calendar variables. Take a look at your VCAL variables in the dictionary VCAL_VS3 has the value labels.
Thank you!

[Updated on: Thu, 25 February 2016 17:37]

Report message to a moderator

Re: Pregnancy History [message #9242 is a reply to message #9232] Fri, 26 February 2016 04:42 Go to previous messageGo to next message
waqas is currently offline  waqas
Messages: 35
Registered: June 2015
Location: Islamabad, Pakistan
Member

Thanku liz.

I am using PDHS 2012-13. Calender year variables are not identified here with ids as you mentioned.

Thank You


Waqas Imran
Re: Pregnancy History [message #9245 is a reply to message #9242] Fri, 26 February 2016 09:33 Go to previous messageGo to next message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear User,
Looking at the VCAL variable value labels in CSPro this is what I see:
Calendar (Colum VCAL_VS3
   Birth                                     B
   Pregnancy                                 P
   Abortion                                  A
   Miscarriage                               C
   Still Birth                               S
   Not using                                 0
   Female Sterilization                      1
   Male Sterilization                        2
   IUD                                       3
   Injections                                4
   Implants/Norplant                         5
   Pill                                      6
   Condom                                    7
   Standard day methods (SDM)                8
   Lactational amenorrhea (LAM)              9
   Rhythm - Periodic abstinence              L
   Withdrawal                                M
   Other modern method                       X
   Other traditional                         Y
   Missing                                   ?
Re: Pregnancy History [message #9248 is a reply to message #9211] Fri, 26 February 2016 16:42 Go to previous messageGo to next message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear User,
Here is a response from senior data processing expert, Mr. Guillermo Rojas:
Quote:

In DHS we have two ways of collecting respondents children: A birth history or a pregnancy history. In surveys where we collect birth histories, it isn't possible to deduct the number of pregnancies because we only have terminations (stillbirths, abortions, miscarriages) for pregnancies in the last five years. In surveys with pregnancy histories, to determine the number of pregnancies besides the current pregnancy status, it is important to take into consideration those pregnancies that ended in multiple outcomes (twins, triples, and so on).
Re: Pregnancy History [message #9265 is a reply to message #9248] Mon, 29 February 2016 12:34 Go to previous messageGo to next message
waqas is currently offline  waqas
Messages: 35
Registered: June 2015
Location: Islamabad, Pakistan
Member

A very helpful information shared.

I have another query that was the last part as i mentioned in my first thread on this issue, i.e.,

Whether the pregnancy resulting in (i) live birth (ii) miscarriage (iii) abortion (iv) spontaneous. Nominal variable
Here i wish to have variable with multinomial structure indicating the above four categories explicitly. In PDHS (2012-13) we have a table 5.15, chapter fertility and page number 80. Here the variable is presented in multinomial form. I could not find it in datafiles.

another thing i want to make clear.

Which of the following file will be suitable for taking account of abortion status i.e. (i) live birth (ii) miscarriage (iii) abortion (iv) spontaneous

1. BR File
2. KR File
3. IR File

Thank You


Waqas Imran
Re: Pregnancy History [message #9475 is a reply to message #9265] Wed, 30 March 2016 20:07 Go to previous messageGo to next message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear User,
A response from senior data processing expert, Mr. Guillermo Rojas:
Quote:

This is how that variable is constructed:
If S216 = 1 or S217 = 1 then Live birth
elseIf S216 = 2                then stillbirth
elseIf S218 =1                 then abortion
elseIf S218 <> 1               then miscarriage


Those variables exist in file PKIR61FL, but in that file they have different variables for each child. For example S216_01 for the last child, S216_02 for the next to last and so on. The same applies for S217 and S218. The reason is because we don't have a pregnancy history file, what we have is a birth history (for children born alive) file (BR).

Re: Pregnancy History [message #9910 is a reply to message #9475] Mon, 06 June 2016 05:12 Go to previous messageGo to next message
waqas is currently offline  waqas
Messages: 35
Registered: June 2015
Location: Islamabad, Pakistan
Member

D'r Liz,

I have worked out on file. I have found the S216&1-21 abd S217$1-21 in PKIR61FL File but i did not find the variables S218 there in PKIR61FL.

Variables S216$ provides following information:-
1. Born Alive
2. Born Dead
3. Lost Before Full Term

Can i consider above as:-

1. Born alive = live births
2. Born dead = Still birth
3. Lost Before Full Term = Miscarriage

I AM STILL FINDING SOME INFORMATION ABOUT ABORTION/MISCARRIAGES BECAUSE I COULD NOT FIND THE VARIABLE S218 EVEN IN FLAT (FL) FILES.


WAITING FOR REPORNSE
THANK YOU.


Waqas Imran
Re: Pregnancy History [message #9925 is a reply to message #9910] Mon, 06 June 2016 15:11 Go to previous messageGo to next message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear User,

There was an error in the earlier posting. Here is the proper coding:
Referring to S218 when it should be S228

If S216 = 1 or S217 = 1 then Live birth
elseIf S216 = 2                then stillbirth
elseIf S228 =1                 then abortion
elseIf S228 <> 1             then miscarriage
Re: Pregnancy History [message #9926 is a reply to message #9925] Mon, 06 June 2016 17:13 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
You may also find it useful to look at some of the code in this message. The variable names will differ slightly as it is for a different country (Nepal 2001 in that case), but the concept should be similar. Additionally this example restricts to pregnancies in the last 5 years, so depending on what you are doing, you may want to remove that restriction.
Re: Pregnancy History [message #10043 is a reply to message #9926] Sun, 19 June 2016 13:58 Go to previous messageGo to next message
waqas is currently offline  waqas
Messages: 35
Registered: June 2015
Location: Islamabad, Pakistan
Member

D'r Trever,

I am actually trying to develop some binary variable as below:-
Var1=If still birth=1 and 0 otherwise.
Var2=If miscarriage=1 and 0 other wise.
Var3=if Abortion=1 and 0 otherwise.

and a multinomial response variable as below:-

Var4=Livebirth=0
Var4=Miscarriage=1
Var4=abortion=2
var4=stillbirth=3.

Above outcome is explained in PDHS2013;Chapter Fertility; Page 80 Table 5.15. It is presented there as Pregnancy outcome.

S228 is not developed for Pakistan.


What would be its alternative in PKIR61FL file.

Thanksyou and regards,
Waqas Imran


Waqas Imran
Re: Pregnancy History [message #10045 is a reply to message #10043] Sun, 19 June 2016 23:24 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
S228 does exist in PKIR61FL.

See below code:
cd "C:\DATA\DHS_Stata"
use "PKIR61FL.DTA", clear

* Rename variables to permit reshaping
ren idx97_0* idx97_*
ren ord97_0* ord97_*
ren s2*_0* s2*_*

* keep the variables ytou need - you may need more than this list
keep caseid v001 v002 v003 v005 v008 v013 v024 v025 idx97_* ord97_* s2*_*

* reshape into pregnancies
reshape long idx97_ ord97_ s215_ s216_ s217_ s219_ s220m_ s220y_ ///
  s221_ s222_ s223_ s224_ s225u_ s225n_ s226m_ s226y_ s227_ s228_, i(caseid) j(idx)

* drop underscores (_) from names
ren idx97_ idx97
ren ord97_ ord97
ren s2*_ s2*

* drop empty pregnancies
drop if idx97 == .

* outcome of pregnancy
gen outcome = .
replace outcome = 1 if s216==1 | s217 == 1
replace outcome = 2 if outcome == . & s216 == 2
replace outcome = 3 if outcome == . & s228 == 1
replace outcome = 4 if outcome == . & s228 != 1

lab def outcome 1 "Live birth" 2 "Stillbirth" 3 "Abortion" 4 "Miscarriage"
lab val outcome outcome

tab outcome,m
Re: Pregnancy History [message #10046 is a reply to message #10045] Mon, 20 June 2016 02:22 Go to previous messageGo to next message
waqas is currently offline  waqas
Messages: 35
Registered: June 2015
Location: Islamabad, Pakistan
Member

We have multiple separate viariables for each child against the following:-
idx97_ ord97_ s215_ s216_ s217_ s219_ s220m_ s220y_ ///
s221_ s222_ s223_ s224_ s225u_ s225n_ s226m_ s226y_ s227_ s228_.

Do i need to have to merge all children as below:-

For S215:-

Compute S215=$sysmiss.
If S215$1=1 or S215$2=1 or ..... or S215$21=1 S215=1.
If S215$1=0 or S215$2=0 or ..... or S215$21=0 S215=0.
Exe.

The same above strategies is for other variables.

I am asking above because the STAT codes you provided before showing only one child with addition '_' attribute with each variable.

More over only one entery is there in shared codes but Data file has 21 entries for each of variables mentioned above.

Thank You


Waqas Imran
Re: Pregnancy History [message #10055 is a reply to message #10046] Mon, 20 June 2016 10:29 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
You are misunderstanding the Stata code which converts the dataset from a wide format with multiple pregnancies per woman to a long format where each record is a pregnancy.

Below is the equivalent code in SPSS:

* Open data file.
GET FILE='PKIR61FL.SAV'.

* Reformat pregnancy history from variables to cases.
VARSTOCASES
  /MAKE IDX97 FROM IDX97$01 IDX97$02 IDX97$03 IDX97$04 IDX97$05 IDX97$06 IDX97$07 IDX97$08 IDX97$09 
    IDX97$10 IDX97$11 IDX97$12 IDX97$13 IDX97$14 IDX97$15 IDX97$16 IDX97$17 IDX97$18 IDX97$19 IDX97$20 IDX97$21
  /MAKE ORD97 FROM ORD97$01 ORD97$02 ORD97$03 ORD97$04 ORD97$05 ORD97$06 ORD97$07 ORD97$08 ORD97$09 
    ORD97$10 ORD97$11 ORD97$12 ORD97$13 ORD97$14 ORD97$15 ORD97$16 ORD97$17 ORD97$18 ORD97$19 ORD97$20 ORD97$21
  /MAKE S215 FROM S215$01 S215$02 S215$03 S215$04 S215$05 S215$06 S215$07 S215$08 S215$09 S215$10 
    S215$11 S215$12 S215$13 S215$14 S215$15 S215$16 S215$17 S215$18 S215$19 S215$20 S215$21
  /MAKE S216 FROM S216$01 S216$02 S216$03 S216$04 S216$05 S216$06 S216$07 S216$08 S216$09 S216$10 
    S216$11 S216$12 S216$13 S216$14 S216$15 S216$16 S216$17 S216$18 S216$19 S216$20 S216$21
  /MAKE S217 FROM S217$01 S217$02 S217$03 S217$04 S217$05 S217$06 S217$07 S217$08 S217$09 S217$10 
    S217$11 S217$12 S217$13 S217$14 S217$15 S217$16 S217$17 S217$18 S217$19 S217$20 S217$21
  /MAKE S219 FROM S219$01 S219$02 S219$03 S219$04 S219$05 S219$06 S219$07 S219$08 S219$09 S219$10 
    S219$11 S219$12 S219$13 S219$14 S219$15 S219$16 S219$17 S219$18 S219$19 S219$20 S219$21
  /MAKE S220M FROM S220M$01 S220M$02 S220M$03 S220M$04 S220M$05 S220M$06 S220M$07 S220M$08 S220M$09 
    S220M$10 S220M$11 S220M$12 S220M$13 S220M$14 S220M$15 S220M$16 S220M$17 S220M$18 S220M$19 S220M$20 S220M$21
  /MAKE S220Y FROM S220Y$01 S220Y$02 S220Y$03 S220Y$04 S220Y$05 S220Y$06 S220Y$07 S220Y$08 S220Y$09 
    S220Y$10 S220Y$11 S220Y$12 S220Y$13 S220Y$14 S220Y$15 S220Y$16 S220Y$17 S220Y$18 S220Y$19 S220Y$20 S220Y$21
  /MAKE S221 FROM S221$01 S221$02 S221$03 S221$04 S221$05 S221$06 S221$07 S221$08 S221$09 S221$10 
    S221$11 S221$12 S221$13 S221$14 S221$15 S221$16 S221$17 S221$18 S221$19 S221$20 S221$21
  /MAKE S222 FROM S222$01 S222$02 S222$03 S222$04 S222$05 S222$06 S222$07 S222$08 S222$09 S222$10 
    S222$11 S222$12 S222$13 S222$14 S222$15 S222$16 S222$17 S222$18 S222$19 S222$20 S222$21
  /MAKE S223 FROM S223$01 S223$02 S223$03 S223$04 S223$05 S223$06 S223$07 S223$08 S223$09 S223$10 
    S223$11 S223$12 S223$13 S223$14 S223$15 S223$16 S223$17 S223$18 S223$19 S223$20 S223$21
  /MAKE S224 FROM S224$01 S224$02 S224$03 S224$04 S224$05 S224$06 S224$07 S224$08 S224$09 S224$10 
    S224$11 S224$12 S224$13 S224$14 S224$15 S224$16 S224$17 S224$18 S224$19 S224$20 S224$21
  /MAKE S225U FROM S225U$01 S225U$02 S225U$03 S225U$04 S225U$05 S225U$06 S225U$07 S225U$08 S225U$09 
    S225U$10 S225U$11 S225U$12 S225U$13 S225U$14 S225U$15 S225U$16 S225U$17 S225U$18 S225U$19 S225U$20 S225U$21
  /MAKE S225N FROM S225N$01 S225N$02 S225N$03 S225N$04 S225N$05 S225N$06 S225N$07 S225N$08 S225N$09 
    S225N$10 S225N$11 S225N$12 S225N$13 S225N$14 S225N$15 S225N$16 S225N$17 S225N$18 S225N$19 S225N$20 S225N$21
  /MAKE S226M FROM S226M$01 S226M$02 S226M$03 S226M$04 S226M$05 S226M$06 S226M$07 S226M$08 S226M$09 
    S226M$10 S226M$11 S226M$12 S226M$13 S226M$14 S226M$15 S226M$16 S226M$17 S226M$18 S226M$19 S226M$20 S226M$21
  /MAKE S226Y FROM S226Y$01 S226Y$02 S226Y$03 S226Y$04 S226Y$05 S226Y$06 S226Y$07 S226Y$08 S226Y$09 
    S226Y$10 S226Y$11 S226Y$12 S226Y$13 S226Y$14 S226Y$15 S226Y$16 S226Y$17 S226Y$18 S226Y$19 S226Y$20 S226Y$21
  /MAKE S227 FROM S227$01 S227$02 S227$03 S227$04 S227$05 S227$06 S227$07 S227$08 S227$09 S227$10 
    S227$11 S227$12 S227$13 S227$14 S227$15 S227$16 S227$17 S227$18 S227$19 S227$20 S227$21
  /MAKE S228 FROM S228$01 S228$02 S228$03 S228$04 S228$05 S228$06 S228$07 S228$08 S228$09 S228$10 
    S228$11 S228$12 S228$13 S228$14 S228$15 S228$16 S228$17 S228$18 S228$19 S228$20 S228$21
  /MAKE S229 FROM S229$01 S229$02 S229$03 S229$04 S229$05 S229$06 S229$07 S229$08 S229$09 S229$10 
    S229$11 S229$12 S229$13 S229$14 S229$15 S229$16 S229$17 S229$18 S229$19 S229$20 S229$21
  /MAKE S220C FROM S220C$01 S220C$02 S220C$03 S220C$04 S220C$05 S220C$06 S220C$07 S220C$08 S220C$09 S220C$10 
    S220C$11 S220C$12 S220C$13 S220C$14 S220C$15 S220C$16 S220C$17 S220C$18 S220C$19 S220C$20 S220C$21
  /MAKE S220F FROM S220F$01 S220F$02 S220F$03 S220F$04 S220F$05 S220F$06 S220F$07 S220F$08 S220F$09 S220F$10 
    S220F$11 S220F$12 S220F$13 S220F$14 S220F$15 S220F$16 S220F$17 S220F$18 S220F$19 S220F$20 S220F$21
  /MAKE S225C FROM S225C$01 S225C$02 S225C$03 S225C$04 S225C$05 S225C$06 S225C$07 S225C$08 S225C$09 S225C$10 
    S225C$11 S225C$12 S225C$13 S225C$14 S225C$15 S225C$16 S225C$17 S225C$18 S225C$19 S225C$20 S225C$21
  /MAKE S225F FROM S225F$01 S225F$02 S225F$03 S225F$04 S225F$05 S225F$06 S225F$07 S225F$08 S225F$09 S225F$10 
    S225F$11 S225F$12 S225F$13 S225F$14 S225F$15 S225F$16 S225F$17 S225F$18 S225F$19 S225F$20 S225F$21
  /INDEX=Index1(21) 
  /KEEP=CASEID V001 V002 V003 V005 V008 V013 V024 V025
  /NULL=DROP.

* Create outcome variable.
IF (S216 = 1 OR S217 = 1) outcome = 1.
IF (SYSMIS(OUTCOME) AND S216 = 2) outcome = 2.
IF (SYSMIS(OUTCOME) AND S228 = 1) outcome = 3.
IF (SYSMIS(OUTCOME) AND (MISSING(S228) OR S228 <> 1)) outcome = 4.

VARIABLE LABELS outcome "Pregnancy outcome".
VALUE LABELS outcome 1 "Live birth" 2 "Stillbirth" 3 "Abortion" 4 "Miscarriage".
FORMATS outcome (f1.0).

FREQUENCIES VARIABLES=outcome.

Re: Pregnancy History [message #10058 is a reply to message #10055] Tue, 21 June 2016 02:40 Go to previous messageGo to next message
waqas is currently offline  waqas
Messages: 35
Registered: June 2015
Location: Islamabad, Pakistan
Member

Currently the reshaped file providing the records of 57688 (unweighted) and 56748 (weighted by wt=v005/1000000) pregnancies.

Currently there are 14350 pregnancies ending in five years preceding the survey in Table 5.15; page 80; Chapter Fertility; PDHS 2013.
How can i achieve 14350 pregnancies?

Thank you.


Waqas Imran
Re: Pregnancy History [message #10061 is a reply to message #10058] Tue, 21 June 2016 10:55 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
compute timesincepreg = v008 - s220c.
then filter on timesincepreg < 60 months
Re: Pregnancy History [message #10064 is a reply to message #10061] Tue, 21 June 2016 13:43 Go to previous messageGo to next message
waqas is currently offline  waqas
Messages: 35
Registered: June 2015
Location: Islamabad, Pakistan
Member



I learned alot from your support. Kindly tell me your full name so that i may acknowledge your name under acknowledgement heading of my paper.



Thank You so much.


Waqas Imran
Re: Pregnancy History [message #10066 is a reply to message #9211] Tue, 21 June 2016 15:20 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
Trevor Croft - see https://www.youtube.com/watch?v=4Gzd9PfqRA8
Re: Pregnancy History [message #10601 is a reply to message #10045] Mon, 15 August 2016 22:46 Go to previous messageGo to next message
chr8850
Messages: 20
Registered: July 2016
Member
Hi Trevor,
I was trying to generate a file of pregnancies using the Pakistan 2012-13 DHS and have replicated the code you provided in this thread using IR data but have also restricted to all pregnancies in the five years preceding the survey. I have pasted below the summary of pregnancy outcomes I get and additional code i ran. When I look at only pregnancies of 7 months or more I still get some miscarriages included and the number of stillbirths does not match what is in the DHS report (387 instead of 412). Any advice on what i might have done incorrectly or am missing? Thanks

keep if s220c > v008-60

tab pregoutcome [iw=v005/1000000]

pregoutcome | Freq. Percent Cum.
------------+-----------------------------------
Live birth | 11,977.381 83.47 83.47
Stillbirth | 399.217658 2.78 86.25
Abortion | 247.508767 1.72 87.98
Miscarriage | 1,725.5345 12.02 100.00
------------+-----------------------------------
Total | 14,349.642 100.00


ta pregoutcome if s227 >=7 [iw=v005/1000000]

pregoutcome | Freq. Percent Cum.
------------+-----------------------------------
Live birth | 11,977.381 96.58 96.58
Stillbirth | 386.60506 3.12 99.70
Abortion | 3.03187 0.02 99.72
Miscarriage | 34.470525 0.28 100.00
------------+-----------------------------------
Total | 12,401.489 100.00
Re: Pregnancy History [message #10774 is a reply to message #10601] Sat, 10 September 2016 18:24 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
Yes, there are inconsistencies in the reporting of the outcome and the duration of pregnancy, with some pregnancies reported as ending with miscarriages at 7 months or more, and some pregnancies reported as stillbirths, but with a duration of only a couple of months. These are almost certainly reporting errors, but the data have not been edited to remove them. You will need to decide how you want to handle them in your analysis.

If you compare the numbers in your first table above with those in table 5.15 then the results match. I suspect though that you are comparing to table 8.5. This table is produced in a very different way, based on the calendar data, and following the approach used in most DHS that do not use a pregnancy history. In these surveys, stillbirths are calculated based on reported duration of pregnancy in the calendar of 7 months or more. Based on your second table above, that would be 424 births. However table 8.5 reports just 412 births. Because of the way the calendar is collected, some stillbirths are not included in the calendar, and thus table 8.5 may slightly undercount stillbirths. The calendar only permits one code to be captured in each month of the calendar. In the case of stillbirths, if there are twins and one is a stillbirth and one a live birth, then only the live birth is captured in the calendar. Similarly if the pregnancy was twins and both were stillbirths, then again, only one stillbirth is captured in thye calendar. Thus in these two cases, stillbirths would be missed and not counted in the numbers in table 8.5
Re: Pregnancy History [message #10852 is a reply to message #10774] Sun, 25 September 2016 00:49 Go to previous messageGo to next message
chr8850
Messages: 20
Registered: July 2016
Member
Thanks so much for all of that info Trevor. Is it usual practice to code any fetal deaths where the gestational age (s227) is unknown as a miscarriage?
Based on the following code on another forum (msg #10623). Why does DHS not just drop these deaths rather than code as miscarriage?

gen type = .
replace type = 1 if s216==1 | s217==1
replace type = 2 if type==. & s227 >= 7 & s227 < 98
replace type = 3 if type==. & (s227 < 7 | s227 >= 98) & s228 == 1
replace type = 4 if type==. & (s227 < 7 | s227 >= 98)
lab def type 1 "Live birth" 2 "stillbirth" 3 "Abortion" 4 "Miscarriage"
lab val type type
lab var type "Type of pregnancy"
Re: Pregnancy History [message #10876 is a reply to message #10852] Tue, 27 September 2016 14:46 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
There are only 16 cases that are missing on s227 - depending on which piece of code you use, these may be treated differently. For most purposes, it won't affect the results in any significant way, and DHS tends to include the relatively small number of missing cases for simplicity and consistency of denominator, but we are typically only presenting simple crosstabs. An alternative would be to exclude these cases, but they would not make much difference. If you are conducting a more complicated analysis then you should make your own decision about how best to categorize those cases with missing data.
Re: Pregnancy History [message #12304 is a reply to message #10045] Thu, 27 April 2017 08:35 Go 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


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


Current Time: Sat Dec 28 03:49:41 Coordinated Universal Time 2024