Inputlx: Convert a Life-table Survivorship Function into a Pace-Shape...

Description Usage Arguments Value nx handling nax handling Source Examples

Description

Given an age vector and corresponding survival probabilities a complete life-table is calculated and a pace-shape object constructed.

Usage

1
2
Inputlx(x, lx, nax = "udd", nx = "auto", last_open = FALSE,
  time_unit = "years")

Arguments

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 c("udd", "cfm")).

nx

Width of age interval [x, x+n) (either numeric scalar, numeric vector or "auto").

last_open

Is the last age group open (TRUE) or closed (FALSE, default)?

time_unit

The unit of the ages (by default "years").

Value

A pace-shape object.

nx handling

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 handling

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.

Source

Preston, Samuel H., Patrick Heuveline, and Michel Guillot (2001). Demography: Measuring and modeling population processes. Oxford: Blackwell.

Examples

1
2
3
4
5
Inputlx(x = prestons_lx$x, lx = prestons_lx$lx)
# open last age group
Inputlx(x = prestons_lx$x, lx = prestons_lx$lx, last_open = TRUE)
# different nax assumptions
Inputlx(x = prestons_lx$x, lx = prestons_lx$lx, nax = "cfm")

jschoeley/pash documentation built on May 20, 2019, 2:07 a.m.