life_table_predict_mx | R Documentation |
This function predicts the mx
value (age-specific mortality rate) for the
highest age group (e.g., '85+') where there is insufficient data for
calculating it directly. It is intended for internal use by rads
'
life_table
only.
life_table_predict_mx(
ph.data = ph.data,
group_by = group_by,
myages = myages,
empirical_adjustment_factor = 1.8
)
ph.data |
A data.table containing mortality data The default is |
group_by |
Variables used for stratification The default is |
myages |
A vector of length one containing the name of the column with
the age categories in their proper format (e.g., The default is |
empirical_adjustment_factor |
Adjustment factor for predicted mx The default is |
The function uses a simplification of the Gompertz–Makeham law of mortality.
In the log10-linear model log10(mx) = a + b * istart
:
a
(intercept) represents the Makeham age-independent mortality term
b
represents the Gompertz age-dependent term
The use of a base 10 log model and the value of the empirical_adjustment_factor
were determined empirically by modeling age and gender specific USA 2018
mortality data, and 2009-2018 WA and King County mortality data. These model
parameters best fit these mortality data.
Age specific mortality rates and are known to increase exponentially
after age 30 and the empirical_adjustment_factor
is based on predicting
mx
for those >= 85 years old. It is recommended that you do not use use
this function when the max age is is less than '80+'.
A data.table with predicted mx values for the highest age group
This is an internal function and should not be called directly by users. It is exposed for transparency and documentation purposes only.
library(data.table)
# create data set ----
deaths <- data.table(
ages = c("35-44", "45-54", "55-64", "65-74", "75-84", "85+"),
istart = c(35, 45, 55, 65, 75, 85),
gender = rep("Both", 6),
mx = c(0.001947, 0.003959, 0.008867, 0.017833, 0.043861, 0)
)
# generate predictions ----
output <- rads:::life_table_predict_mx(
ph.data = deaths,
group_by = 'gender',
myages = 'ages'
)
print(output)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.