buildMdtFromIndependentRates: Build an mdt object from a matrix of independent (ASDT) rates

View source: R/8_mdtFunctions.R

buildMdtFromIndependentRatesR Documentation

Build an mdt object from a matrix of independent (ASDT) rates

Description

buildMdtFromIndependentRates constructs a multiple-decrement table (mdt) from a matrix of independent single-decrement rates q'^{(j)}_x, the inverse of independentRatesFromMdt.

Usage

buildMdtFromIndependentRates(
  x,
  qx.primes,
  radix = 1e+05,
  name = "ASDT-built mdt"
)

Arguments

x

Integer vector of ages (must be consecutive and start at 0 after internal completion by new("mdt", ...)). If missing, ages 0:(nrow(qx.primes)-1) are used.

qx.primes

Numeric matrix of independent rates. Rows correspond to ages in x, columns to decrement causes. Column names, if any, become the decrement identifiers in the resulting table; otherwise generic names d1, d2, ... are used.

radix

Radix (initial cohort size). Default 100 000.

name

Character string for the table name. Default "ASDT-built mdt".

Details

For each age the combined (absolute) rate of decrement j is obtained by the UDD-based integration formula

q^{(j)}_x = q'^{(j)}_x \int_0^1 \prod_{i \ne j} \bigl(1 - s\,q'^{(i)}_x\bigr)\,ds,

which is the same formula used by qxt.fromQxprime for a single age. The resulting absolute rates are multiplied by l^{(\tau)}_x to obtain the decrement counts, and the survivorship column is computed recursively from p^{(\tau)}_x = \prod_j (1 - q'^{(j)}_x).

Value

An mdt object.

See Also

independentRatesFromMdt for the reverse extraction, qxt.fromQxprime for the single-age formula.

Examples

# Finan (2014) Example 67.4:
# Three decrements (death, disability, retirement) at ages 60-61.
qp <- matrix(c(0.010, 0.030, 0.100,
                0.013, 0.050, 0.200), nrow = 2, byrow = TRUE,
              dimnames = list(NULL, c("death", "disability", "retirement")))
mdt674 <- buildMdtFromIndependentRates(x = 60:61, qx.primes = qp,
                                        radix = 1000, name = "Finan 67.4")
print(mdt674)


lifecontingencies documentation built on Oct. 10, 2026, 9:06 a.m.