help for tabexp

Title

tabexp -- Table of births and exposure from birth history data

-- Please report problems and send comments and suggestions to bruno.schoumaker@uclouvain.be

Table of contents

Syntax
Description
Options
Examples

Acknowledgments
Citing tabexp
References
Disclaimer
Author

Syntax

tabexp [ varlist ] [ if exp ]
[ pweight = exp ]
[ , options ]

options summary default

Main
bvar(varlist) names of birth variables b3_01 to b3_20 (or lower)
length(integer) length of the period covered (years) 3
dates(var) date of survey (CMC) v008
wbirth(var) date of birth of woman (CMC) v011
ageg(integer) size of age groups (years) 5
Options
cluster(var) cluster identifiers - jackknife
awf(var) all women factor awfactt
trend(integer) time interval for the preparation of the table by periods (years)
minage(integer) minimum age for the table (years) 15
maxage(integer) maximum age for table (years) 49
endy(integer) defines the last year of the estimation period
entry(var) date of entry in the risk set (e.g. marriage for marital fertility rates) in CMC
frm uses fractional months (day of birth is randomly attributed to women and children)
cyears events and exposure rates computed over calendar years
rates displays fertility rates and their standard errors
Saving options
savetab(filename) saves table of births and exposure in a Stata file
Other options
force replaces the data set in the memory by the table of events and exposure
nodis results are not displayed
dv displays the name of the variables used by tabexp

by is allowed with tabexp.

xi is allowed with tabexp.

pweight is allowed with tabexp. By default, v005 is used as the weighting variable (name of weights in DHS).

Note that tabexp will work under Stata 10.0 onward.

Description

tabexp is a program for preparing tables of births and exposure from birth histories. It is conceived to be used
with individual recode files of Demographic and Health Surveys (DHS), but it can be used with any data file organized in the same way as a DHS file (see example with WFS data below).

