Learn R Programming

bayesTFR (version 1.2-0)

tfr.median.set: Editing the Projection Medians

Description

These functions are to be used by expert analysts. They allow to change the projection medians either to specific values or shift the medians by a given constant.

Usage

tfr.median.set(sim.dir, country, values, years = NULL)

tfr.median.shift(sim.dir, country, reset = FALSE, shift = 0, from = NULL, to = NULL)

Arguments

Value

Both functions return an updated object of class bayesTFR.prediction.

Details

The function tfr.median.set can be used to set the medians of the given country to specific values. Function tfr.median.shift can be used to offset the medians by a specific constant, or to reset the medians to their original BHM values. In both cases, if a median is modified, the corresponding offset is stored in the prediction object (element median.shift). Both functions write the updated prediction object back to disk. All functions in the package that use trajectories and trajectory statistics use the median.shift values to offset the results correspondingly.