Learn R Programming

LEdecomp (version 1.0.4)

sen_arriaga_sym_instantaneous: Instantaneous sensitivity via symmetrical Arriaga decomposition

Description

Estimates the sensitivity of life expectancy to small changes in age-specific mortality rates using the symmetrical Arriaga decomposition. This is done by applying a small multiplicative perturbation to the input mortality rates and using the symmetrical sensitivity function sen_arriaga_sym().

Specifically, the function constructs: $$m_{x}^{1} = m_x \cdot \left(\frac{1}{1 - h}\right)$$ $$m_{x}^{2} = m_x \cdot (1 - h)$$ and applies sen_arriaga_sym(mx1, mx2, ...) to the result.

Usage

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

Value

numeric vector of life expectancy sensitivity 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)

sex

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

nx

integer vector of age intervals, default 1.

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 function yields an instantaneous approximation to the derivative of life expectancy with respect to mortality, evaluated at the input schedule. Because sen_arriaga_sym() is itself symmetrical, only the "forward" perturbation is required.

See Also

sen_arriaga_sym, sen_arriaga_sym_instantaneous2, sen_lopez_ruzicka_instantaneous

Examples

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

Run the code above in your browser using DataLab