StMoMo: 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) <doi:10.2307/2290201> and the Cairns-Blake-Dowd (2006) <doi:10.1111/j.1539-6975.2006.00195.x> models. It includes functions for fitting mortality models, analysing their goodness-of-fit and performing mortality projections and simulations.

Install the latest version of this package by entering the following in R:
AuthorAndres Villegas <>, Pietro Millossovich <>, Vladimir Kaishev <>
Date of publication2017-04-01 06:30:15 UTC
MaintainerAndres Villegas <>
LicenseGPL (>= 2)

View on CRAN

Man pages

apc: Create an Age-Period-Cohort mortality model

arima.string: Copy of unexported function arima.string from forecast

binomRes2q: Map Binomial deviance residuals into deaths

bootstrap: Generic method for bootstrapping a fitted Stochastic...

bootstrap.fitStMoMo: Bootstrap a fitted Stochastic Mortality Model

cbd: Create a Cairns-Blake-Dowd mortality model

central2initial: Transform StMoMoData from central to initial exposures

coef.fitStMoMo: Extract coefficients from a fitted Stochastic Mortality Model

computeDevianceBinomial: Binomial deviance

computeDeviancePoisson: Compute Poisson deviance

computeLogLikBinomial: Compute Binomial loglikelihod

computeLogLikPoisson: Compute Poisson loglikelihod

EWMaleData: England and Wales male mortality data

extractCoefficientsFromGnm: Extract the model coefficient

extractCohort: Extract cohort from an age-period array

fit: Generic for fitting a Stochastic Mortality Model

fit.rh: Fit a Renshaw and Haberman (Lee-Carter with cohorts)...

fit.StMoMo: Fit a Stochastic Mortality Model

fitted.fitStMoMo: Compute fitted values for a Stochastic Mortality Model

forecast.fitStMoMo: Forecast mortality rates using a Stochastic Mortality Model

forecast.iarima: Forecast independent arima series

forecast.mrwd: Forecast a Multivariate Random Walk with Drift

genBinomialResBootSamples: Generate Binomial residual bootstrap sample

genBinomialSemiparametricBootSamples: Generate Binomial semiparametric bootstrap samples

genPoissonResBootSamples: Generate poisson residual bootstrap sample

genPoissonSemiparametricBootSamples: Generate Poisson semiparametric bootstrap samples

genWeightMat: Generate weight matrix

getMinimalFitStMoMo: Extract a lighter version of a fitted Stochastic Mortality...

iarima: Fit independent arima series to a multivariate time series

initial2central: Transform StMoMoData from initial to central exposures

invlogit: Invers Logit function 'invlogit' computes the inverse logit...

lc: Create a Lee-Carter model

logit: Logit function 'logit' computes the logit function

logLik.fitStMoMo: Log-Likelihood of a fitStMoMo object

m6: Create an M6 type extension of the Cairns-Blake-Dowd...

m7: Create an M7 type extension of the Cairns-Blake-Dowd...

m8: Create an M8 type extension of the Cairns-Blake-Dowd...

mrwd: Fit a Multivariate Random Walk with Drift

plot.bootStMoMo: Plot bootstrapped parameters of a Stochastic Mortality Model

plot.fitStMoMo: Plot fitted parameters from a stochastic mortality model

plot.forStMoMo: Plot a forecast from a Stochastic Mortality Model

plotParameterFan: Plot fanchart of the parameters

plot.resStMoMo: Plot the residuals of a Stochastic Mortality Model

poissonRes2death: Map poisson deviance residuals into deaths

predict.fitStMoMo: Predict method for Stochastic Mortality Models fits

predictLink: Compute the link for a given mortality models

processStartValues: Process the initial parameter supplied by the user

residuals.fitStMoMo: Extract deviance residuals of a Stochastic Mortality Model

rh: Create a Renshaw and Haberman (Lee-Carter with cohorts)...

scatterplotAPC: Do a scatter plot of a matrix according to age-period-cohorts

simulate.bootStMoMo: Simulate future sample paths from a Bootstrapped Stochastic...

simulate.fitStMoMo: Simulate future sample paths from a Stochastic Mortality...

simulate.iarima: Simulate independent arima series

simulate.mrwd: Simulate a Multivariate Random Walk with Drift

