ineq_mld | R Documentation |
Calculate a lifetable column for the conditional mean log deviation index of inequality in survivorship.
ineq_mld(age, dx, ex, ax, distribution_type = c("aad", "rl"), check = TRUE)
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. |
distribution_type |
character. Either |
check |
logical. Shall we perform basic checks on input vectors? Default TRUE |
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
).
vanraalte2012LifeIneq \insertRefcowell1980LifeIneq
MortalityLaws::MortalityLaw
ungroup::pclm
MortalitySmooth::Mort1Dsmooth
data(LT)
# A vector containing the conditional MLD indices
MLD = ineq_mld(age=LT$Age,dx=LT$dx,ex=LT$ex,ax=LT$ax)
# The MLD from birth
MLD[1]
# The MLD conditional upon survival to age 10
MLD[11]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.