Description Usage Arguments Value nx handling nax handling Source Examples
Given an age vector and corresponding survival probabilities a complete life-table is calculated and a pace-shape object constructed.
1 2 |
x |
Start of the age interval. |
lx |
Probability to survive up until age x. |
nax |
Subject-time alive in [x, x+n) for those who die in same interval
(either numeric scalar, numeric vector or one of |
nx |
Width of age interval [x, x+n) (either numeric scalar, numeric
vector or |
last_open |
Is the last age group open (TRUE) or closed (FALSE, default)? |
time_unit |
The unit of the ages (by default "years"). |
messages |
Mesages/warnings ON (TRUE) or OFF (FALSE). |
A pace-shape object.
For nx you may provide either a numeric scalar, a
numeric vector, or let the function determine the width for you
("auto"
, default). A scalar will be recycled for each age group. A
vector must be as long as the age vector and allows you to specify the
width of each age group separately. By default, the width of the age
groups are calculated from differencing the age vector.
nax may be provided as either a numeric scalar, a
numeric vector, or calculated via the uniform distribution of deaths
(udd
) method (default) or the constant force of mortality assumption
(option cfm
).
The (udd
) method assumes a linear decline of the l(x) function over
the width of an age group, implying that those who die in that age group
die on average halfway into it (also known as the "midpoint" assumption):
nax = n/2 (see Preston et al. 2001, p. 46)
Assuming the mortality rate during age interval [x, x+n) to be constant
(cfm
method) implies an exponentially declining l(x) function
within [x, x+n) and will produce nax values smaller than those calculated
via the udd
method. Preston et al. (2001, p. 46) provide an expression
for nax given the assumption of constant mortality. Restating this expression
in terms of nqx and npx leads to:
nax = -n/nqx - n/log(npx) + n
If the last age group is open and the udd
or cfm
method is
used, then the last nmx value is log-linearly extrapolated based on the
preceding two nmx and the nax, and the ex for the last age group id
calculated using the constant hazard assumption.
Preston, Samuel H., Patrick Heuveline, and Michel Guillot (2001). Demography: Measuring and modeling population processes. Oxford: Blackwell.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.