ineq_cp | R Documentation |
Calculate Kannisto's C-measures from a lifetable
ineq_cp(age, lx, p = 0.5, check = TRUE)
age |
numeric. vector of lower age bounds. |
lx |
numeric. vector of the lifetable survivorship. |
p |
numeric. What proportion of the life table cohort do you want captured in the C measure? The default is .5 |
check |
logical. Shall we perform basic checks on input vectors? Default TRUE |
The age
and lx
vectors must be the same length. This function estimates the shortest distance between two ages containing p
proportion of the life table cohort's death. The mechanics behind the function are to fit a monotonic cubic spline through the survival curve to estimate continuous surivorship between age intervals. If your data have an upper age bound lower than 110, consider extrapolation methods, for instance a parametric Kannisto model (implemented in package MortalityLaws
).
The concept behind Kannisto's C-measures is found in Kannisto (2000)
kannisto2000LifeIneq
data(LT)
# The shortest age range containing half of the deaths
(C50 <- ineq_cp(age=LT$Age,lx=LT$lx,p=.5))
# The shortest age range containing 80% the deaths
(C80 <- ineq_cp(age=LT$Age,lx=LT$lx,p=.8))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.