Calculating fertility rates [message #107] |
Tue, 26 February 2013 09:55 |
DHS user
Messages: 111 Registered: February 2013
|
Senior Member |
|
|
I'm working on estimating several indicators using the DHS including age-specific fertility rates; total fertility rates. I've been using the Guide to DHS Statistics which has been really helpful. However, I've been unable to match the indicators I'm generating with the indicators in the DHS reports. My numbers are very close but not the same.
Do you have any resources on how to calculate these indicators particularly in Stata? Or any advice on how to use the weights for this data?
|
|
|
Re: Calculating fertility rates [message #207 is a reply to message #107] |
Tue, 26 March 2013 16:22 |
Reduced-For(u)m
Messages: 292 Registered: March 2013
|
Senior Member |
|
|
Not sure if these suggestions will help, but thought I'd mention a couple of tricky parts.
First, did you divide all the weights by 1000000? It shouldn't make much of a difference, but I think it could lead to mathematically slightly different answers if Stata is trying to deal with really big weight numbers. Also, how are you actually weighting these? (I don't really know exactly how you should, other than it might involve the all woman factor, but seems like you'd have to re-calculate the denominator and numerator by summing across woman-years times weight instead of just the woman-years).
Second, getting the timing so that women-years are properly balanced between age-groups is tricky. The DHS method seems to truncate age to age-in-round-years, so maybe you are rounding differently than they do.
Third, there is another approach to calculating TFRs (and age-specific rates) that is a "person period" approach. You can find a discussion here http://paa2012.princeton.edu/papers/122446 but I don't think the package is totally ready yet (once it is, that will be handy). This will almost certainly not return the DHS numbers, and the interpretation is probably slightly different, but it's not clear to me that the DHS numbers are in any sense "better" than what you'd get from this method.
In general, it seems to be pretty hard to get exactly the numbers that the DHS gets. If yours are not meaningfully different (economically/epidemilogically/etc) from the published ones, it might just be an alogrythm thing about how Stata computes things and uses weights.
If you post a .do file, I might be able to take a look. I've found the process difficult myself, and maybe I could learn something from how you are trying to do it. Hope something here was helpful.
|
|
|
Re: Calculating fertility rates [message #499 is a reply to message #207] |
Thu, 30 May 2013 09:51 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
Hello - I prepared a Stata module (called tfr2) to compute fertility rates in a variety of ways. It was developed to be used mainly with DHS data, so the default options allow computing fertility rates like in DHS very easily (and the results - if you choose the default options - will be the same as in the DHS reports).
The module and the paper presenting it can be downloaded from the Demographi Research journal's website (http://www.demographic-research.org/volumes/vol28/38/).
Best regards,
Bruno
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
Re: Calculating fertility rates [message #3876 is a reply to message #3859] |
Fri, 27 February 2015 03:19 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
SAS and SPSS syntaxes for fertility rates used to be available on the DHS website - but I cannot find them anymore.
Beso,
Bruno
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
|
Re: Calculating fertility rates [message #4434 is a reply to message #107] |
Tue, 26 May 2015 12:25 |
annfitz
Messages: 5 Registered: April 2015
|
Member |
|
|
Hi i downloaded the program tfr2 , and ran againgst the kenya 2008 data file in stata, using stat12 , unfortunately i did not match the results in the report, can anyone advise whether they have been able to match the fertility rates as shown, thanks
Dr Ann fitzmaurice
|
|
|
Re: Calculating fertility rates [message #4436 is a reply to message #4434] |
Tue, 26 May 2015 14:34 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
Hi,
have you used the individual recode data file (KEIR52FL)?
This is the result I get when running tfr2 with that file - and they match perfectly the rates published in the Kenya report (p.47).
Best,
Bruno
. tfr2
weight variable is v005
Preparing table of events and exposure for 3 year(s) preceding the survey
Period covered: 12/2005 to 11/2008
Central date is 2007.4636
Number of cases (women): 8421
Number of person-years (weighted): 23658.801
Number of events (weighted): 3609.3125
ASFRs - TFR
events Coef. Std. Err. z P>z [95% Conf. Interval]
Rate_1519 .1029641 .0043925 23.44 0.000 .0943549 .1115733
Rate_2024 .2378978 .007007 33.95 0.000 .2241644 .2516313
Rate_2529 .2155345 .0071216 30.26 0.000 .2015764 .2294926
Rate_3034 .1751397 .0073817 23.73 0.000 .1606718 .1896076
Rate_3539 .1178257 .0068037 17.32 0.000 .1044907 .1311607
Rate_4044 .0504861 .004728 10.68 0.000 .0412194 .0597528
Rate_4549 .011841 .0031293 3.78 0.000 .0057076 .0179743
TFR 4.558445 .0793782 57.43 0.000 4.402866 4.714023
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
Re: Calculating fertility rates [message #10805 is a reply to message #4436] |
Mon, 19 September 2016 04:38 |
mianrashid
Messages: 13 Registered: February 2016 Location: Pau, France
|
Member |
|
|
Dear Sir,
I want to calculate TFR of Pakistan DHS 2012-2013, as well as by place of residence, Region/Provincial background, level of education and by wealth status. Please let me know the command which if have to use to calculate this in TFR2 module package by bruno?
Thanks you.
MianRashid
|
|
|
|
Re: Calculating fertility rates [message #10809 is a reply to message #10805] |
Mon, 19 September 2016 09:00 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
Hello,
tfr2 computes rates for the 3 preceding years by default.
Just typing tfr2 will thus compute the rates for the three years preceding the survey
Actually, it is a shortcut for:
tfr2 [pw=v005], dates(v008) bvar(b3*) wb(v011) len(3) ageg(5) awf(awfactt)
In Pakistan, you should be careful to use the correct all-women factors for sub-populations.
For instance, to compute rates for rural and urban areas, you can use the following command
by v025, sort: tfr2, awf(awfactu)
If you want to compute these rates for a 5- year period, it would become
by v025, sort: tfr2, len(5) awf(awfactu)
Best, Bruno
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
Re: Calculating fertility rates [message #11061 is a reply to message #11060] |
Mon, 24 October 2016 04:12 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
Hello,
You can download it directly from Stata by typing
ssc install tfr2
Best regards,
Bruno
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
Re: Calculating fertility rates [message #11063 is a reply to message #11062] |
Mon, 24 October 2016 07:42 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
Thank you,
Can you send the syntax and the output ?
Did you use the Individual Recode data file ?
Bruno
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
|
Re: Calculating fertility rates [message #11069 is a reply to message #11066] |
Mon, 24 October 2016 10:00 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
You should use UGIR60FL.DTA as below.
Bruno
. use "C:\12.DATA\DHS\IR\UGIR60FL.DTA", clear
. tfr2
weight variable is v005
Preparing table of events and exposure for 3 year(s) preceding the survey
Period covered: 8/2008 to 7/2011
Central date is 2010.1378
Number of cases (women): 8634
Number of person-years (weighted): 23918.096
Number of events (weighted): 4916.5352
ASFRs - TFR
events Coef. Std. Err. z P>z [95% Conf. Interval]
Rate_1519 .1344827 .0048509 27.72 0.000 .1249751 .1439904
Rate_2024 .3132275 .008087 38.73 0.000 .2973772 .3290778
Rate_2529 .2914675 .0082319 35.41 0.000 .2753333 .3076017
Rate_3034 .2323487 .0085758 27.09 0.000 .2155404 .249157
Rate_3539 .1716094 .0077221 22.22 0.000 .1564743 .1867444
Rate_4044 .0742423 .0063143 11.76 0.000 .0618665 .0866181
Rate_4549 .0230467 .0043584 5.29 0.000 .0145044 .031589
TFR 6.202124 .0933726 66.42 0.000 6.019117 6.385131
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
|
|
Re: Calculating fertility rates [message #11081 is a reply to message #11078] |
Tue, 25 October 2016 06:54 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
I think there are limited data on abortion in the Uganda 2011 DHS, but no pregnancy history.
Bruno
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
Re: Calculating fertility rates [message #13247 is a reply to message #13246] |
Mon, 09 October 2017 02:42 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
Hello,
You should use the individual recode data file (IAIR52FL.dta), and not the BR file.
Below are the results you get - which are the same as the ones in Table 4.1 of the report.
Best regards,
Bruno
. use IAIR52FL.dta, clear
. tfr2
weight variable is v005
Preparing table of events and exposure for 3 year(s) preceding the survey
Period covered: 3/2003 to 2/2006
Central date is 2004.7274
Number of cases (women): 124148
Number of person-years (weighted): 350470.53
Number of events (weighted): 33513.922
ASFRs - TFR
------------------------------------------------------------ ------------------
events | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+---------------------------------------------- ------------------
Rate_1519 | .0903105 .0011011 82.02 0.000 .0881523 .0924686
Rate_2024 | .2093305 .0017732 118.05 0.000 .2058551 .2128059
Rate_2529 | .1387952 .0015334 90.52 0.000 .1357899 .1418006
Rate_3034 | .0623592 .0010966 56.87 0.000 .0602099 .0645085
Rate_3539 | .0247464 .0007418 33.36 0.000 .0232925 .0262002
Rate_4044 | .007229 .0004504 16.05 0.000 .0063462 .0081118
Rate_4549 | .0029555 .0004062 7.28 0.000 .0021593 .0037517
TFR | 2.678631 .0148564 180.30 0.000 2.649513 2.70775
------------------------------------------------------------ ------------------
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
|
|
Re: Calculating fertility rates [message #17996 is a reply to message #17995] |
Mon, 12 August 2019 10:34 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
Hello,
For the most recent DHS, you can use the following syntax to compute the TFR and the standard error of the TFR by district, and to save them to an excel file. In this example, I compute it for 5-year windows to reduce standard errors.
I cannot tell you if these district-level estimates are trustworthy; you should look at the confidence intervals, documentation on sampling, etc.
For the 1999 Indian DHS, you would need to use an all-women factor, and to my knowledge they are not available for at the district level in the data file. You could compute them yourself, but there may be a good reason for not making them available in the data file.
Best regards,
Bruno
****
use "IAIR74FL.DTA", clear
putexcel set "tfr2_district.xls", replace
putexcel A1=("District") B1=("TFR") C1=("S.E.")
levelsof sdistri, local(levels)
local i=1
foreach d of local levels {
tfr2 if sdistri==`d', len(5) norates
local i=`i'+1
putexcel A`i'="`d'" B`i'=_b[TFR] C`i'=_se[TFR]
}
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
Re: Calculating fertility rates [message #26209 is a reply to message #26207] |
Thu, 16 February 2023 09:19 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
Hello,
Fertility rates in DHS reports are usually computed for the 3 years preceding the survey.
you should use the option len(3) instead of len(5). I did a quick comparison for a few sates, and my results match the figures in the report in the states I checked.
tfr2 if v024==`d', len(3) norates
Best regards.
Bruno Schoumaker
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
|
|
|
Re: Calculating fertility rates [message #28836 is a reply to message #28830] |
Mon, 18 March 2024 05:20 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
Hello,
Which files did you use ? Did you use individual recode data files ? Did you just append them, and ran tfr ? Or did you do something else ?
In general, I would not recommand using tfr2 on a multicountry file. If you send me more information, I can look at it.
In any case, you would have to be careful about
- the use of the correct files (IR)
- the dates of the surveys which will differ - and would need to be taken care of.
- the weights, especially if you want to account for different population sizes.
- possibly the use of all-women factors, which may be necessary in some surveys and not in others.
Best regards,
Bruno Schoumaker
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|
|
Re: Calculating fertility rates [message #28843 is a reply to message #28842] |
Mon, 18 March 2024 13:38 |
schoumaker
Messages: 65 Registered: May 2013 Location: Belgium
|
Senior Member |
|
|
Thank you for your reply. I think you should avoid doing this with tfr2, which was not conceived for this type of analyses.
Given that the survey dates differ may widely (even with the most recent surveys), your fertility rates will refer to different periods. Moreover, the Ethiopia survey uses another calendar, that needs to be takes into account. In addition, if you want to obtain fertility rates for the entire set of countries, youd would need to compute and use weights that reflect the size of the women's population in these countries.
Maybe a more careful approach would be to use tabexp to compute the number of births and exposure by age groups, for each survey separately, and combine them afterwards (with weights, and having in mind that they refer to different time periods). tabexp (and tfr2) also allow defining the end year of the estmation period. For instance, if you want compute rates for the 3 years up to 2019 (included), you can use tfr2, length(3) endy(2019), or tabexp, length(3) endy(2019). This makes it possible to compute rates for the same time periods in various surveys, but you would lose some cases at higher ages in some surveys.
Best regards,
Bruno
Bruno Schoumaker
Centre for Demographic Research
Université catholique de Louvain
|
|
|