lt_model_lq: Estimate Wilmoth Model Life Table

View source: R/lt_model_lq.R

lt_model_lqR Documentation

Estimate Wilmoth Model Life Table

Description

Construct model life tables based on the Log-Quadratic (Wilmoth) estimates with various choices of 2 input parameters: q0_5, q0_1, q15_45, q15_35 and e0. There are 8 possible combinations (see examples below).

Usage

lt_model_lq(
  Sex,
  fitted_logquad = NULL,
  q0_5 = NULL,
  q0_1 = NULL,
  q15_45 = NULL,
  q15_35 = NULL,
  e0 = NULL,
  radix = 1e+05,
  tol = 1e-09,
  maxit = 200,
  axmethod = "pas",
  a0rule = "ak",
  IMR = NA,
  region = "w",
  mod = TRUE,
  SRB = 1.05
)

Arguments

Sex

Choose the sex of the population. This choice defines the use of a corresponding Log-Quadratic (wilmoth) model fitted for the whole Human Mortality Database (as of Dec 2019, there are 968 life tables for each sex). The following options are available:

  • "b" – Both sex;

  • "f" – Females;

  • "m" – Males.

fitted_logquad

Optional, defaults to NULL. An object of class wilmoth. If full HMD is not enough, one can fit a Log-Quadratic (https://github.com/mpascariu/MortalityEstimate) model based on any other collection of life tables;

q0_5

5q0. The probability that a new-born will die during the subsequent 5 years;

q0_1

1q0. The probability that a life aged 0 will die during the following year;

q15_45

45q15. The probability that a life aged 15 will die during the subsequent 45 years;

q15_35

35q15. The probability that a life aged 15 will die during the subsequent 35 years;

e0

Life expectancy at birth;

radix

Life table radix. Default: 10^5;

tol

Tolerance level for convergence. The tolerance level, is relevant for case 7 and 8 (e0 and 45q15 or 35q15 are known);

maxit

Maximum number of iterations allowed. Default: 100;

axmethod

character. Either "pas" or "un".

a0rule

character. Either "ak" (default) or "cd".

IMR

numeric. Infant mortality rate q0, in case available and nqx is not specified. Default NA.

region

character. North, East, South, or West: "n", "e", "s", "w". Default "w".

mod

logical. If "un" specified for axmethod, whether or not to use Nan Li's modification for ages 5-14. Default TRUE.

SRB

the sex ratio at birth (boys / girls), default 1.05

Details

Due to limitations of the R language the notation for probability of dying nqx is written qx_n, where x and n are integers. For example 45q15 is represented as q45_15.

Value

The output is of class lt_model_lq with the components:

lt

Life table matching given inputs

values

Associated values of q0_5, q0_1, q15_45, q15_35 and e0.

Note

This function is ported from MortalityEstimate::wilmothLT experimental package by Marius Pascariu. The package is no longer maintained. The latest version can be found here: https://github.com/mpascariu/MortalityEstimate

Examples


# Build life tables with various choices of 2 input parameters
# case 1: Using 5q0 and e0
L1 <- lt_model_lq(Sex = "b", q0_5 = 0.05, e0 = 65)
L1
ls(L1)

L1f <- lt_model_lq(Sex = "f", q0_5 = 0.05, e0 = 65)
L1m <- lt_model_lq(Sex = "m", q0_5 = 0.05, e0 = 65)

# case 2: Using 5q0 and 45q15
L2 <- lt_model_lq(Sex = "b", q0_5 = 0.05, q15_45 = 0.2)

# case 3: Using 5q0 and 35q15
L3 <- lt_model_lq(Sex = "b", q0_5 = 0.05, q15_35 = 0.125)

# case 4: Using 1q0 and e0
L4 <- lt_model_lq(Sex = "b", q0_1 = 0.01, e0 = 65)

# case 5: Using 1q0 and 45q15
L5 <- lt_model_lq(Sex = "b", q0_1 = 0.05, q15_45 = 0.2)

# case 6: Using 1q0 and 35q15
L6 <- lt_model_lq(Sex = "b", q0_1 = 0.05, q15_35 = 0.125)

# case 7: Using 45q15 and e0
L7 <- lt_model_lq(Sex = "b", q15_45 = 0.125, e0 = 65)

# case 8: Using 35q15 and e0
L8 <- lt_model_lq(Sex = "b", q15_35 = 0.15, e0 = 65)


timriffe/DemoTools documentation built on Oct. 14, 2024, 12:53 p.m.