# Lee–Carter model

The Lee–Carter model is a numerical algorithm used in mortality forecasting and life expectancy forecasting. The input to the model is a matrix of age specific mortality rates ordered monotonically by time, usually with ages in columns and years in rows. The output is a forecasted matrix of mortality rates in the same format as the input.
The model uses singular value decomposition (SVD) to find:
* A univariate time series vector $\mathbf {k} _{t}$ that captures 80–90% of the mortality trend (here the subscript $t$ refers to time),
* A vector $\mathbf {b} _{x}$ that describes the relative mortality at each age (here the subscript $x$ refers to age), and
* A scaling constant (referred to here as $s_{1}$ but unnamed in the literature).
$\mathbf {k} _{t}$ is usually linear, implying that gains to life expectancy are fairly constant year after year in most populations. Prior to computing SVD, age specific mortality rates are first transformed into $\mathbf {A} _{x,t}$, by taking their logarithms, and then centering them by subtracting their age-specific means over time. The age-specific mean over time is denoted by $\mathbf {a} _{x}$. The subscript $x,t$ refers to the fact that $\mathbf {A} _{x,t}$ spans both age and time.
Many researchers adjust the $\mathbf {k} _{t}$ vector by fitting it to empirical life expectancies for each year, using the $\mathbf {a} _{x}$ and $\mathbf {b} _{x}$ generated with SVD. When adjusted using this approach, changes to $\mathbf {k} _{t}$ are usually small.
To forecast mortality, $\mathbf {k} _{t}$ (either adjusted or not) is projected into $n$ future years using an ARIMA model. The corresponding forecasted $\mathbf {A} _{x,t+n}$ is recovered by multiplying $\mathbf {k} _{t+n}$ by $\mathbf {b} _{x}$ and the first diagonal element of S (when $\mathbf {U} \mathbf {S} \mathbf {V^{*}} ={\text{svd}}(\mathbf {A} _{x,t})$). The actual mortality rates are recovered by taking exponentials of this vector.
Because of the linearity of $\mathbf {k} _{t}$, it is generally modeled as a random walk with trend. Life expectancy and other life table measures can be calculated from this forecasted matrix after adding back the means and taking exponentials to yield regular mortality rates.
In most implementations, confidence intervals for the forecasts are generated by simulating multiple mortality forecasts using Monte Carlo Methods. A band of mortality between 5% and 95% percentiles of the simulated results is considered to be a valid forecast. These simulations are done by extending $\mathbf {k} _{t}$ into the future using randomization based on the standard error of $\mathbf {k} _{t}$ derived from the input data.

## Algorithm

The algorithm seeks to find the least squares solution to the equation:
    $\ln {(\mathbf {m} _{x,t})}=\mathbf {a} _{x}+\mathbf {b} _{x}\mathbf {k} _{t}+\epsilon _{x,t}$
where $\mathbf {m} _{x,t}$ is a matrix of mortality rate for each age $x$ in each year $t$.
* Compute $\mathbf {a} _{x}$ which is the average over time of $\ln {(\mathbf {m} _{x,t})}$ for each age:
       $\mathbf {a} _{x}={\frac {\sum _{t=1}^{T}{\ln {(\mathbf {m} _{x,t})}}}{T}}$
* Compute $\mathbf {A} _{x,t}$ which will be used in SVD:
       $\mathbf {A} _{x,t}=\ln {(\mathbf {m} _{x,t})}-\mathbf {a} _{x}$
* Compute the singular value decomposition of $\mathbf {A} _{x,t}$:
       $\mathbf {U} \mathbf {S} \mathbf {V^{*}} ={\text{svd}}(\mathbf {A} _{x,t})$
* Derive $\mathbf {b} _{x}$, $s_{1}$ (the scaling eigenvalue), and $\mathbf {k} _{t}$ from $\mathbf {U}$, $\mathbf {S}$, and $\mathbf {V^{*}}$:
       $\mathbf {b} _{x}=(u_{1,1},u_{2,1},...,u_{x,1})$
       $\mathbf {k} _{t}=(v_{1,1},v_{1,2},...,v_{1,t})$
* Forecast $\mathbf {k} _{t}$ using a standard univariate ARIMA model to $n$ additional years:
       $\mathbf {k} _{t+n}={\text{ARIMA}}(\mathbf {k} _{t},n)$
* Use the forecasted $\mathbf {k} _{t+n}$, with the original $\mathbf {b} _{x}$, and $\mathbf {a} _{x}$ to calculate the forecasted mortality rate for each age:
       $\mathbf {m} _{x,t+n}=\exp(\mathbf {a} _{x}+s_{1}\mathbf {k} _{t+n}\mathbf {b} _{x})$

## Discussion

Without applying SVD or some other method of dimension reduction the table of mortality data is a highly correlated multivariate data series, and the complexity of these multidimensional time series makes them difficult to forecast. SVD has become widely used as a method of dimension reduction in many different fields, including by Google in their page rank algorithm.
The Lee–Carter model was introduced by Ronald D. Lee and Lawrence Carter in 1992 with the article "Modeling and Forecasting U.S. Mortality". The model grew out of their work in the late 1980s and early 1990s attempting to use inverse projection to infer rates in historical demography. The model has been used by the United States Social Security Administration, the US Census Bureau, and the United Nations. It has become the most widely used mortality forecasting technique in the world today.
There have been extensions to the Lee–Carter model, most notably to account for missing years, correlated male and female populations, and large scale coherency in populations that share a mortality regime (western Europe, for example). Many related papers can be found on Professor Ronald Lee's website.

## Implementations

There are few software packages for forecasting with the Lee–Carter model.
* LCFIT is a web-based package with interactive forms.
* Professor Rob J. Hyndman provides an R package for demography that includes routines for creating and forecasting a Lee–Carter model.
* Alternatives in R include the StMoMo package of Villegas, Millossovich and Kaishev (2015).
* Professor German Rodriguez provides code for the Lee–Carter Model using Stata.
* Using Matlab, Professor Eric Jondeau and Professor Michael Rockinger have put together the Longevity Toolbox for parameter estimation.