View source: R/8_mdtFunctions.R
| buildMdtFromIndependentRates | R Documentation |
buildMdtFromIndependentRates constructs a multiple-decrement table
(mdt) from a matrix of independent single-decrement rates
q'^{(j)}_x, the inverse of independentRatesFromMdt.
buildMdtFromIndependentRates(
x,
qx.primes,
radix = 1e+05,
name = "ASDT-built mdt"
)
x |
Integer vector of ages (must be consecutive and start at 0 after
internal completion by |
qx.primes |
Numeric matrix of independent rates. Rows correspond to
ages in |
radix |
Radix (initial cohort size). Default 100 000. |
name |
Character string for the table name. Default |
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).
An mdt object.
independentRatesFromMdt for the reverse extraction,
qxt.fromQxprime for the single-age formula.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.