StMoMo: Create a new Stochastic Mortality Model

StMoMoData: Create StMoMoData object from demogdata object


apc Man page
arima.string Man page
binomRes2q Man page
bootstrap Man page
bootstrap.fitStMoMo Man page
cbd Man page
central2initial Man page
coef.fitStMoMo Man page
computeDevianceBinomial Man page
computeDeviancePoisson Man page
computeLogLikBinomial Man page
computeLogLikPoisson Man page
EWMaleData Man page
extractCoefficientsFromGnm Man page
extractCohort Man page
fit Man page
fit.rh Man page
fit.StMoMo Man page
fitted.fitStMoMo Man page
forecast.fitStMoMo Man page
forecast.iarima Man page
forecast.mrwd Man page
genBinomialResBootSamples Man page
genBinomialSemiparametricBootSamples Man page
genPoissonResBootSamples Man page
genPoissonSemiparametricBootSamples Man page
genWeightMat Man page
getMinimalFitStMoMo Man page
iarima Man page
initial2central Man page
invlogit Man page
lc Man page
logit Man page
logLik.fitStMoMo Man page
m6 Man page
m7 Man page
m8 Man page
mrwd Man page
plot.bootStMoMo Man page
plot.fitStMoMo Man page
plot.forStMoMo Man page
plotParameterFan Man page
plot.resStMoMo Man page
poissonRes2death Man page
predict.fitStMoMo Man page
predictLink Man page
processStartValues Man page
residuals.fitStMoMo Man page
rh Man page
scatterplotAPC Man page
simulate.bootStMoMo Man page
simulate.fitStMoMo Man page
simulate.iarima Man page
simulate.mrwd Man page
StMoMo Man page
StMoMoData Man page
StMoMo-package Man page


R/mrwd.R R/simulatebootStMoMo.R R/iarima.R R/standardModels.R R/bootstrapfitStMoMo.R R/internalUtils.R R/fittedfitStMoMo.R R/fitStMoMo.R R/logLikfitStMoMo.R R/residualsfitStMoMo.R R/StMoMo.R R/simulatefitStMoMo.R R/plotfitStMoMo.R R/plotbootStMoMo.R R/plotforStMoMo.R R/docStMoMo.R R/RHModel.R R/forecastfitStMoMo.R R/predictfitStMoMo.R R/exportUtils.R R/coeffitStMoMo.R
man/genPoissonSemiparametricBootSamples.Rd man/forecast.fitStMoMo.Rd man/plot.resStMoMo.Rd man/computeDeviancePoisson.Rd man/fit.rh.Rd man/fit.Rd man/processStartValues.Rd man/bootstrap.fitStMoMo.Rd man/plot.forStMoMo.Rd man/bootstrap.Rd man/plot.fitStMoMo.Rd man/rh.Rd man/computeDevianceBinomial.Rd man/StMoMo.Rd man/forecast.iarima.Rd man/invlogit.Rd man/genBinomialResBootSamples.Rd man/predict.fitStMoMo.Rd man/genWeightMat.Rd man/logLik.fitStMoMo.Rd man/simulate.fitStMoMo.Rd man/genBinomialSemiparametricBootSamples.Rd man/apc.Rd man/plotParameterFan.Rd man/predictLink.Rd man/mrwd.Rd man/m6.Rd man/plot.bootStMoMo.Rd man/cbd.Rd man/logit.Rd man/forecast.mrwd.Rd man/m7.Rd man/lc.Rd man/EWMaleData.Rd man/residuals.fitStMoMo.Rd man/genPoissonResBootSamples.Rd man/fitted.fitStMoMo.Rd man/StMoMoData.Rd man/simulate.bootStMoMo.Rd man/initial2central.Rd man/computeLogLikPoisson.Rd man/fit.StMoMo.Rd man/iarima.Rd man/central2initial.Rd man/simulate.iarima.Rd man/simulate.mrwd.Rd man/computeLogLikBinomial.Rd man/extractCoefficientsFromGnm.Rd man/poissonRes2death.Rd man/scatterplotAPC.Rd man/coef.fitStMoMo.Rd man/extractCohort.Rd man/getMinimalFitStMoMo.Rd man/m8.Rd man/arima.string.Rd man/binomRes2q.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.