Description Usage Arguments Details Value Author(s)
View source: R/projection_fcns.R
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.
1 2 3 4 5 6 7 8 | e0.median.set(sim.dir, country, values, years = NULL, joint.male = FALSE)
e0.median.shift(sim.dir, country, reset = FALSE, shift = 0,
from = NULL, to = NULL, joint.male = FALSE)
e0.median.adjust.jmale(sim.dir, countries, factors = c(1.2, 1.1))
e0.median.reset(sim.dir, countries, joint.male = FALSE)
|
sim.dir |
Directory containing the prediction object. |
country |
Name or numerical code of a country. |
countries |
Vector of country names or codes. |
values |
Array of the new median values. |
years |
Numeric vector giving years which |
joint.male |
Logical. If |
reset |
Logical. If |
shift |
Constant by which the medians should be offset. It is not used if |
from |
Year from which the offset/reset should start. By default, it starts at the first prediction period. |
to |
Year until which the offset/reset should be done. By default, it is set to the last prediction period. |
factors |
It should be a vector where each element corresponds to one time period. The adjustment of male medians is done as |
The function e0.median.set
can be used to set the medians of the given country to specific values. Function e0.median.shift
can be used to offset the medians by a specific constant, or to reset the medians to their original BHM values. Function e0.median.adjust.jmale
adjusts male medians using factors that can expand or shrink the female-male gap. Function e0.median.reset
resets medians of the given countries to the original values.
In all cases, if a median is modified, the corresponding offset is stored in the prediction object (element median.shift
). All three 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.
All three functions return an updated object of class bayesLife.prediction
.
Hana Sevcikova
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.