tfr.median.set(sim.dir, country, values, years = NULL)tfr.median.shift(sim.dir, country, reset = FALSE, shift = 0,
from = NULL, to = NULL)
tfr.median.adjust(sim.dir, countries, factor1 = 2/3, factor2 = 1/3, forceAR1 = FALSE)
tfr.median.reset(sim.dir, countries)
bayesTFR.prediction.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.
Function tfr.median.adjust runs the prediction procedure for the given countries with an additional decrement in the model in the first two projection periods. In the first projection period it is computed as factor1*S where S is a difference between observed decrement and the expected decrement (by the double logistic function) in the last observed period. In the second projection period, in the formula factor1 is replaced by factor2. If forceAR1 is set to TRUE, we recommend to set factor1 and factor2 to 0. The function then calls tfr.median.set in order to store the new median for each country.
Function tfr.median.reset resets medians of the given countries to the original values.In all four functions, if a median is modified, the corresponding offset is stored in the prediction object (element median.shift) and the updated prediction object is written back to disk. All functions in the package that use trajectories and trajectory statistics use the median.shift values to offset the results correspondingly.