Skip to contents

Project single-age survivorship lx from a target life expectancy (e0). The function uses an iterative semi-approximate method.

Usage

proj_lx(ex_p, lx_model, axn_model, age_group.n = 101)

Arguments

ex_p

Target life expectancy at birth (e0) for one year.

lx_model

Reference survivorship vector from a model life table.

axn_model

Reference nax vector from a model life table.

age_group.n

Number of ages (default 101 for age 0-100).

Value

A projected survivorship vector lx.

Examples

data("inparm_scene", package = "fastproj")
if (requireNamespace("DemoTools", quietly = TRUE)) {
  inparm_lt <- mod_lx(0.00318, 76.75, 0.00264, 82.22)
  lx <- proj_lx(
    ex_p = inparm_scene[[1]][1, 2],
    lx_model = inparm_lt[[1]][, "lx"],
    axn_model = inparm_lt[[1]][, "nax"],
    age_group.n = 101
  )
  range(lx)
}
#> [1] 0.01005245 1.00000000