The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » 2017 Ghana Maternal Health Survey (Total Pregnancy Outcomes)
2017 Ghana Maternal Health Survey [message #16558] Thu, 24 January 2019 15:49 Go to next message
ebanchani is currently offline  ebanchani
Messages: 4
Registered: January 2019
Member
I have some few some issues with the recent 2017 Ghana Maternal Health Survey. The variable (total pregnancy outcomes) in the Stata version (q208b) in the individual raw data which I assume refers all pregnancies a woman has ever had (sample = 18,116). In the children's raw data, there is a similar variable (pregout) also referring to pregnancy outcomes (sample = 19,324). If I merge the child raw data to the individual raw data, the sample is 19,324 as in the child's raw data. So if these two variables represent the total number of pregnancies a woman has ever had and now I want to limit the total number of pregnancies to 5 years preceding the survey (2012 - 2017). How do I go about this?

Your timely response will be very helpful.
Re: 2017 Ghana Maternal Health Survey [message #17824 is a reply to message #16558] Tue, 18 June 2019 12:09 Go to previous messageGo to next message
lmallick is currently offline  lmallick
Messages: 3
Registered: June 2019
Member
Dear user,

You will need to use the BQ file, which is typically the raw births record file. In the case of the Ghana Maternal Health Survey, it houses the pregnancy history. The unit of analysis in this file is pregnancies. If you are seeking to identify the pregnancies in the last 5 years, you can use the code below. Please note that in the coming weeks, The DHS Program will release a recode file which may be easier to work with.

use GHBQ7IFL.DTA, clear

*generate weight
gen wt = qweight/1000000

*time in months since birth/termination using cdc
gen pregend = int((qintcd - q215cd)/ 30.4375)

*all pregnancies that occured in the last 5 years
gen pregall5yr = 1 if pregend <60

However, if you want to examine only the pregnancies that resulted in a live or still birth and were the most recent live or stillbirth (in order to match tables in Chapter 5, you would need to go a few extra steps.

*all pregnancies in the last 5 years that resulted in a live or stillbirth
gen pregbirth5yr = 1 if pregall5yr ==1 & pregout <3

*most recent pregnancies in the last 5 years that resulted in a live or stillbirth
*this is to match the tables in Chapter 5
*first create a variable that is the total number of children born alive or still born
egen maxbirth = max(q212) if pregout<3, by(qline qhnumber qhclust)

*then flip the variable so 1 is the most recent birth
gen flipq212= (1 + maxbirth) - q212

*if pregnancy ended in a live or stillbirth in the last 5 years
gen birth5yrmr = 1 if pregbirth5yr ==1 & pregout <3 & flip==1

ta birth5yrmr [iw=wt]


*the denominator for most tables in chapter 5
*will need to limit to two years (if pregend <24) for postnatal care questions


Thank you,
Lindsay Mallick
Lead Research Analyst
The DHS Program
  • Attachment: BQ raw.do
    (Size: 1.10KB, Downloaded 33 times)
Re: 2017 Ghana Maternal Health Survey [message #17825 is a reply to message #17824] Tue, 18 June 2019 14:44 Go to previous messageGo to next message
ebanchani is currently offline  ebanchani
Messages: 4
Registered: January 2019
Member
Thank you very much for this response. I want to clarify one more thing. Does this syntax also applies to the number of abortions, miscarriages, and stillbirths in the last 5 years?
Re: 2017 Ghana Maternal Health Survey [message #17826 is a reply to message #17825] Tue, 18 June 2019 15:37 Go to previous messageGo to next message
lmallick is currently offline  lmallick
Messages: 3
Registered: June 2019
Member
The variable called pregall5yr would include all pregnancies in the last 5 years. You could cross tabulate pregall5yr with pregout and find out the number and percent of pregnancies ending in each potential outcome.

tab pregall5yr pregout [iw=wt], row freq
Re: 2017 Ghana Maternal Health Survey [message #17899 is a reply to message #16558] Tue, 09 July 2019 15:45 Go to previous messageGo to next message
ebanchani is currently offline  ebanchani
Messages: 4
Registered: January 2019
Member
Hello,

I still have some follow up questions on the 2017 Ghana Maternal Health Survey:

Q1. If I merge the raw births record file to the individual record file and then limit all pregnancy in the last 5 years and then apply the tab pregall5yr pregout [iw=wt], row freq for the number of pregnancy outcomes for the last 5 years (abortion, miscarriage and stillbirth). I want to create similar variables in the individual record file (q207a, q207b, q207c, q207d, q207e, q207f) for the last five years). Is there a way to create binary variables (0=No, 1=Yes) for abortion, miscarriage, and stillbirths in the last 5 years using the pregout variables). How to I create similar variables for (q207b q207d q207f) for pregnancies in the last 5 years?

Q2. What is the difference in the questions in the individual record file (q207b, q207d, q207f) and (q224a q224ay q224b q224by q224d)? Which ones are the index abortion, miscarriage, and stillbirth?

Q3. Is it possible to calculate the duration (weeks or months) of each pregnancy in the last 5 years to create a variable called "Preterm birth" (0=less than 37 weeks, 1= above 37 weeks).

Thank you.
Re: 2017 Ghana Maternal Health Survey [message #17905 is a reply to message #17826] Thu, 11 July 2019 13:18 Go to previous message
ebanchani is currently offline  ebanchani
Messages: 4
Registered: January 2019
Member
Hello,

I still have some follow up questions on the 2017 Ghana Maternal Health Survey:

Q1. If I merge the raw births record file to the individual record file and then limit all pregnancy in the last 5 years and then apply the tab pregall5yr pregout [iw=wt], row freq for the number of pregnancy outcomes for the last 5 years (abortion, miscarriage and stillbirth). I want to create similar variables in the individual record file (q207a, q207b, q207c, q207d, q207e, q207f) for the last five years). Is there a way to create binary variables (0=No, 1=Yes) for abortion, miscarriage, and stillbirths in the last 5 years using the pregout variables). How to I create similar variables for (q207b q207d q207f) for pregnancies in the last 5 years?

Q2. What is the difference in the questions in the individual record file (q207b, q207d, q207f) and (q224a q224ay q224b q224by q224d)? Which ones are the index abortion, miscarriage, and stillbirth?

Q3. Is it possible to calculate the duration (weeks or months) of each pregnancy in the last 5 years to create a variable called "Preterm birth" (0=less than 37 weeks, 1= above 37 weeks).

Q4. If I merge the raw births record file to the individual record file, and I do a cross tab of the year of most recent abortion (q501)for raw birth recode file and could decide on your own to get an abortion (q578_1) for individual file, there is nothing the q578_1.

Thank you.
Previous Topic: Additional versions in Zip File
Next Topic: Stata weights vs CSPro weights
Goto Forum:
  


Current Time: Mon Jul 22 08:58:17 Eastern Daylight Time 2019