ineq_edag: ineq_edag

View source: R/indices.R

ineq_edagR Documentation

ineq_edag

Description

Calculate a lifetable column for the average years of life lost at death (e^\dagger) of a population.

Usage

ineq_edag(age, dx, lx, ex, ax, check = TRUE)

Arguments

age

numeric. vector of lower age bounds.

dx

numeric. vector of the lifetable death distribution.

lx

numeric. vector of the lifetable survivorship.

ex

numeric. vector of remaining life expectancy.

ax

numeric. vector of the average time spent in the age interval of those dying within the interval.

check

logical. Shall we perform basic checks on input vectors? Default TRUE

Details

All input vectors must be the same length. Also, we recommend using input data from a life table by single year of age with a highest age group of at least age 110. If your data have a lower upper age bound, consider extrapolation methods, for instance a parametric Kannisto model (implemented in MortalityLaws::MortalityLaw). If your data are abridged, consider first smoothing over age, and calculating a life table by single year of age (for instance by smoothing with a pclm model in package ungroup or with a penalized B-spline approach in package MortalitySmooth).

References

\insertRef

vaupel1986LifeIneq \insertRefgoldman1986LifeIneq

See Also

MortalityLaws::MortalityLaw

ungroup::pclm

MortalitySmooth::Mort1Dsmooth

Examples


data(LT)
# A vector containing the conditional life disparity of a population
edag = ineq_edag(age=LT$Age,dx=LT$dx,lx=LT$lx,ex=LT$ex,ax=LT$ax)
# The life disparity from birth
edag[1]
# The life disparity conditional upon survival to age 10
edag[11]
## Not run: 
plot(0:110, edag, type='l')

## End(Not run)

alysonvanraalte/LifeIneq documentation built on March 12, 2024, 1:42 p.m.