Learn R Programming

LEdecomp (version 1.0.4)

sen_chandrasekaran_II_instantaneous2: Log-space instantaneous sensitivity via Chandrasekaran II decomposition

Description

Estimates the sensitivity of life expectancy to small changes in mortality rates using the Chandrasekaran II decomposition. This variant perturbs the mortality rates in log space, creating two versions of mx by adding and subtracting a small constant to log(mx), then exponentiating.

Specifically: $$m_{x}^{1} = \exp\left( \ln m_x + h \right)$$ $$m_{x}^{2} = \exp\left( \ln m_x - h \right)$$ and applies sen_chandrasekaran_II(mx1, mx2, ...) to the result.

Usage

sen_chandrasekaran_II_instantaneous2(
  mx,
  age = (1:length(mx1)) - 1,
  nx = rep(1, length(mx)),
  sex = "t",
  perturb = 1e-06,
  closeout = TRUE
)

Value

numeric vector of sensitivity of life expectancy to perturbations in mx.

Arguments

mx

Numeric vector of mortality rates (central death rates).

age

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

nx

integer vector of age intervals, default 1.

sex

Character; "m" for male, "f" for female, or "t" for total.

perturb

Numeric; a small constant determining the perturbation size (default 1e-6).

closeout

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

Details

This approach provides a log-linear perturbation of the mortality schedule and can be used to estimate the derivative of life expectancy with respect to logged mortality rates. It gives numerically identical results to sen_arriaga_sym_instantaneous2(), sen_lopez_ruzicka_instantaneous2(), and sen_chandrasekaran_III_instantaneous2().

See Also

sen_chandrasekaran_II_instantaneous, sen_arriaga_sym_instantaneous2, sen_lopez_ruzicka_instantaneous2

Examples

Run this code
a <- 0.001
b <- 0.07
x <- 0:100
mx <- a * exp(x * b)
s <- sen_chandrasekaran_II_instantaneous2(mx, age = x)
# \donttest{
plot(x, s, type = "l")
# }

Run the code above in your browser using DataLab