Package: lifecontingencies 1.6.3

Giorgio Alfredo Spedicato

lifecontingencies: Financial and Actuarial Mathematics for Life Contingencies

Classes and methods that allow the user to manage life table, actuarial tables (also multiple decrements tables). Moreover, functions to easily perform demographic, financial and actuarial mathematics on life contingencies insurances calculations are contained therein. See Spedicato (2013) <doi:10.18637/jss.v055.i10>.

Authors:Giorgio Alfredo Spedicato [aut, cre], Christophe Dutang [ctb], Reinhold Kainhofer [ctb], Kevin J Owens [ctb], Ernesto Schirmacher [ctb], Gian Paolo Clemente [ctb], Ivan Williams [ctb]

lifecontingencies_1.6.3.tar.gz
lifecontingencies_1.6.3.zip(r-4.7-x86_64)lifecontingencies_1.6.3.zip(r-4.7-arm64)lifecontingencies_1.6.3.zip(r-4.6-x86_64)lifecontingencies_1.6.3.zip(r-4.6-arm64)
lifecontingencies_1.6.3.tar.gz(r-4.7-arm64)lifecontingencies_1.6.3.tar.gz(r-4.7-x86_64)lifecontingencies_1.6.3.tar.gz(r-4.6-arm64)lifecontingencies_1.6.3.tar.gz(r-4.6-x86_64)
lifecontingencies_1.6.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
lifecontingencies/json (API)

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

Bug tracker:https://github.com/spedygiorgio/lifecontingencies/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • AF92Lt - Uk AM AF 92 life tables
  • AM92Lt - Uk AM AF 92 life tables
  • de_angelis_di_falco - Italian Health Insurance Data
  • demoCanada - Canada Mortality Rates for UP94 Series
  • demoChina - China Mortality Rates for life table construction
  • demoFrance - French population life tables
  • demoGermany - German population life tables
  • demoIta - Italian population life tables for males and females
  • demoJapan - Japan Mortality Rates for life table construction
  • demoUk - UK life tables
  • demoUsa - United States Social Security life tables
  • soa08 - Society of Actuaries Illustrative Life Table object.
  • soa08Act - Society of Actuaries Illustrative Life Table with interest rate at 6
  • SoAISTdata - SoA illustrative service table
  • soaLt - Society of Actuaries life table

On CRAN:

Conda:

quartocppopenmp

5.98 score 279 scripts 2.4k downloads 71 exports 18 dependencies

Last updated from:103e6851f2. Checks:9 OK, 1 ERROR. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK236
linux-devel-x86_64OK240
source / vignettesERROR317
linux-release-arm64OK179
linux-release-x86_64OK223
windows-devel-arm64OK337
windows-devel-x86_64OK327
windows-release-arm64OK368
windows-release-x86_64OK419
wasm-releaseOK150

Exports:accumulatedValueAExnannuityaxnAxnaxn.mdtAxn.mdtaxynAxynaxyznAxyznbuildMdtFromIndependentRatescoerceconvertible2EffectiveconvexityDAxndecreasingAnnuitydiscount2Interestdurationdxteffective2ConvertibleexnExnexytexyztgetDecrementsgetLifecontingencyPvgetLifecontingencyPvXyzgetOmegaheadIaxnIAxnincreasingAnnuityindependentRatesFromMdtintensity2Interestinterest2Discountinterest2IntensityIsnLxtmdtToLongmedianmodalAgemx2qxmxtnominal2RealplotpresentValueprintprobs2lifetablepxtpxytpxyztquantileqx2mxqxtqxt.fromQxprimeqxt.prime.fromMdtqxytqxyztreal2NominalrLiferLifeContingenciesrLifeContingenciesXyzrLifexyzrmdtsdxnshowsummarytailTxvarxn

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglifecycleR6RColorBrewerRcpprlangS7scalesvctrsviridisLitewithr

An introduction to lifecontingencies package
Introduction | Statistical and financial foundations of life contingencies | The structure of the package | Code and examples | Software engineering and package architecture | Discussion

Last update: 2026-10-10
Started: 2012-11-06

Demographic analysis with the lifecontingencies package
Scope | Building and inspecting a life table | Core demographic functions | Expectation of life: curtate and complete | Within-year deaths and the open last interval | Dispersion of the future lifetime | Distribution of the age at death | An enriched life-table printout | References

Last update: 2026-10-10
Started: 2026-10-10

Multiple decrement tables in lifecontingencies
Introduction | The mdt class | Decrement probabilities calculation | Associated Single Decrement Table calculation | Extracting the full ASDT matrix: independentRatesFromMdt() | Building an mdt from independent rates: buildMdtFromIndependentRates() | Round-trip: mdt $\to$ ASDT $\to$ mdt | Visualising mdt objects: plot() | Actuarial applications | A worked example on real cause-of-death data, with a note on graduation | From an official report to a mutually exclusive partition | Graduating from 5-year bands to single years of age | Building and validating the mdt object | Competing-risks analysis: mdtToLong() | References

Last update: 2026-10-10
Started: 2026-10-10

Mortality projection using lifecontingencies package
Introduction | Using Demography | Using the StMoMo package

Last update: 2026-07-30
Started: 2012-11-06

Pension Funding with lifecontingencies
Introduction and some general settings | Contribution rate and technical reserves | Functions definitions | An applied example

