R/lt_regroup_age.R
lt_abridged2single.Rd
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, ... )
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 |
a0rule | character. Either |
Sex | character. Either male |
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 |
mod | logical. If |
SRB | the sex ratio at birth (boys / girls), default 1.05 |
OAG | logical. Whether or not the last element of |
OAnew | integer. Desired open age group (5-year ages only). Default |
extrapLaw | character. If extrapolating, which parametric mortality law should be invoked? Options include
|
extrapFrom | integer. Age from which to impute extrapolated mortality. |
extrapFit | integer vector. Ages to include in model fitting. Defaults to all ages |
... | optional arguments passed to |
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.
Similar to lt_abridged()
details, forthcoming.
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.02979LT1$ex[1]#> [1] 34.50728