ineq_aid: ineq_aid

View source: R/indices.R

ineq_aidR Documentation

ineq_aid

Description

Calculate a lifetable column for the conditional absolute inter-individual difference in lifespan (AID).

Usage

ineq_aid(age, dx, ex, ax, check = TRUE)

Arguments

age

numeric. vector of lower age bounds.

dx

numeric. vector of the lifetable death distribution.

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 package MortalityLaws). 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).

The formula for calculating the AID was taken from the Shkolnikov 2010 spreadsheet, and is a simplification of the formula described in Shkolnikov 2003. This is the absolute version of ineq_gini. Note that although ineq_gini() has both distribution types possible (age-at-death or remaining life), the aid would be the same value no matter how you calculate the gini.

References

\insertRef

shkolnikov2010LifeIneq \insertRefshkolnikov2003LifeIneq

See Also

MortalityLaws::MortalityLaw

ungroup::pclm

MortalitySmooth::Mort1Dsmooth

Examples


data(LT)
# A vector containing the conditional absolute inter-individual difference in lifespan
aid = ineq_aid(age=LT$Age,dx=LT$dx,ex=LT$ex,ax=LT$ax)
# The absolute inter-individual difference in lifespan from birth
aid[1]
# The absolute inter-individual difference in lifespan from age 10
aid[11]

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