Description Usage Arguments Examples
View source: R/utilityFunctions.R
Extrapolate a mortality trend in a mortalityTable
object using an exponential function (i.e. the trend decreases towards 0 exponentially).
This is mainly used to extrapolate an observed age-specific trend to very old ages.
Existing trend function values above (or below, respectively) the idx
are overwritten.
1 | mT.extrapolateTrendExp(table, idx, up = TRUE)
|
table |
A life table object (instance of a |
idx |
Index (typically age) of the position of the fit |
up |
Whether the fit is forward- or backward-facing (i.e. to old or young ages) |
1 2 3 4 5 | mortalityTables.load("Austria_Annuities_AVOe2005R")
# extrapolate the trend exponentially from age 95 instead (overwriting the existing trend)
avoe2005exp = mT.extrapolateTrendExp(AVOe2005R.male, 95)
plotMortalityTrend(mT.setName(avoe2005exp, "AVĂ– 2005R with trend extrapolated from age 85 up"),
AVOe2005R.male, Period = 2020, ages = 60:120)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.