Learn R Programming

LEdecomp (version 1.0.4)

chandrasekaran_II: II approach of Chandrasekaran decomposition approach

Description

Following the notation given in Ponnapalli (2005), and the decomposition method can written as: $$ _{n}\Delta_{x} = \frac{(e_x^2 - e_x^1)(l_x^2 + l_x^1)}{2} - \frac{(e_{x+n}^2 - e_{x+n}^1)(l_{x+n}^2 + l_{x+n}^1)}{2} - \frac{_{n}L_{x}^{1}}{l_{x}^{1}} + \frac{T_{x+n}^{2}}{l_{0}^{1}} \left( \frac{l_{x}^{1}}{l_{x}^{2}} - \frac{l_{x+n}^{1}}{l_{x+n}^{2}} \right) $$ where \(_{n}\Delta_{x}\) is the contribution of rate differences in age \(x\) to the difference in life expectancy implied by mx1 and mx2. This formula can be averaged between 'effect interaction deferred' and 'effect interaction forwarded' from the Ponnapalli (2005).

Usage

chandrasekaran_II(
  mx1,
  mx2,
  age = (1:length(mx1)) - 1,
  nx = rep(1, length(mx1)),
  sex1 = "t",
  sex2 = sex1,
  closeout = TRUE
)

Value

cc numeric vector with one element per age group, and which sums to the total difference in life expectancy between population 1 and 2.

Arguments

mx1

numeric vector of the mortality rates (central death rates) for population 1

mx2

numeric vector of the mortality rates (central death rates) for population 2

age

integer vector of the lower bound of each age group (currently only single ages supported)

nx

integer vector of age intervals, default 1.

sex1

character either the sex for population 1: Male ("m"), Female ("f"), or Total ("t")

sex2

character either the sex for population 2: Male ("m"), Female ("f"), or Total ("t") assumed same as sex1 unless otherwise specified.

closeout

logical. Default TRUE. Shall we use the HMD Method Protocol to close out the ax and qx values? See details.

Details

setting closeout to TRUE will result in value of 1/mx for the final age group, of ax and a value of 1 for the closeout of qx. This function gives numerically identical results to arriaga_sym(), lopez_ruzicka_sym(), and chandrasekaran_III().

References

arriaga1984measuringLEdecomp preston2000demographyLEdecomp Ponnapalli2005LEdecomp

Examples

Run this code
a <- .001
b <- .07
x <- 0:100
mx1 <- a * exp(x * b)
mx2 <- a/2 * exp(x * b)
cc <- chandrasekaran_II(mx1, mx2, age = x)
e01 <- mx_to_e0(mx1, age = x)
e02 <- mx_to_e0(mx2, age = x)
(delta <- e02 - e01)
sum(cc)

# \donttest{
 plot(x, cc)
# }

Run the code above in your browser using DataLab