ineq_cp: ineq_cp

View source: R/indices.R

ineq_cpR Documentation

ineq_cp

Description

Calculate Kannisto's C-measures from a lifetable

Usage

ineq_cp(age, lx, p = 0.5, check = TRUE)

Arguments

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

Details

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)

References

\insertRef

kannisto2000LifeIneq

Examples


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))

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