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)

## Arguments

nMx numeric. Vector of mortality rates in abridged age classes. numeric. Average time spent in age interval of those that die in the interval. integer. Vector of age class widths. Default inferAgeIntAbr(Age = Age). logical. Set final age to 1 if TRUE. Identity otherwise. Default TRUE. numeric. Optional q0 to impute, in case available separately.

## Details

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!

## Examples

# implies a qx > 1
mx     <- .65
AgeInt <- 5
ax     <- 2.5
# this is a problematic case
(AgeInt * mx) / (1 + (AgeInt - ax) * mx)
#>  1.238095# here a workable value
(lt_id_ma_q(mx, ax, AgeInt, closeout = FALSE))
#>  0.9612258#' # still less than 1
lt_id_ma_q(1.99, ax, AgeInt, closeout = FALSE) < 1
#>  TRUE# unity
(lt_id_ma_q(2, ax, AgeInt, closeout = FALSE))
#>  0.9999546# qx imputed as 1
(lt_id_ma_q(2.1, ax, AgeInt, closeout = FALSE))
#>  0.9999725