Learn R Programming

LEdecomp (version 1.0.4)

mx_to_ax: produce single-age ax values

Description

We assume mid-interval ax except for age 0 and potentially the open age group. ax is defined as the average years lived in each age interval by those that die within the interval, and it is used to increase the precision of lifetable estimates. We allow ourselves the midpoint rule for single ages because it has little leverage. If we were working with abridged ages then we would need to use a more sophisticated method.

Usage

mx_to_ax(
  mx,
  nx = rep(1, length(mx)),
  age = 0:(length(mx) - 1),
  sex = "t",
  closeout = TRUE
)

Value

numeric vector of ax values, the same length as mx

Arguments

mx

numeric vector of the mortality rates (central death rates)

nx

age interval width, assumes 1 by default

age

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

sex

character: Male ("m"), Female ("f"), or Total ("t")

closeout

logical. Default TRUE.

Details

For the case of Total sex, we estimate the male and female \(a(0)\) using the Andreev-Kingkade rule of thumb, and then average them. We assume a value of 1/2 for all other ages, unless closeout = TRUE, in which case we close with 1/mx for the final value.

References

andreev2015averageLEdecomp