R/abridged_life_tables.R
build_abridged_life_table.RdConstructs an abridged period life table (age groups "00-04",
"05-09", ..., "95-99", "100+") independently from observed grouped
central death rates. It is a separate estimate, not an abridgement of the
single-year table from build_life_tables(): it uses no Kannisto
smoothing, and its open interval is 100+ rather than 110+, so the two
tables' life expectancies differ slightly by construction.
build_abridged_life_table(mx_1x1, mx_5x1, sex = c("female", "male"))tibble with columns age (single years, at least
0:4), mx, for one year and one sex - see compute_death_rates()'s
mx_1x1 output, filtered to one province/year/sex.
tibble with columns age_group ("00-04", "05-09",
..., "100+"), mx, for the same year and sex - see
compute_death_rates()'s mx_5x1 output, filtered the same way.
"female" or "male" - selects the Andreev-Kingkade a0
branch for the youngest group, same as build_life_table().
tibble: age_group, age_start, n (interval width, NA
for the open interval), mx, ax, qx, lx, dx, Lx, Tx, ex.
Closed groups from age 5 use Greville's nax with the Chiang
conversion nqx = n nmx / (1 + (n - nax) nmx) and
nLx = n l(x+n) + nax ndx (Preston, Heuveline & Guillot 2001, Box 3.1),
falling back to a constant hazard (nqx = 1 - exp(-n nmx),
nLx = ndx / nmx) where Greville's slope term is undefined. Both keep
nmx = ndx / nLx exactly. The open interval has qx = 1,
Lx = lx / mx.
Complements build_life_table()'s single-year (1x1) tables - use
this when comparing against other agencies' published abridged
tables, or when only grouped-age data is available. The youngest
group ("00-04") is the one exception to using mx_5x1 alone: it is
built from an exact single-year sub-table using mx_1x1's
Andreev-Kingkade a0 (see andreev_kingkade_a0()), avoiding the
external nax(0-4) regression a from-mx_5x1-alone method would
otherwise need for that interval's sharp infant-mortality gradient.
mx1 <- data.frame(age = 0:4, mx = c(0.004, 0.0003, 0.0002, 0.0002, 0.0002))
mx5 <- data.frame(
age_group = c("00-04", "05-09", "100+"), mx = c(0.0006, 0.0001, 0.35)
)
build_abridged_life_table(mx1, mx5, "female")
#> # A tibble: 3 × 11
#> age_group age_start n mx ax qx lx dx Lx Tx
#> <chr> <int> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 00-04 0 5 0.0006 0.635 0.00488 100000 488. 497869. 1.28e6
#> 2 05-09 5 5 0.0001 3.83 0.000500 99512. 49.8 497500. 7.82e5
#> 3 100+ 100 NA 0.35 2.86 1 99462. 99462. 284177. 2.84e5
#> # ℹ 1 more variable: ex <dbl>