Parametric Mortality Models, Life Tables and HMD

Fit the most popular human mortality 'laws', and construct full and abridge life tables given various input indices. A mortality law is a parametric function that describes the dying-out process of individuals in a population during a significant portion of their life spans. For a comprehensive review of the most important mortality laws see Tabeau (2001) . Practical functions for downloading data from various human mortality databases are provided as well.


CRAN_Version Linux Build Status codecov issues license CRAN_Download_Badge1 CRAN_Download_Badge2

Fit the most popular human mortality laws, and construct full and abridge life tables given various input indices. A mortality law is a parametric function that describes the dying-out process of individuals in a population during a significant portion of their life spans. For a comprehensive review of the most important mortality laws see Tabeau (2001). An elegant function for downloading data from Human Mortality Database is provided as well.

Installation

  1. Make sure you have the most recent version of R
  2. Run the following code in your R console
install.packages("MortalityLaws")

Updating to the latest version of the package

You can track and contribute to the development of MortalityLaws on GitHub. To install it:

  1. Install the release version of devtools from CRAN with install.packages("devtools").

  2. Make sure you have a working development environment.

    • Windows: Install Rtools.
    • Mac: Install Xcode from the Mac App Store.
    • Linux: Install a compiler and various development libraries (details vary across different flavors of Linux).
  3. Install the development version of MortalityLaws.

    devtools::install_github("mpascariu/MortalityLaws")

Help

All functions are documented in the standard way, which means that once you load the package using library(MortalityLaws) you can just type ?MortalityLaw to see the help file.

News

version 1.7.0

  • New models: Kannisto-Makeham (1998) and Strehler-Mildvan (1960);
  • ReadHMD() new functionalities. The function can now download cohort life tables, cohort life expectancy and exposure-to-risk by Lexis triangles data.

version 1.6.0

  • convertFx(): New function! Easy conversion between the life table indicators;
  • MortalityLaws(): Remove scale.x argument. Now, the function will identify by default which laws require a scaled x in fitting;
  • MortalityLaws(): When a mortality law is fitted on a subset of the input data, using fit.this.x argument, the residuals and fitted values are computed and plotted for the entire age range (in input). Previously only the fitted values followed this approach;
  • MortalityLaw(): set the argument show = FALSE as default;
  • Drop diagram suggestion from DESCRIPTION and vignettes.

version 1.5.0

  • LawTable(): Compute life tables from parameters of a mortality law;
  • Fix bug in the ReadHMD() function due to HMD migration from http to https.

version 1.4.0

  • Compute e[x] at the beginning of the age interval in LifeTable(). This affects only the ex column in the life table, all the other indicator remain unchanged;
  • New mortality model: Gamma-Gompertz (Vaupel.1979 version);
  • Fix bug related to fit.this.x argument in MortalityLaws();
  • More rigorous referencing in avalaibleLaws() function.

version 1.3.0

  • Add generic functions: deviance, df.residual;
  • Update vignette.

version 1.2.0

  • Vignettes;
  • Fix predict.MortalityLaws bug for cases where the input is of class matrix;
  • Solution for 'Kostaki' inflexion point due to high correlation between estimated parameters;
  • Add 'scale.x' argument in MortalityLaw function;
  • Add 'ax' argument in LifeTable function;
  • Add 'show' argument in ReadHMD function;
  • Other minor changes.

version 1.0.5

  • Fix issues with minpack.lm not being imported.

version 1.0.0:

  • First stable version (on CRAN).

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("MortalityLaws")

1.8.0 by Marius D. Pascariu, 2 months ago


https://github.com/mpascariu/MortalityLaws


Report a bug at https://github.com/mpascariu/MortalityLaws/issues


Browse source code at https://github.com/cran/MortalityLaws


Authors: Marius D. Pascariu [aut, cre, cph] , Vladimir Canudas-Romo [ctb]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports minpack.lm, RCurl, pbapply, tidyr

Suggests testthat, knitr, rmarkdown


Suggested by ungroup.


See at CRAN