Computes single year of age life table by graduating the mortality schedule of an abridged life table, using the ungroup::pclm() to ungroup binned count data. Returns complete single-age lifetable.

lt_abridged2single(
  Deaths = NULL,
  Exposures = NULL,
  nMx = NULL,
  nqx = NULL,
  lx = NULL,
  Age,
  radix = 1e+05,
  axmethod = "un",
  a0rule = "ak",
  Sex = "m",
  region = "w",
  IMR = NA,
  mod = TRUE,
  SRB = 1.05,
  OAG = TRUE,
  OAnew = max(Age),
  extrapLaw = NULL,
  extrapFrom = max(Age),
  extrapFit = NULL,
  ...
)

Arguments

Deaths

numeric. Vector of death counts in abridged age classes.

Exposures

numeric. Vector of population exposures in abridged age classes.

nMx

numeric. Vector of mortality rates in abridged age classes.

nqx

numeric. Vector of conditional death probabilities in abridged age classes.

lx

numeric. Vector of lifetable survivorship at abridged ages.

Age

integer. A vector of ages of the lower integer bound of the age classes.

radix

numeric. Lifetable radix, l0. Default 100000.

axmethod

character. Either "pas" or "un".

a0rule

character. Either "ak" (default) or "cd".

Sex

character. Either male "m", female "f", or both "b".

region

character. North, East, South, or West: code"n", code"e", code"s", code"w". Default code"w".

IMR

numeric. Infant mortality rate q0, in case available and nqx is not specified. Default NA.

mod

logical. If "un" specified for axmethod, whether or not to use Nan Li's modification for ages 5-14. Default TRUE.

SRB

the sex ratio at birth (boys / girls), default 1.05

OAG

logical. Whether or not the last element of nMx (or nqx or lx) is an open age group. Default TRUE.

OAnew

integer. Desired open age group (5-year ages only). Default max(Age). If higher then rates are extrapolated.

extrapLaw

character. If extrapolating, which parametric mortality law should be invoked? Options include "Kannisto", "Kannisto_Makeham", "Makeham", "Gompertz", "GGompertz", "Beard", "Beard_Makeham", "Quadratic". Default "Kannisto" if the highest age is at least 90, otherwise "makeham". See details.

extrapFrom

integer. Age from which to impute extrapolated mortality.

extrapFit

integer vector. Ages to include in model fitting. Defaults to all ages > =60.

...

optional arguments passed to pclm(). For example, if you pass an explicit lambda parameter via the control argument, you can speed up estimation

Value

Single-year lifetable in data.frame with columns

  • Ageinteger. Lower bound of single year age class,

  • AgeIntinteger. Age class widths.

  • nMxnumeric. Age-specific central death rates.

  • nAxnumeric. Average time spent in interval by those deceased in interval.

  • nqxnumeric. Age-specific conditional death probabilities.

  • lxnumeric. Lifetable survivorship

  • ndxnumeric. Lifetable deaths distribution.

  • nLxnumeric. Lifetable exposure.

  • Sxnumeric. Survivor ratios.

  • Txnumeric. Lifetable total years left to live above age x.

  • exnumeric. Age-specific remaining life expectancy.

Details

Similar to lt_abridged() details, forthcoming.

Examples

Mx <- c(.23669,.04672,.00982,.00511,.00697,.01036,.01169, .01332,.01528,.01757,.02092,.02517,.03225,.04241,.06056, .08574,.11840,.16226,.23745) Age = c(0,1,seq(5,85,by=5)) AgeInt <- inferAgeIntAbr(vec = Mx) LTabr <- lt_abridged(nMx = Mx, Age = Age, axmethod = "un", Sex = "m", mod = TRUE) LT1 <- lt_abridged2single(nMx = Mx, Age = Age, axmethod = "un", Sex = "m", mod = TRUE) LTabr$ex[1]
#> [1] 35.02979
LT1$ex[1]
#> [1] 34.50728
if (FALSE) { plot(Age, LTabr$nMx,type = 's', log = 'y') lines(LT1$Age, LT1$nMx) plot(Age, LTabr$lx,type='S') lines(LT1$Age, LT1$lx) }