Last update: 2025-11-27
Started: 2017-07-17

Computational details of demographic functions
Survival probabilities | Examples of non-integer times | Examples of non-integer ages | Examples of large ages

Last update: 2024-09-30
Started: 2018-09-18

Pensions valuation with lifecontingencies package
Function PensFund | First (main) example | Second example | Third example | Future improvements: | References

Last update: 2024-09-30
Started: 2019-03-05

Readme and manuals

Help Manual

Help pageTopics
Package to perform actuarial mathematics on life contingencies and classical financial mathematics calculations.lifecontingencies-package lifecontingencies
Function to evaluate the accumulated value.accumulatedValue
Class '"actuarialtable"'actuarialtable-class coerce,actuarialtable,data.frame-method coerce,actuarialtable,numeric-method getOmega,actuarialtable-method initialize,actuarialtable-method print,actuarialtable-method show,actuarialtable-method summary,actuarialtable-method
Annuityannuity
Life insurance with arithmetic-variation benefit (increasing/decreasing, fractional claims)arithmetic_variation_insurances DAxn IAxn
Autoplot a life tableautoplot.lifetable
Multiple decrement insurances and annuitiesAxn.mdt axn.mdt
Functions to evaluate life insurance and annuities on two heads.Axyn axyn
Multiple lifes insurances and annuitiesAxyzn axyzn
Build an mdt object from a matrix of independent (ASDT) ratesbuildMdtFromIndependentRates
Italian Health Insurance Datade_angelis_di_falco
Function to evaluate decreasing annuities.decreasingAnnuity
Canada Mortality Rates for UP94 SeriesdemoCanada
China Mortality Rates for life table constructiondemoChina
French population life tablesdemoFrance
German population life tablesdemoGermany
Italian population life tables for males and femalesdemoIta
Japan Mortality Rates for life table constructiondemoJapan
UK life tablesdemoUk
United States Social Security life tablesdemoUsa
Compute the duration or the convexity of a series of CFconvexity duration
Endowment, insurance, pure endowment, and survival annuity APVs (shared topic)AExn Axn axn endowment_trio Exn
Expected residual life.exn
Function to return the decrements defined in the mdt classgetDecrements
Functions to obtain the present value of a life contingency given the time to deathgetLifecontingencyPv getLifecontingencyPvXyz
Function to return the terminal age of a life table.getOmega
Increasing annuity life contingenciesIaxn
Increasing annuity.increasingAnnuity
Extract the full Associated Single Decrement Table (ASDT) from an mdt objectindependentRatesFromMdt
Functions to switch from interest to intensity and vice versa.intensity2Interest interest2Intensity
Functions to switch from interest to discount ratesdiscount2Interest interest2Discount
Function to calculated accumulated increasing annuity future value.Isn
Class '"lifetable"'coerce,data.frame,lifetable-method coerce,lifetable,data.frame-method coerce,lifetable,markovchainList-method coerce,lifetable,numeric-method getOmega,lifetable-method head,lifetable-method initialize,lifetable-method lifetable-class plot,lifetable,ANY-method plot,lifetable-method print,lifetable-method show,lifetable-method summary,lifetable-method tail,lifetable-method
Various demographic functionsLxt Tx
Class '"mdt"'coerce,mdt,data.frame-method coerce,mdt,markovchainList-method getDecrements,mdt-method getOmega,mdt-method initialize,mdt-method mdt-class print,mdt-method show,mdt-method summary,mdt-method
Convert an mdt to long (time, status) format for survival analysismdtToLong
Median age at death of a life tablemedian median,lifetable-method
Modal age at death of a life tablemodalAge
Functions to deals with multiple life modelsexyzt pxyzt qxyzt
Mortality rates to Death probabilitiesmx2qx
Central mortality ratemxt
Functions to switch from nominal / effective / convertible ratesconvertible2Effective effective2Convertible nominal2Real real2Nominal
Plot a multiple decrement tableplot,mdt,missing-method
Present value of a series of cash flowspresentValue
Life table from probabilitiesprobs2lifetable
Functions to evaluate survival, death probabilities and deaths.dxt dxt,ANY-method dxt,lifetable-method dxt,mdt-method dxt-methods pxt pxt,ANY-method pxt,lifetable-method pxt,mdt-method pxt-methods qxt qxt,ANY-method qxt,lifetable-method qxt,mdt-method qxt-methods
Functions to evaluate joint survival probabilities.exyt pxyt qxyt
Quantiles of the age-at-death distribution of a life tablequantile quantile,lifetable-method
Death Probabilities to Mortality Ratesqx2mx
Return Associated single decrement from absolute rate of decrementqxt.fromQxprime qxt.prime.fromMdt
Function to generate samples from the life contingencies stochastic variablesrLifeContingencies rLifeContingenciesXyz
Function to generate random future lifetimesrLife rLifes rLifexyz
Simulate from a multiple decrement tablermdt
Society of Actuaries Illustrative Life Table object.soa08
Society of Actuaries Illustrative Life Table with interest rate at 6soa08Act
SoA illustrative service tableSoAISTdata
Society of Actuaries life tablesoaLt
Uk AM AF 92 life tablesAF92Lt AM92Lt
Variance and standard deviation of the future lifetimesdxn varxn