Inputnmx: Convert a Life-table Mortality Rate Function into a...

Description Usage Arguments Value nx handling nax handling Source Examples

Description

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

Usage

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

Arguments

x

Start of the age interval.

nmx

Mortality rate in age interval [x, x+nx).

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. If the last age group is supposed to be open make sure that the last value of your nx vector is NA. Should the last age group be closed, the width of the last age group is assumed to be equal to the width of the preceeding age group.

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

Source

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

Examples

1
2
swe <- subset(sweden5x5, sex == "female" & period == "1940-1944")[c("x", "nmx")]
Inputnmx(x = swe$x, nmx = swe$nmx, last_open = TRUE, nax = "cfm")

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