bayesTFR.mcmc.meta {bayesTFR}R Documentation

MCMC Simulation Meta Object

Description

Simulation meta object bayesTFR.mcmc.meta used by all chains of the same MCMC simulation. It contains information that is common to all chains. It is part of a bayesTFR.mcmc.set object.

Details

The object is in standard cases not to be manipulated by itself, but rather as part of a bayesTFR.mcmc.set object.

Value

A bayesTFR.mcmc.meta object contains various components that correspond to the input arguments of the run.tfr.mcmc and run.tfr3.mcmc functions. Furthermore, it contains components:

nr.chains

Number of MCMC chains.

phase

Value 2 or 3, depending which Phase the object belongs to.

output.dir

Directory for storing simulation output.

Value - Phase II

Furthermore, Phase II meta objects contain components:

tfr_matrix_all

A q x n matrix with the United Nations TFR estimates. q is number of years (see T_end below), n is number of countries (see nr_countries below). The first n_e columns correspond to countries included in the MCMC estimation (see nr_countries_estimation below), where n_e <= n.

tfr_matrix_observed

Like tfr_matrix_all, but it has NA values for years where no historical data is available (i.e. after the last observed time period).

tfr_matrix

Like tfr_matrix_observed, but it has NA values before and after country”s fertility transition.

nr_countries

Number of countries included in the tfr matrices.

nr_countries_estimation

Number of countries included in the MCMC estimation. It must be smaller or equal to nr_countries.

tau_c

Estimated start year of the fertility decline for each country (as a row index within the tfr matrices). -1 means that the decline started before start.year.

id_Tistau

Index of countries for which present.year is equal to tau_c.

id_DL

Index of countries for which the projection is made using the double logistic function, i.e. high fertility countries.

id_early

Index of countries with early decline, i.e. countries for which tau_c=-1.

id_notearly

Index of countries with not early decline.

lambda_c

Start period of the recovery phase for each country (as an index of the tfr_matrix).

start_c

Maximum of tau_c and 1 for each country. Thus, it is a row index of the tfr_matrix where the fertility decline starts.

proposal_cov_gammas_cii

Proposal covariance matrices of gamma_ci for each country.

T_end

Number of years for which United Nations historical data are available (i.e. number of rows of tfr_matrix).

T_end_c

Like T_end but country specific.

regions

List of arrays of length nr_countries. These are:
name - Region name for each country.
code - Region code for each country.
area_name - Area name for each country.
area_code - Area code for each country.
country_name - Array of country names.
country_code - Array of country codes.
Any country indices in the bayesTFR.mcmc.meta object are derived from this component.

Value - Phase III

Phase III meta objects contain additional components:

id_phase3

Indices of countries included in the Phase III estimation. It is relative to the order of countries in the region object in the parent meta object.

nr.countries

Number of countries included in the estimation.

parent

Link to the Phase II meta object.

Author(s)

Hana Sevcikova, Leontine Alkema

See Also

run.tfr.mcmc, get.tfr.mcmc, run.tfr3.mcmc, get.tfr3.mcmc

Examples

sim.dir <- file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output")
m <- get.tfr.mcmc(sim.dir)
summary(m, meta.only = TRUE)
names(m$meta)

[Package bayesTFR version 7.0-5 Index]