Bayesian Mortality Modelling with 'Stan'
Overview
Implementation of popular mortality models using the 'rstan' package, which provides the R interface to the 'Stan' C++ library for Bayesian estimation. The package supports well-known models proposed in the actuarial and demographic literature including the Lee-Carter (1992) doi:10.1080/01621459.1992.10475265 and the Cairns-Blake-Dowd (2006) doi:10.1111/j.1539-6975.2006.00195.x models. By a simple call, the user inputs deaths and exposures and the package outputs the MCMC simulations for each parameter, the log likelihoods and predictions. Moreover, the package includes tools for model selection and Bayesian model averaging by leave future-out validation.
Since the package ggfan is scheduled for archival, all dependencies to the ggfan package were removed and in particular, the forecast_plot function to generate fan plots was removed.
From NEWS.md in the release
Install
Health
NOTEdependencies in R coder-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Namespaces in Imports field not imported from: ‘RcppParallel’ ‘httr’ ‘latex2exp’ ‘rstantools’ ‘tibble’ ‘tidyverse’ ‘utils’ All declared Imports should be used.
- NOTE11 OK, 2 NOTE2026-09-08
- ERROR11 OK, 1 NOTE, 1 ERROR2026-09-07
- NOTE11 OK, 2 NOTE2026-07-29
- ERROR10 OK, 2 NOTE, 1 ERROR2026-07-27
- NOTE11 OK, 2 NOTE2026-06-09
Show 4 earlier changesHide 4 earlier changes
- ERROR10 OK, 2 NOTE, 1 ERROR2026-06-08
- NOTE9 OK, 5 NOTE2026-04-22
- ERROR8 OK, 5 NOTE, 1 ERROR2026-04-18
- NOTE9 OK, 5 NOTE2026-03-10
Documentation
- Help pages
- 19includes a package overview page
- Examples that run
- 88%7 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 47%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 42%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 0
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
PRs over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/kabarigou/stanmomo on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.2.0Latest
- 1.1.12023-09-17 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.1.0
- RR 4.2.0 released · 2022-04-22
- 1.0.02021-10-07
- RR 4.1.0 released · 2021-05-18
Package metadata
- First published
- 2021-10-07
- Total releases
- 4 / 5 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 254 KB / 1 file
- Download size
- 361 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("StanMoMo")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.