tfr.median.set.all {bayesTFR}R Documentation

Editing median for estimation and projections.

Description

These functions are to be used by expert analysts. They allow to change the estimation and projection medians to specific values or to the WPP values.

Usage

tfr.median.set.all(sim.dir, country, values, years = NULL, 
    burnin = 0, thin = 1)

tfr.median.reset.estimation(sim.dir, countries = NULL)

tfr.shift.estimation.to.wpp(sim.dir, ..., verbose = TRUE)

Arguments

sim.dir

Directory containing the prediction object.

country

Name or numerical code of a country.

countries

Vector of country names or codes. If NULL, the reset is done for all countries.

values

Array of the new median values.

years

Numeric vector giving years which values correspond to. Ideally it should be of the same length as values.

burnin

Burnin to use when computing the estimation median.

thin

Thinning interval to use when computing the estimation median.

...

Can be used to pass burnin thin to the underlying funcions.

verbose

Logical. If TRUE a progress of the adjustment is shown.

Details

Expert analysts can use these functions to adjust both prediction and estimation medians. Estimation medians can only be adjusted if the simulation was performed with uncertainty = TRUE. In such a case years can include past time periods. By default a union of estimation and projection time periods is considered when matched to values.

Function tfr.shift.estimation.to.wpp shifts the median estimation of all countries so that they match the values in the tfr dataset of the corresponding WPP package. Argument burnin and thin should be passed to compute the estimation medians.

Function tfr.median.reset.estimation resets previous adjustments obtained using tfr.median.set.all. By default it resets adjustments for all countries.

Value

Output is a list. If there are time periods matched to estimation, an object of class bayesTFR.mcmc.meta is included in the element meta. If there are time periods matched to years in prediction, then an object of class bayesTFR.prediction is included in the element pred.

Function tfr.shift.estimation.to.wpp returns the updated mcmc.set object.

Author(s)

Peiran Liu

See Also

tfr.shift.prediction.to.wpp for shifting prediction medians to WPP values.


[Package bayesTFR version 7.4-2 Index]