lt_id_ma_q | R Documentation |
Sometimes a given age interval, death rate, and a(x) imply a death probability that is greater than 1. In this case either the interval needs to be extended or a(x) decreased. This especially arises with mid interval a(x) has been assumed in five-year age groups. This backstop reduces a(x) by assuming a constant death rate over the single ages within the interval, assuming mid interval a(x) for each single age, producing nq(x) by identity from the (5) single ages.
lt_id_ma_q(nMx, nax, AgeInt, closeout = TRUE, IMR)
nMx |
numeric. Vector of mortality rates in abridged age classes. |
nax |
numeric. Average time spent in age interval of those that die in the interval. |
AgeInt |
integer. Vector of age class widths. Default |
closeout |
logical. Set final age to 1 if TRUE. Identity otherwise. Default |
IMR |
numeric. Optional q0 to impute, in case available separately. |
nMx equal to 2 will imply nqx of 1 by this formula. Implied nqx greater than 1 after this procedure are returned as 1. This is not vectorized!
# implies a qx > 1
mx <- .65
AgeInt <- 5
ax <- 2.5
# this is a problematic case
(AgeInt * mx) / (1 + (AgeInt - ax) * mx)
# here a workable value
(lt_id_ma_q(mx, ax, AgeInt, closeout = FALSE))
#' # still less than 1
lt_id_ma_q(1.99, ax, AgeInt, closeout = FALSE) < 1
# unity
(lt_id_ma_q(2, ax, AgeInt, closeout = FALSE))
# qx imputed as 1
(lt_id_ma_q(2.1, ax, AgeInt, closeout = FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.