Learn R Programming

poputils (version 0.6.1)

e0_to_lifetab_logit: Derive Life Tables that Match Life Expectancies, using a Brass Logit Model

Description

Turn life expectancies at birth into full life tables, using the Brass logit model. The method is simple and is designed for simulations or for settings with little or no data on age-specific mortality rates. In settings where data on age-specific mortality is available, other methods might be more appropriate.

Usage

e0_to_lifetab_logit(
  target,
  standard,
  infant = c("constant", "linear", "CD", "AK"),
  child = c("constant", "linear", "CD"),
  closed = c("constant", "linear"),
  open = "constant",
  radix = 1e+05,
  suffix = NULL
)

Value

A tibble.

Arguments

target

A data frame containing a variable called "e0", and possibly other varibles. See Details.

standard

A data frame containing variables called age and lx, and possibly others. See Details.

infant, child, closed, open

Methods used to calculate life expectancy. See lifetab() for details.

radix

Initial population for the lx column in the derived life table(s). Default is 100000.

suffix

Optional suffix added to life table columns.

Method

The method implemented by e0_to_lifetab_logit() is based on the observation that, if populations A and B are demographically similar, then, in many cases,

$$\text{logit}(q_x^{\text{B}}) \approx \alpha + \beta \text{logit}(q_x^{\text{A}})$$

where \(q_x\) is the life table probability of dying between birth and age \(x\). By definition, \(q_x = 1 - l_x\), where \(l_x\) is the standard life table function, with radix (\(l_0\)) equal to 1.

Given (i) target life expectancy, (ii) a set of \(l_x^{\text{A}}\)), (referred to as a "standard"), and (iii) a value for \(\beta\), e0_to_lifetab_logit() finds a value for \(\alpha\) that yields a set of \(q_x^{\text{B}}\)) with the required life expectancy. If populations A and B are similar, then \(beta\) is likely to close to 1.

The <code>target</code> argument

target is a data frame specifying life expectancies for each population being modelled, and, optionally, inputs to the calculations, and 'by' variables.

target contains the following variables:

  • A variable called "e0" giving life expectancy at birth.

  • Optionally, a variable called "beta" with values for \(\beta\). Can be an ordinary numeric vector or an rvec. If target does not include a "beta" variable, then e0_to_lifetab_logit() sets \(\beta\) to 1.

  • A variable called "sex". The "sex" variable must be supplied if the infant argument to e0_to_lifetab_logit() is "CD" or "AK", or if the child argument is "CD".

  • Optionally, 'by' variables. Typical examples are time, region, and model variant.

The <code>standard</code> argument

standard is a data frame specifying the \(l_x\) to be used with each life expectancy in target, and, optionally, values for the average age person-years lived by people who die in each group, \(_na_x\). Values in standard are age-specific.

standard contains the following variables:

  • A variable called "age", with labels that can be parsed by reformat_age().

  • A variable called "lx". Cannot be an rvec.

  • Additional variables used to match rows in standard to rows in target.

References

Brass W, Coale AJ. 1968. “Methods of analysis and estimation,” in Brass, W, Coale AJ, Demeny P, Heisel DF, et al. (eds). The Demography of Tropical Africa. Princeton NJ: Princeton University Press, pp. 88–139.

Moultrie TA, Timæus IM. 2013. Introduction to Model Life Tables. In Moultrie T, Dorrington R, Hill A, Hill K, Timæus I, Zaba B. (eds). Tools for Demographic Estimation. Paris: International Union for the Scientific Study of Population. online version.

See Also

  • tfr_to_asfr_scale Fertility equivalent of e0_to_lifetab_logit()

  • logit(), invlogit() Logit function

  • lifeexp() Calculate life expectancy from detailed inputs

Examples

Run this code
## create new life tables based on level-1
## 'West' model life tables, but with lower
## life expectancy

library(dplyr, warn.conflicts = FALSE)

target <- data.frame(sex = c("Female", "Male"), 
                     e0 = c(17.5, 15.6))

standard <- west_lifetab |>
    filter(level == 1) |>
    select(sex, age, lx)
    
e0_to_lifetab_logit(target = target,
                    standard = standard,
                    infant = "CD",
                    child = "CD")

## target is an rvec
library(rvec, warn.conflicts = FALSE)
target_rvec <- data.frame(sex = c("Female", "Male"), 
                          e0 = rnorm_rvec(n = 2,
                                          mean = c(17.5, 15.6),
                                          n_draw = 1000))
e0_to_lifetab_logit(target = target_rvec,
                    standard = standard)

Run the code above in your browser using DataLab