Learn R Programming

bayesTFR (version 3.0-8)

UN2010: United Nations Time Series of the Total Fertility Rate

Description

Data set containing the United Nations time series of the total fertility rate for all countries of the world as available in 2008 and 2010. It is stored in a TAB-separated ASCII files UN2008.txt and UN2010.txt. File UN2010_supplemental.txt contains a subset of countries for which data prior 1950 are available.

Usage

data(UN2010)

data(UN2008)

data(UN2010_supplemental)

Arguments

Rdversion

1.1

docType

data

source

Data provided by the United Nations Population Division; see also http://esa.un.org/unpd/wpp.

Details

All entries in UN2008 and UN2010, respectively, must be included in the data set of locations, i.e. WPP2008_LOCATIONS and WPP2010_LOCATIONS, respectively. The the corresponding data set pair is matched using the column country_code.

Regarding the time columns, only those are necessary that correspond to an earlier or equal time point than the value of the argument present.year passed to the function run.tfr.mcmc. Thus, if present.year=2009, all columns after 2005-2010 are not used.

Optionally, the data set can contain a column called last.observed containing the year of the last observation for each country. In such a case, the code would ignore any data after that time point. Furthermore, the function tfr.predict fills in the missing values using the median of the BHM procedure (stored in tfr_matrix_reconstructed of the bayesTFR.prediction object). For last.observed values that are below a middle year of a time interval $[t_i, t_{i+1}]$ (computed as $t_i+3$) the last valid data point is the time interval $[t_{i-1}, t_i]$, whereas for values larger equal a middle year, the data point in $[t_i, t_{i+1}]$ is valid.

The package contains also a data set called my_tfr_template which is a template for user-specified TFR time series. It has the same structure, except that it can contain any subset of the set of the columns above. The only required column is country_code (see description of the argument my.tfr.file in run.tfr.mcmc).

Examples

Run this code
data(UN2008)
head(UN2008)

Run the code above in your browser using DataLab