Package: MortalityTables 2.0.6

MortalityTables: A Framework for Various Types of Mortality / Life Tables

Classes to implement, analyze and plot cohort life tables for actuarial calculations. Birth-year dependent cohort mortality tables using a yearly trend to extrapolate from a base year are implemented, as well as period life table, cohort life tables using an age shift, and merged life tables. Additionally, several data sets from various countries are included to provide widely-used tables out of the box.

Authors:Reinhold Kainhofer [aut, cre, cph]

MortalityTables_2.0.6.tar.gz
MortalityTables_2.0.6.zip(r-4.7-any)MortalityTables_2.0.6.zip(r-4.6-any)MortalityTables_2.0.6.zip(r-4.5-any)
MortalityTables_2.0.6.tgz(r-4.6-any)MortalityTables_2.0.6.tgz(r-4.5-any)
MortalityTables_2.0.6.tar.gz(r-4.7-any)MortalityTables_2.0.6.tar.gz(r-4.6-any)
MortalityTables_2.0.6.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
MortalityTables/json (API)

# Install 'MortalityTables' in R:
install.packages('MortalityTables', repos = c('https://kainhofer.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/kainhofer/mortalitytables/issues

Datasets:

On CRAN:

Conda:

6.39 score 1 stars 2 packages 135 scripts 340 downloads 66 exports 18 dependencies

Last updated from:1dbe7d03e5. Checks:7 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develWARNING163
source / vignettesOK211
linux-releaseWARNING158
macos-releaseWARNING214
macos-oldrelWARNING198
windows-develWARNING145
windows-releaseWARNING153
windows-oldrelWARNING136
wasm-releaseOK112

Exports:agesageShiftbaseTablebaseYearcalculateImprovementscommutationNumbersdeathProbabilitiesdeathProbabilitiesIndividualfillAgesfitExpExtrapolationgenerateAgeShiftgetCohortTablegetOmegagetPeriodTablelifeTablemakeQxDataFramemortalityComparisonTablemortalityImprovementmortalityTablemortalityTable.ageShiftmortalityTable.deMoivremortalityTable.improvementFactorsmortalityTable.jointLivesmortalityTable.MakehamGompertzmortalityTable.mixedmortalityTable.NAmortalityTable.observedmortalityTable.oncemortalityTable.onceAndFuturemortalityTable.periodmortalityTable.trendProjectionmortalityTable.WeibullmortalityTable.zeroesmortalityTables.listmortalityTables.loadmT.addTrendmT.cleanupmT.extrapolateProbsExpmT.extrapolateTrendExpmT.fillAgesmT.fitExtrapolationLawmT.roundmT.scaleProbsmT.setDimInfomT.setNamemT.setTrendmT.switchovermT.translatepensionTablepensionTables.listpensionTables.loadperiodDeathProbabilitiesperiodDeathProbabilitiesIndividualperiodTransitionProbabilitiesplotMortalityTableComparisonsplotMortalityTablesplotMortalityTrendpT.calculateTotalMortalitypT.getSubTablepT.recalculateTotalMortalitypT.setDimInfosetLoadingsetModificationtransitionProbabilitiesundampenTrendwhittaker.mortalityTable

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglifecyclepracmaR6RColorBrewerrlangS7scalesvctrsviridisLitewithr

Using the MortalityTables Package
Types of Life Tables | Loading the MortalityTables package | Provided Data Sets | Working with life table objects | Plotting life tables | Obtaining period and cohort death probabilities | Other data extraction functions from life tables | Dimensional information | Creating a life table object | Period life tables | Cohort life tables with trend projection | Cohort life tables with age-shift | Modifying life table objects | Copying life tables | Adding a security loading to the raw probabilities | Adding a modification to the raw probabilities | Life tables for multiple lives (joint-life states) | Creating mortality tables from data and modifying them using various helper functions | Pension Tables

Last update: 2026-01-01
Started: 2016-09-04

International Mortality Tables Overview
Austria | Annuities | ÖVM 59/61 - RR 67 | EROM/F 85 (Period table 2020), EROM/F G 1950 (Cohort table with age shift) | AVÖ 1996-R | AVÖ 2005-R | Comparisons | Population Mortality (Austrian Census tables) | Census tables | Official population forecast (by Statistik Austria) | Markov-Chain-Monte-Carlo-fitted population forecast (by J. Hirz) | Observed population mortalities 1947--2022 (by Statistik Austria) | Comparison | Occupational Pensions | Ettl-Pagler | AVÖ 1999-P - Rechnungsgrundlagen für die Pensionsversicherung - Pagler-Pagler | AVÖ 2008-P - Rechnungsgrundlagen für die Pensionsversicherung - Pagler-Pagler | AVÖ 2018-P - Rechnungsgrundlagen für die Pensionsversicherung | Experience Tables | Gesamtbestand (total portfolio) of life insurance companies 2012--16 | Gesamtbestand (total portfolio) of Austrian Pension Funds (Pensionskassen) 2010--16 | Germany | Sterbetafel 1987 R | DAV 1994 R: | DAV 2004 R: | Population Mortality (German Census tables) | Tables for contract with death characteristics (Life Insurances, Endowments) | Association Table of Assured Lives 1986 | DAV 1994 T | DAV 2008 T, DAV 2008 T R/NR | Occupational Disability | DAV 1997 I | DAV 1998 EU | DAV 2001 EM/EM-T | MTPL Annuities | DAV 2006 HUR | Old-Age Care | DAV 2008 P | Heubeck Richttafeln 1959 | Heubeck Richttafeln 1983 | Heubeck Richttafeln 1998 | Richttafeln DAV 2005-G | Heubeck Richttafeln 2018-G | United States of America | Annuities (individual and group) | Whole Life Insurances | Pension Plans | RP-2000 | RP-2014

Last update: 2023-10-19
Started: 2020-09-20

Readme and manuals

Help Manual

Help pageTopics
Provide life table classes for life insurance purposesMortalityTables-package MortalityTables
Return the defined ages of the life tableages ages,mortalityTable.jointLives-method ages,mortalityTable.mixed-method ages,mortalityTable.observed-method ages,mortalityTable.period-method
Return the age shift of the age-shifted life table given the birth yearageShift ageShift,mortalityTable-method ageShift,mortalityTable.ageShift-method
Return the base table of the life tablebaseTable baseTable,mortalityTable-method baseTable,mortalityTable.jointLives-method baseTable,mortalityTable.period-method
Return the base year of the life tablebaseYear baseYear,mortalityTable-method baseYear,mortalityTable.jointLives-method baseYear,mortalityTable.mixed-method
Calculate the improvement factors for the given birth-year and the 'mortalityTable.improvementFactors' objectcalculateImprovements calculateImprovements,mortalityTable.improvementFactors-method
Calculate the commutation numbers for the given parameters, using the mortality table and an interest ratecommutationNumbers commutationNumbers,mortalityTable-method commutationNumbers,numeric-method commutationNumbers,pensionTable-method
Return the (cohort) death probabilities of the life table given the birth year (if needed)deathProbabilities deathProbabilities,mortalityTable.ageShift-method deathProbabilities,mortalityTable.improvementFactors-method deathProbabilities,mortalityTable.jointLives-method deathProbabilities,mortalityTable.mixed-method deathProbabilities,mortalityTable.observed-method deathProbabilities,mortalityTable.period-method deathProbabilities,mortalityTable.trendProjection-method
Return a matrix of the persons' individual death probabilities of a joint-life table (instance of 'mortalityTable.jointLives')deathProbabilitiesIndividual
Fill the given probabilities with NA to match the desired age range.fillAges
Fit an exponential function exp(-A*(x-x0)) to the last value (f(100) and f'(100) need to coincide):fitExpExtrapolation
Generate data.frame containing age shifts for each birth yeargenerateAgeShift
Return the cohort life table as a 'mortalityTable.period' objectgetCohortTable getCohortTable,mortalityTable-method
Return the maximum age of the life tablegetOmega getOmega,mortalityTable.jointLives-method getOmega,mortalityTable.mixed-method getOmega,mortalityTable.observed-method getOmega,mortalityTable.period-method
Return the period life table as a 'mortalityTable.period' objectgetPeriodTable getPeriodTable,mortalityTable-method
Return the lifetable object (package lifecontingencies) for the cohort life tablelifeTable lifeTable,array-method lifeTable,list-method lifeTable,mortalityTable-method lifeTable,NULL-method
Converts one or multiple mortality table objects to a data frame that can be plotted by 'plotMortalityTables' or 'plotMortalityTableComparisons'makeQxDataFrame
Calculate relative mortalities for age bands and birth yearsmortalityComparisonTable
Return the mortality trend (yearly log-death-probability improvement) of the given period or the given generation.mortalityImprovement mortalityImprovement,mortalityTable-method
Class mortalityTablemortalityTable mortalityTable-class
Class mortalityTable.ageShift - Cohort life tables generated by age-shiftmortalityTable.ageShift mortalityTable.ageShift-class
Class mortalityTable.deMoivre - Mortality table with de Moivre's lawmortalityTable.deMoivre mortalityTable.deMoivre-class
Class mortalityTable.improvementFactors - Cohort life table with improvement factorsmortalityTable.improvementFactors mortalityTable.improvementFactors-class
Class mortalityTable.jointLives - Life table for multiple joint livesmortalityTable.jointLives mortalityTable.jointLives-class
Class mortalityTable.MakehamGompertz - Mortality table with Makeham-Gompertz's lawmortalityTable.MakehamGompertz mortalityTable.MakehamGompertz-class
Class mortalityTable.mixed - Life table as a mix of two life tablesmortalityTable.mixed mortalityTable.mixed-class
Empty mortality table indicating NAmortalityTable.NA
Class mortalityTable.observed - Life table from actual observationsmortalityTable.observed mortalityTable.observed-class
Generate a (deterministic) mortality table with only one probability set to 1 (for the given age)mortalityTable.once
Generate a (deterministic) mortality table with all probabilities starting at a given age set to 1mortalityTable.onceAndFuture
Class mortalityTable.period - Period life tablesmortalityTable.period mortalityTable.period-class
Class mortalityTable.trendProjection - Cohort mortality table with age-specific trendmortalityTable.trendProjection mortalityTable.trendProjection-class
Class mortalityTable.Weibull - Mortality table with Weibull's lawmortalityTable.Weibull mortalityTable.Weibull-class
Generate a mortality table with all probabilities set to zero.mortalityTable.zeroes
List all available sets of life tables provided by the MortalityTables-package package An existing life table can then be loaded with mortalityTables.load.mortalityTables.list
Load a named set of mortality tables provided by the MortalityTables packagemortalityTables.load
Remove all non-essential data (raw data, etc.) from a mortalityTable objectmT.cleanup mT.cleanup,array-method mT.cleanup,list-method mT.cleanup,mortalityTable-method mT.cleanup,mortalityTable.observed-method mT.cleanup,mortalityTable.period-method mT.cleanup,mortalityTable.trendProjection-method mT.cleanup,pensionTable-method
Extrapolate base table of a mortalityTable using an exponential functionmT.extrapolateProbsExp
Extrapolate a mortality trend exponentiallymT.extrapolateTrendExp
Restrict/expand a mortalityTable to certain agesmT.fillAges
Fit interpolation law to a mortality table and extrapolatemT.fitExtrapolationLaw
Round all components of a mortality table to the given number of digitsmT.round mT.round,array-method mT.round,list-method mT.round,mortalityTable-method mT.round,mortalityTable.improvementFactors-method mT.round,mortalityTable.observed-method mT.round,mortalityTable.period-method mT.round,mortalityTable.trendProjection-method mT.round,pensionTable-method
Scale all probabilities of the given 'mortalityTable' object(s) by the given factormT.scaleProbs
Set additional information (year, description, type of risk, sex, etc.) for the mortality table.mT.setDimInfo
Sets a new name for the given mortality table or the list/table/array of mortalityTablesmT.setName
Set/Add a trend vector for the probabilities of the given 'mortalityTable' object(s). Returns a 'mortalityTable.trendProjection' objectmT.addTrend mT.setTrend
Switch over mortalities from one table to another at a given agemT.switchover
Translate base table of a cohort mortality table to a different observation yearmT.translate
Class pensionTablepensionTable pensionTable-class
List all available sets of pension tables provided by the MortalityTables-package package An existing pension table can then be loaded with pensionTables.load.pensionTables.list
Load a named set of pension tables provided by the MortalityTables packagepensionTables.load
Return the (period) death probabilities of the life table for a given observation yearperiodDeathProbabilities periodDeathProbabilities,mortalityTable.ageShift-method periodDeathProbabilities,mortalityTable.improvementFactors-method periodDeathProbabilities,mortalityTable.jointLives-method periodDeathProbabilities,mortalityTable.mixed-method periodDeathProbabilities,mortalityTable.observed-method periodDeathProbabilities,mortalityTable.period-method periodDeathProbabilities,mortalityTable.trendProjection-method
Return a matrix of the persons' individual period death probabilities of a joint-life table (instance of 'mortalityTable.jointLives')periodDeathProbabilitiesIndividual
Return all period transition probabilities of the pension tableperiodTransitionProbabilities periodTransitionProbabilities,pensionTable-method
Plot multiple mortality tables (life tables) in one plotplot.mortalityTable
Plot multiple mortality tables (life tables) in one plot, relative to a given reference tableplotMortalityTableComparisons
Plot multiple mortality tables (life tables) in one plotplotMortalityTables
Plot the trends of multiple mortality tables (life tables) in one chartplotMortalityTrend
Austrian population count (exposure) and deaths in 2017PopulationData.AT2017
Calculate the total mortality of the pension tablepT.calculateTotalMortality pT.recalculateTotalMortality
Extract a sub-table from a pensionTablepT.getSubTable
Set additional information (year, description, type of risk, sex, etc.) for the pension table.pT.setDimInfo
Return a copy of the table with an additional loading addedsetLoading setLoading,mortalityTable-method
Return a copy of the table with the given modification function addedsetModification setModification,mortalityTable-method
Return all transition probabilities of the pension table (generational probabilities)transitionProbabilities transitionProbabilities,pensionTable-method
Return a 'mortalityTable.trendProjection' object with the trend damping removed.undampenTrend undampenTrend,mortalityTable.trendProjection-method
Smooth a life table using the Whittaker-Henderson method, intepolation possibly missing valueswhittaker.mortalityTable