MyNixOS website logo
Description

Bayesian Mortality Forecasting.

Carry out Bayesian estimation and forecasting for a variety of stochastic mortality models using vague prior distributions. Models supported include numerous well-established approaches introduced in the actuarial and demographic literature, such as the Lee-Carter (1992) <doi:10.1080/01621459.1992.10475265>, the Cairns-Blake-Dowd (2009) <doi:10.1080/10920277.2009.10597538>, the Li-Lee (2005) <doi:10.1353/dem.2005.0021>, and the Plat (2009) <doi:10.1016/j.insmatheco.2009.08.006> models. The package is designed to analyse stratified mortality data structured as a 3-dimensional array of dimensions p × A × T (strata × age × year). Stratification can represent factors such as cause of death, country, deprivation level, sex, geographic region, insurance product, marital status, socioeconomic group, or smoking behavior. While the primary focus is on analysing stratified data (p > 1), the package can also handle mortality data that are not stratified (p = 1). Model selection via the Deviance Information Criterion (DIC) is supported.

R Package BayesMoFo

Carry out Bayesian estimation and forecasting of a variety of stochastic mortality models using vague prior distributions. The structure of mortality data that we focus on analysing is a three-dimensional array of dimension $p \times A \times T$ (strata $\times$ age $\times$ year), i.e., stratified mortality data. The stratification can be based on various factors such as: causes of death, countries, deprivation levels, gender/sex, geographical locations/regions, insurance products, marital statuses, socioeconomic groups, smoking behaviours, etc. While the primary focus of the package is on stratified mortality data ($p > 1$), it is also capable of analysing unstratified mortality data defined over age and time only (i.e., $p = 1$). Model selection, using Deviance Information Criterion (DIC), is also supported within the package.

Documentation

The PDF documentation containing descriptions of all data and functions in the package is in the manual "BayesMoFo.pdf". The vignette file also contains a general tutorial on how to use the package.

Installation guide

To install the latest stable release of the BayesMoFo package from CRAN:

install.packages("BayesMoFo")

To install the development version with the latest (possibly unstable) updates from GitHub:

install.packages("devtools")

devtools::install_github("jstw1g09/Rpackage-BayesMoFo")

Note that the GitHub version may contain experimental features or be under active development. For practical use, we recommend the CRAN stable release.

The package can then be loaded as:

library(BayesMoFo)

Some limitations

  • Current version does not allow user-specified prior distributions.
  • The projection models for time and cohort effects ($\kappa_t$ and $\gamma_c$) are pre-defined. It might be more appropriate to allow customisations or to perform model selection.
  • It is not optimised in terms of computational speed and memory management (can occupy considerable RAM).
Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows