Learn R Programming

demography (version 2.0)

lifetable: Construct lifetables from mortality rates

Description

Computes period and cohort lifetables from mortality rates for multiple years.

Usage

lifetable(
  data,
  series = names(data$rate)[1],
  years = data$year,
  ages = data$age,
  max.age = min(100, max(data$age)),
  type = c("period", "cohort")
)

Value

Object of class “lifetable” containing the following components:

label

Name of region from which data are taken.

series

Name of series

age

Ages for lifetable

year

Period years or cohort years

mx

Death rate at age x.

qx

The probability that an individual of exact age x will die before exact age x+1.

lx

Number of survivors to exact age x. The radix is 1.

dx

The number of deaths between exact ages x and x+1.

Lx

Number of years lived between exact age x and exact age x+1.

Tx

Number of years lived after exact age x.

ex

Remaining life expectancy at exact age x.

Note that the lifetables themselves are not returned, only their components. However, there is a print method that constructs (and returns) the lifetables from the above components.

Arguments

data

Demogdata object such as obtained from read.demogdata, forecast.fdm or forecast.lca.

series

Name of series to use. Default is the first series in data[["rate"]].

years

Vector indicating which years to include in the tables.

ages

Vector indicating which ages to include in table.

max.age

Age for last row. Ages beyond this are combined.

type

Type of lifetable: period or cohort.

Author

Heather Booth, Leonie Tickle, Rob J Hyndman, John Maindonald and Timothy Miller

Details

For period lifetables, all years and all ages specified are included in the tables. For cohort lifetables, if ages takes a scalar value, then the cohorts are taken to be of that age in each year contained in years. But if ages is a vector of values, then the cohorts are taken to be of those ages in the first year contained in years.

For example, if ages=0 then lifetables of the birth cohorts for all years in years are computed. On the other hand, if ages=0:100 and years=1950:2010, then lifetables of each age cohort in 1950 are computed.

In all cases, \(q_x = m_x/(1+[(1-a_x)m_x])\) as per Chiang (1984).

Warning: the code has only been tested for data based on single-year age groups.

References

Chiang CL. (1984) The life table and its applications. Robert E Krieger Publishing Company: Malabar.

Keyfitz, N, and Caswell, H. (2005) Applied mathematical demography, Springer-Verlag: New York.

Preston, S.H., Heuveline, P., and Guillot, M. (2001) Demography: measuring and modeling population processes. Blackwell

See Also

life.expectancy

Examples

Run this code
france.lt <- lifetable(fr.mort)
plot(france.lt)
lt1990 <- print(lifetable(fr.mort,year=1990))

france.LC <- lca(fr.mort)
france.fcast <- forecast(france.LC)
france.lt.f <- lifetable(france.fcast)
plot(france.lt.f)

# Birth cohort lifetables, 1900-1910
france.clt <- lifetable(fr.mort,type="cohort",age=0, years=1900:1910)

# Partial cohort lifetables for 1950
lifetable(fr.mort, years=1950)

Run the code above in your browser using DataLab