Stochastic Mortality Modelling

Implementation of the family of generalised age-period-cohort stochastic mortality models. This family of models encompasses many models proposed in the actuarial and demographic literature including the Lee-Carter (1992) and the Cairns-Blake-Dowd (2006) models. It includes functions for fitting mortality models, analysing their goodness-of-fit and performing mortality projections and simulations.


Build Status CRAN_Status_Badge downloads

StMoMo (Stochastic Mortality Modelling) is an R package providing functions to specify and fit stochastic mortality models including the Lee-Carter models, the CBD model, the APC model and many other (possibly new) models. The package also includes tools for analysing the goodness of fit of the models and performing mortality projections and simulations.

An overview of the usage and facilities of StMoMo is described in the working paper Andrés M. Villegas, Pietro Millossovich, Vladimir K. Kaishev. “StMoMo: An R Package for Stochastic Mortality Modelling”


To install the stable version on R CRAN:


To install the latest development version:



This package is free and open source software, licensed under GPL (>= 2)

If you are interested in the package feel free to email [email protected] or track development at


StMoMo v0.4.1

  • Add Citation file for new JSS publication
  • Correct minor bugs

StMoMo v0.4.0

  • Upgrade plotting function of forecast models (plot.forStMoMo) to include nice fan charts similar to those in the forecast package
  • Change inteface of fit function (fit.StMoMo) to allow simiplified calling using newly defined StMoMoData class
  • Add the possibility of using general arima models (beyond the random walk with drift) for the forecasting and simulation of the period indexes
  • Add new estimation function for the Renshaw and Haberman model implementing the approximate constraint Hunt and Villegas (2015)

StMoMo v0.3.1

  • Change residual plotting function (plot.resStMoMo) to use a more effective divergent colour palette for colourmaps.
  • Change the default plotting limits in residual plotting function to have a symmetric scale
  • Fix formatting issues in logLik, AIC and BIC functions for models fitted with gnm

StMoMo v0.3.0

  • Add optional parameters kt.lookback and gc.lookback to functions forecast.fitStMoMo, simulate.fitStMoMo and simulate.bootStMoMo. These new parameters allow the forecast and simulation of mortality models using only a limited history of the period and cohort indexes

  • Improve documentation of some functions

  • Update package vignette

  • Add citation file

StMoMo v0.2.0

  • First stable version of StMoMo released to CRAN

Reference manual

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


0.4.1 by Andres Villegas, 4 years ago

Report a bug at

Browse source code at

Authors: Andres Villegas <[email protected]> , Pietro Millossovich <[email protected]> , Vladimir Kaishev <[email protected]>

Documentation:   PDF Manual  

GPL (>= 2) license

Imports MASS, rootSolve, fanplot, reshape2, fields, RColorBrewer

Depends on gnm, forecast

Suggests demography, knitr, xtable, MTS

Suggested by lifecontingencies.

See at CRAN