Standard life-table recursion from a complete schedule of central death rates, per HMD Methods Protocol V6: Andreev-Kingkade a0 at age 0, ax = 0.5 at every other closed age, and an open final interval with qx = 1, ax = 1/mx, Lx = lx/mx. No smoothing is applied; use build_life_tables() for Kannisto old-age smoothing of observed data.

build_life_table(mx_df, sex = c("female", "male"), a0 = NULL)

Arguments

mx_df

Data frame with columns age and mx for one year and one sex. Ages must be unique, contiguous single years starting at 0; the last age is treated as the open interval. Rates must be finite and non-negative, and the open-interval rate positive.

sex

"female" or "male", selecting the Andreev-Kingkade branch.

a0

Optional override for a0 (used for combined-sex tables).

Value

tibble: age, mx, qx, ax, lx, dx, Lx, Tx, ex (radix l0 = 100000).

Examples

mx <- data.frame(age = 0:100, mx = 0.0003 * exp(0.07 * (0:100)))
build_life_table(mx, "female")
#> # A tibble: 101 × 9
#>      age       mx       qx    ax      lx    dx     Lx       Tx    ex
#>    <int>    <dbl>    <dbl> <dbl>   <dbl> <dbl>  <dbl>    <dbl> <dbl>
#>  1     0 0.0003   0.000300 0.148 100000   30.0 99974. 7049970.  70.5
#>  2     1 0.000322 0.000322 0.5    99970.  32.2 99954. 6949996.  69.5
#>  3     2 0.000345 0.000345 0.5    99938.  34.5 99921. 6850042.  68.5
#>  4     3 0.000370 0.000370 0.5    99903.  37.0 99885. 6750121.  67.6
#>  5     4 0.000397 0.000397 0.5    99866.  39.6 99847. 6650236.  66.6
#>  6     5 0.000426 0.000426 0.5    99827.  42.5 99806. 6550390.  65.6
#>  7     6 0.000457 0.000456 0.5    99784.  45.5 99762. 6450584.  64.6
#>  8     7 0.000490 0.000490 0.5    99739.  48.8 99714. 6350823.  63.7
#>  9     8 0.000525 0.000525 0.5    99690.  52.3 99664. 6251108.  62.7
#> 10     9 0.000563 0.000563 0.5    99638.  56.1 99609. 6151445.  61.7
#> # ℹ 91 more rows