tabexp can be used to prepare tables of births and exposure to replicate results published in DHS reports (http://www.measuredhs.com/help/Datasets/Age-Specific_Fertility_Rates.htm).

The data file must be organized using the following principles : (1) each line corresponds to a woman. (2) the dates of births (in CMC) of all the children are recorded in seperate variables (e.g. b3_01 b3_02...b3_20).
This is the way birth histories are organized in DHS standard recode data files.

All dates should be in Century Month Code (CMC).

The following table illustrates the data of a birth history in a DHS. v008 is the date of the survey, v011 is the date of birth of the woman, and b3_01, b3_02,... are the dates of births of all the children.

The order of births does not matter.

+
+
| id v008 v011 b3_01 b3_02 b3_03 ...|
|
|
| 1 1050 491 1004 943 935 |
| 2 1048 795 1011 . . |
| 3 1047 708 946 . . |
| 4 1050 833 . . . |
+
+

tabexp computes events and exposure on periods defined in various ways (e.g. 3 years before the survey, 5 years before the survey,
last 5 calendar years...).

Events and exposure are computed between exact ages (in rectangles of Lexis diagrams). By default, they are computed for periods defined as "years preceding the survey", but they can be estimated by calendar years (cy).

tabexp can include covariates, and can also be used to prepare tables of births and exposure to compute fertility trends (trend).

Options

Contents

Main
Options
Save options
Graph options

Main options

bvar(varlist) indicates the name of the variables containing the birth dates of the children.
if not indicated, b3* is used as the variable names. The birth dates of children should be
in CMC.

length(#) indicates the length of the period for the preparation of the table.
By default, the length is equal to 3 years.

dates(varname) is a variable containing the date of the survey (in CMC). By default, v008 is used. Some months can be subtracted from the date of the survey. For instance, instead of using dates(v008), one can use dates(v008-36).

wbirth(varname) is a variable containing the date of birth of women (in CMC). By default, v011 is used.

ageg(#) is the size of age groups for the computation of births and exposure. By default, 5-year age groupes are used.

Options

cluster(varname) indicates the name of the variable containing the identifiers of the primary sampling units. This is used by tfr2 to compute standard errors with the jackknife method.

awf(varname) indicates the name of the variable containing the "all women factor" to be used. This is necessary in surveys where only
ever married women were interviewed (e.g. Bangladesh, Pakistan,...). By default, the variable awfactt is used if it is found in the data file.

trend(#) is used to compute tables for separate periods. The integer indicates the size of the intervals for computing births and exposure. For instance, a value of 1 means that
births and exposure are computed by 1-year intervals. If trend is used, it should be lesser or equal than length.

minage(#) is used to set the minimum age to compute births and exposure. The default value is 15.

maxage(#) is used to set the maximum (completed) age to compute births and exposure. The default value is 49.

endy(#) is used to define the last year of the estimation period. It overrides dates if both are used.

entry(varname) is used to compute births and exposure after a date (that may vary across individuals). For instance, it can be used to compute births and exposure in marriage, by including the date of marriage (in CMC).

cyears is used to compute births and exposure over calendar years. By default, they are computed for years preceding the survey.

rates computes fertility rates (births/exposure) and their standard errors [rate/root(births)].

Save options

savetable saves the table of births and exposure in a Stata file. To overwrite an existing file, use savetable(filename, replace).

Other options

force replaces the data set in the memory by the table of events and exposure.

nodis results are no displayed.

dv displays the names of the variables used by tabexp. This is useful for checking that the correct variables are used.

Examples with DHS data

Individual recode data files can be obtained from MeasureDHS (www.measuredhs.com).
Once you have downloaded the individual recode Stata file for a survey, open it:

. use KEIR51FL.DTA, clear

This opens the file of the 2008 Kenya DHS.

tabexp can then be used to prepare a table of births and exposure.

Table for last x years before the survey

. tabexp

Births and exposure (5-year age groups) for the 3 years preceding the survey.

This is equivalent to

. tabexp [pweight=v005], ageg(5) len(3) wb(v011) dates(v008) awf(awfactt)

Births and exposure (5-year age groups) for the 3 years preceding the survey.

. tabexp, len(5)

Births and exposure (5-year age groups) for the 5 years preceding the survey.

. tabexp, len(1)

Births and exposure (5-year age groups) for the year preceding the survey.

. tabexp, ageg(1)

Births and exposure (by single year) and TFRs for the 3 years preceding the survey.

. tabexp, force

Births and exposure (5-year age groups) for the year preceding the survey, replaces the data file in memory.

Births and exposure for x calendar years before the survey

. tabexp, len(4) cy

Births and exposure (5-year age groups) for the 4 calendar years preceding the survey
(if the survey was conducted in 1999 - computed for the period 1995-1998)

Births and exposure for last x years before the survey by cluster

. tabexp, len(3) cluster(v001)

Births and exposure (5-year age groups) for the 3 years preceding the survey by variable v001 (cluster identifier).

Births and exposure for last x specific calendar years

. tabexp, len(3) endy(1999)

Births and exposure (5-year age groups) for the 3-year period ending in 1999.
Births and exposure are computed for the period from 1/1997 to 12/1999.

Births and exposure in marriage for the x years preceding the survey

. tabexp, len(5) entry(v509)

Marital ASFRs (5-year age groups) and TFRs for the 5 years preceding the survey.

Births and exposure by periods

Births and exposure by calendar years for x calendar years before the survey

. tabexp, len(15) trend(1) cy

Births and exposure (5-year age groups) for the 15 calendar years preceding the survey.

Births and exposure by calendar years for x calendar years before the survey between ages 20 and 39

. tabexp, len(15) trend(1) mina(20) maxa(39) cy

Births and exposure (5-year age groups) for the 15 calendar years preceding the survey.

Explanatory variables

Births and exposure (5-year age groups) for x calendar years before the survey by categories of a variable

. tabexp v106

Births and exposure (5-year age groups) for the 3 years preceding the survey by category of v106 (using one variable with original labels).

. tabexp v025, awf(awfactu)

Same as in previous example, but the 'all women factor' is used for rural-urban comparisons.

. xi: tabexp i.v106

Births and exposure (5-year age groups) for the 3 years preceding the survey by category of v106 (using dummy coding).

Saving files and displaying graph

Births and exposure for x calendar years before the survey saved in a Stata file

. tabexp, len(15) trend(1) cy gt savetab(c:\table, replace)

Births and exposure for the 15 calendar years preceding the survey, saved in a file.

Examples with WFS data

Births and exposure for last 3 years before the survey by single year of age

. use http://data.princeton.edu/eco572/datasets/cofertx, clear
. tabexp, dates(v007) wb(v008) bvar(b0*2 b1*2) ageg(1)

see fertility rates in the 1976 WFS in Colombia on Germán Rodriguez's website (http://data.princeton.edu/eco572/asfr.html).

Acknowledgements

Citing tabexp

Schoumaker Bruno (2012), "tabexp : A Stata command for preparing tables of births and exposure from birth histories", Centre de recherche en demographie et societes, Universite catholique de Louvain.

References

Rutstein S.O, Rojas G. (2006), Guide to DHS Statistics, Demographic and Health Surveys, ORC Macro, Calverton.

Schoumaker Bruno (2004), "A person-period approach to analyzing birth histories", Population-E, vol.59, pp. 689-702.

Schoumaker Bruno (2012), "A Stata module for computing fertility rates and TFRs from
birth histories: tfr2", Demographic Research, vol. 28.

Disclaimer

Disclaimer: There is no warranty on this program either expressed or implied.

Author

Bruno Schoumaker
Centre de recherche en demographie et societes
Universite catholique de Louvain
Belgium
bruno.schoumaker@uclouvain.be

Version 1.2.1 17May2013