The Double-Gap Life Expectancy Forecasting Model

Life expectancy is highly correlated over time among countries and between males and females. These associations can be used to improve forecasts. Here we have implemented a method for forecasting female life expectancy based on analysis of the gap between female life expectancy in a country compared with the record level of female life expectancy in the world. Second, to forecast male life expectancy, the gap between male life expectancy and female life expectancy in a country is analysed. We named this method the Double-Gap model. For a detailed description of the method see Pascariu et al. (2017). .


Linux Build Status AppVeyor Build Status codecov issues license

This repository contains source code for the Double-Gap model for forecasting life expectancy in human population.

Description

Life expectancy is highly correlated over time among countries and between males and females. These associations can be used to improve forecasts. Here we have implemented a method for forecasting female life expectancy based on analysis of the gap between female life expectancy in a country compared with the record level of female life expectancy in the world. Second, to forecast male life expectancy, the gap between male life expectancy and female life expectancy in a country is analysed. We named this method the Double-Gap model. For a detailed description of the method see Pascariu et al. (2017).

Installation

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

Updating to the latest version of the package

You can track and contribute to the development of MortalityGaps 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 MortalityGaps.

    devtools::install_github("mpascariu/MortalityGaps")

Help

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

References

Pascariu M.D., Canudas-Romo V. and Vaupel W.J. 2017. The double-gap life expectancy forecasting model. Insurance: Mathematics and Economics Volume 78, January 2018, Pages 339-350.

News

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("MortalityGaps")

1.0.0 by Marius D. Pascariu, a year ago


https://github.com/mpascariu/MortalityGaps


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


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


Authors: Marius D. Pascariu [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports forecast, MASS, crch, pbapply

Suggests knitr, rmarkdown, testthat, covr


See at CRAN