lt.mx {LifeTables} | R Documentation |
Life tables from nmx
Description
Builds a life table by using the mortality rate schedule to calculate the subsequent columns of the table
Usage
lt.mx(nmx, sex="female", age = c(0,1,seq(5,110,5)), nax=NULL)
Arguments
nmx |
A vector of age-specific mortality rates |
age |
The start age of each age interval (will also be the start age for each interval of the subsequent life table) |
sex |
"male" or "female". The sex determines the nax value for the childhood age intervals using the Coale and Demeney West values when |
nax |
A set of nax values for the life table. Must have the same length as |
Value
e0 |
Life expectancy at birth |
lt |
A life table with age intervals matching those of the nmx schedule on which the table is built and with columns for age, nax, nmx, nqx, npx, ndx, lx, nLx, Tx, and ex. |
lt.5q0 |
The probability a newborn will die before age 5 |
lt.45q15 |
The probability a 15-year old will die before reaching age 60 |
Note
Depending on the mortality rates entered, the resulting life table may have fewer age groups than the length of the mortality rate schedule.
Author(s)
David Sharrow
Examples
# some data to build the table
data(MLTobs)
test.mx.m <- mlt.mx[,1]
# build the life table
lt.mx(nmx=test.mx.m, sex="male")
# another example with female data ages 0-85
test.mx.f <- flt.mx[1:19,1] ## ages 0-85
lt.mx(nmx=test.mx.f, sex="female", age=c(0,1,seq(5,85,5)))