The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Duration of Pregnancy (b20 or b21)
Duration of Pregnancy [message #29288] Wed, 22 May 2024 16:28 Go to next message
Kedbaah is currently offline  Kedbaah
Messages: 3
Registered: November 2022
Member
I am currently working on a project that involves categorizing children as either preterm or full-term using the KR recode file of the 2022 Ghana Demographic and Health Survey (GDHS) data. I have encountered two recode variables that pertain to the duration of pregnancy: b20 and b21. Specifically:

b20 represents the duration of pregnancy in months.
b21 appears to represent the duration of pregnancy.

For accuracy and standardization, I prefer to measure the duration of pregnancy in weeks. However, I am facing some challenges in this conversion process:

Using b21:

I initially tried converting b21 to weeks by dividing by 7. This resulted in all children being categorized as preterm, with a maximum recorded pregnancy duration of 30 weeks.
When I divided b21 by 5, the maximum duration became 42 weeks (equivalent to 10.5 months), which seems more plausible.

Using b20:
I noted from the GDHS questionnaire in the final report that the duration of pregnancy was initially reported in weeks and then multiplied by 0.23, with the result rounded to the nearest whole number.
Given these observations, I am seeking guidance on the following:

Optimal Use of b21 or b20: How can I accurately use b21 (if feasible) or b20 for classifying preterm and full-term infants without introducing bias into my analysis?
Correct Conversion Method: What would be the best approach to convert these variables to weeks, ensuring accurate categorization of preterm (less than 37 weeks) and full-term (37 weeks or more) births?
I appreciate any assistance or recommendations you can provide to help me correctly categorize the infants in my study.

Thank you for your support.
Re: Duration of Pregnancy [message #29294 is a reply to message #29288] Thu, 23 May 2024 08:38 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member
Following is a response from Senior DHS Staff members, Tom Pullum and Trevor Croft:

b20 is a recode of b21. b21 is one of many three-digit DHS variables that are coded as a combination of units (the first digit) and number (the next two digits). The first digit is 1 for weeks and 2 for months. To see how b20 is constructed as a recode of b21, I recommend that you open the BR file and enter "tab b21, summarize(b20)". You will get a list showing the correspondence between b20, which is interpreted as completed months, and b21, which can be either weeks or months.

Thus, b21 is in weeks or months, and it is converted to b20, in months. If you want completed weeks, you will have some slippage--that is, some ambiguity. The way we measure time could be a boring topic for some people, but for demographers it is both fascinating and a nightmare. A month has an average of 365.25/12 = 30.4375 days. A week has 7 days, so there are 30.4375/7 = 4.35 weeks in a month. Unfortunately, 4.35 is not 4. If you look at the results of "tab b21, summarize(b20)", or "tab p21, summarize(p20)" in the NR file, you will see that months 7 and 8 have 4 weeks, but month 9 has 5 weeks, because 4.35 is not 4.

You could estimate the number of weeks with the following lines:

tab b21, summarize(b20)
gen     unit=2 if b21<.
replace unit=1 if b21<200
gen     number=b21-200 if unit==2
replace number=b21-100 if unit==1
gen     weeks=int(4.35*number) if unit==2
replace weeks=number           if unit==1
tab b21, summarize(weeks)

In place of 4.35 you can use 365.25/84. Hope this construction is clear and hope it helps.

[Updated on: Thu, 23 May 2024 11:23]

Report message to a moderator

Re: Duration of Pregnancy [message #29296 is a reply to message #29294] Thu, 23 May 2024 09:52 Go to previous message
Kedbaah is currently offline  Kedbaah
Messages: 3
Registered: November 2022
Member
This very clear and helpful. Thank you very much!!!
Previous Topic: DHS 5 India dataset IR file-r900 error
Next Topic: Women who gave birth in the last 2 years
Goto Forum:
  


Current Time: Tue Nov 26 22:56:56 Coordinated Universal Time 2024