Smooth Constrained Mortality Forecasting

This page offers the link to the R-codes for implementing the model presented in

Camarda, C. G. (2008)

Smooth Constrained Mortality Forecasting

Demographic Research. 41 (38), 1091-1130

DOI: 10.4054/DemRes.2019.41.38

Prepared on 2019.09.03 using version 3.6.1. These files are only slightly different from those published in the Demographic Research web-page.

Requirements in terms of R codes and packages are described in the preamble of each file

Specifically, registration to the Human Mortality Database is required for running all presented examples. Using the R-package "HMDHFDplus", the code will prompt for the HMD user name and password

Codes are extensively commented and object-names follow as much as possible notation as presented in the publication, but if something is not clear please let me know.

- SmoothConstrainedMortalityForecasting_MainProgram.R: R-code for estimating CP-splines as presented in the publication

- SmoothConstrainedMortalityForecasting_Functions.R: R-code with a set of functions useful for modelling and forecasting based on CP-splines

- SmoothConstrainedMortalityForecasting_LifeTableFunctions.R: R-code with a set of functions useful for building life-table based on different inputs and extract e-dagger from it

- SmoothConstrainedMortalityForecasting_SmoothLeeCarterFunctions.R: R-code for estimating a smooth version of the Lee-Carter model as in Delwarde et al. (2007). Smoothing the Lee-Carter and Poisson log-bilinear models for mortality forecasting: A penalized log-likelihood approach. Statistical Modelling 7, 29–48.

- SmoothConstrainedMortalityForecasting_OutOfSample.R: R-code for running the out-of-sample forecast exercise for comparing CP-splines with alternative forecasting approaches as presented in the publication (and Supplementary Material)

- SmoothConstrainedMortalityForecasting_ChangingTimeConstraints.R: R-code for assessing the effect of the change in confidence level in rate-of-change over time for CP-splines as presented in the Supplementary Material of the publication

- SmoothConstrainedMortalityForecasting_TimeWindow.R: R-code for assessing the effect of the change in time-windows for CP-splines and Hyndman-Ullah model as presented in the Supplementary Material of the publication