life_table_predict_mx: Predict Mortality Rate for Highest Age Group

life_table_predict_mxR Documentation

Predict Mortality Rate for Highest Age Group

Description

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.

Usage

life_table_predict_mx(
  ph.data = ph.data,
  group_by = group_by,
  myages = myages,
  empirical_adjustment_factor = 1.8
)

Arguments

ph.data

A data.table containing mortality data

The default is ph.data = ph.data, where ph.data is passed from rads::life_table()

group_by

Variables used for stratification

The default is group_by = group_by, where group_by is passed from rads::life_table()

myages

A vector of length one containing the name of the column with the age categories in their proper format (e.g., ⁠c('65-74', 75-84', '85+')⁠).

The default is myages = myages, where myages is passed from rads::life_table()

empirical_adjustment_factor

Adjustment factor for predicted mx

The default is empirical_adjustment_factor = 1.8

Details

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+'.

Value

A data.table with predicted mx values for the highest age group

Note

This is an internal function and should not be called directly by users. It is exposed for transparency and documentation purposes only.

Examples


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)


PHSKC-APDE/rads documentation built on April 14, 2025, 10:47 a.m.