lt_single_mx: calculate a single age lifetable

View source: R/lt_single.R

lt_single_mxR Documentation

calculate a single age lifetable

Description

Fuller description forthcoming

Usage

lt_single_mx(
  nMx,
  Age = 1:length(nMx) - 1,
  radix = 1e+05,
  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

nMx

numeric. Vector of mortality rates in abridged age classes.

Age

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

radix

numeric. Lifetable radix, l0. Default 100000.

a0rule

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

Sex

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

region

character. North, East, South, or West: "n", "e", "s", "w". Default "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.

...

Other arguments to be passed on to the MortalityLaw function.

Details

Similar to lt_abridged() details, forthcoming

Value

Lifetable in data.frame with columns

  • Age integer. Lower bound of abridged age class

  • AgeInt integer. Age class widths.

  • nMx numeric. Age-specific central death rates.

  • nAx numeric. Average time spent in interval by those deceased in interval.

  • nqx numeric. Age-specific conditional death probabilities.

  • lx numeric. Lifetable survivorship

  • ndx numeric. Lifetable deaths distribution.

  • nLx numeric. Lifetable exposure.

  • Sx numeric. Survivor ratios in uniform 5-year age groups.

  • Tx numeric. Lifetable total years left to live above age x.

  • ex numeric. Age-specific remaining life expectancy.


timriffe/DemoTools documentation built on Oct. 14, 2024, 12:53 p.m.