Accepts either single age or 5-year abridged data. Accepts many optional arguments, such as differing methods for a(x) estimation, optional smoothing for M(x) or a(x) values, a changeable radix.
1 2 3 |
Nx |
numeric vector of population exposures by age. |
Dx |
numeric vector of death counts by age. |
Mx |
numeric vector of central death rates (assumed in the function to be the lifetable m(x)), calculated as deaths/exposure. |
ages |
optional, default = |
axmethod |
either |
sex |
either |
mxsmooth |
logical, default = |
axsmooth |
logical, default = |
radix |
The lifetable starting population at age 0, l(0). default = 1. Other common values are 1000 and 100000, although any value may be given. |
verbose |
logical, default = |
... |
further arguments passed to or from other methods |
Either Nx
must be specified along with Dx
, *or* Mx
must be specified directly. If smoothing is used, it is better to specify both Nx
and Dx
, since the Nx
vector can be used as an offset in the MortalitySmooth
smoother.
a list is invisibly returned
LT
A data.frame
with 11 columns and as many rows as you have ages. The columns are "Age" (character age labels, i.e. with "+"), "ages" (numeric), "mx", "ax", "qx", "px", "lx", "dx", "Lx", "Tx", "ex"
.
All the individual components of the lifetable can be called and are unrounded when individually called. Some additional values are also available:
Age
character vector of ages. Denotes intervals in the case of an abridged table.
ages
numeric vector of ages. Left side of interval.
mx
the lifetable mx (may differ from a given Mx).
ax
Chiang's ax, either given by the user or estimated in axEstimate
.
qx
typical lifetable qx. Death probability for interval x, x + n.
lx
typical lifetable lx. Number of radix individuals entering age x. l(0) = the radix population.
dx
typical lifetable dx. When radix = 1
(default), this is the probability density function of deaths.
Lx
typical lifetable Lx. Lifetable exposure for the interval x,x+n.
Tx
typical lifetable Tx. Total number of years remaining to be lived by the cohort entering age x.
ex
typical lifetable ex. Life remaining life expectancy at age x. e(0) = life expectancy at birth. Two other estimates of e(0) are given below.
Sx
probability of surviving from age x until age x + n (L_x+n/L_x).
Widths
vector of age intervals (n).
Tim Riffe
The main reference for this function has been:
Preston et al (2001). Demography: Measuring and Modelling Population Processes. Blackwell Publishing
ax estimation also received input from:
Chiang C.L.(1968) Introduction to Stochastic Processes in Biostatistics. New York: Wiley.
Coale Anseley and Paul Demeny, with B Vaughan (1983). Regional Model Life Tables and Stable Populations. New York Academic Press.\ Keyfitz, Nathan (1966) A Life Table that Agrees with the Data. Journal of the American Statistical Association, 61 (314):305-12. As described on page 44-45 of: Schoen R. (1978) Calculating lifetables by estimating Chiang's a from observed rates. Demography 15: 625-35.
function calls MortalitySmooth
: Carlo G Camarda (2009) MortalitySmooth: Smoothing Poisson counts with P-splines. (version 2.3 at the time of this writing) http://CRAN.R-project.org/package=MortalitySmooth.
MortalitySmooth
, axEstimate
.
1 2 3 4 |
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.