Mortality Rate Changing
Mortality rates can be expressed in different types, such as central death rates, 1-year death probabilities and force of mortality. Different mortality rate completion methods require different types of mortality rates so this module includes a helper function to change between the types of mortality rates.
This module uses the following notation for an individual aged \(x\) in year \(y\) for each simulation \(i\):
- \(m_{x, y}^{(i)}\): central death rate
- \(q_{x, y}^{(i)}\): 1-year death probability
- \(\mu_{x, y}^{(i)}\): force of mortality
Implementation assumes a constant force of mortality for fractional ages, resulting in the following conversions:
- \(q_{x, y}^{(i)} = 1 - e^{-\mu_{x, y}^{(i)}}\)
- \(\mu_{x, y}^{(i)} = m_{x, y}^{(i)}\)
- \(m_{x, y}^{(i)} = -\log(1 - q_{x, y}^{(i)})\)
Mortality Rate Changing
rate2rate(rates, from, to)
Parameters:
rates : matrix/array
mortality rates with age rows, cohort/year columns
(and simulation number 3rd dimension)
from : character
input type of mortality rates: 'central' for central death rates,
'prob' for 1 year death probabilities, 'force' for force of mortality
to : character
desired output type of mortality rates: 'central' for central death rates,
'prob' for 1 year death probabilities, 'force' for force of mortality
Returns:
matrix/array of converted mortality rates with age rows, cohort/year columns
(and simulation number 3rd dimension)
Usage: