Learn R Programming

MortalityLaws (version 2.2.0)

mx_qx: mx to qx

Description

Function to convert mx into qx and back, using the constant force of mortality assumption (CFM).

Usage

mx_qx(x, nx, ux, out = c("qx", "mx"))

Value

A vector of rates

Arguments

x

Numeric vector of ages at the beginning of each age interval. For a full life table, use single-year ages (e.g., 0:110). For an abridged life table, use the lower bound of each interval (e.g., c(0, 1, 5, 10, ..., 110)).

nx

Length of the age-intervals.

ux

A vector of mx or qx.

out

Type of the output: mx or qx.