Functions & Formulae

Each applied formula has its own function page, with a signature, implementations, and tests.

Actuarial life table function from interval counts of deaths and withdrawals

a(n_i, d_i, w_i) = (n_e_i, q_i, S_i, SE_i); r(R_0, R_1, S_0, S_1) = (D, C)

Maps the counts of a follow-up table, the number entering each fixed interval with its deaths and withdrawals, to the effective number at risk, the conditional probabilities and the running survival (HE-FM-LTM-001) and Greenwood's standard error with a log-log interval (HE-FM-LTM-002). It also runs the relation backwards, taking numbers at risk and survival read off a published curve and returning estimated events and censorings (HE-FM-LTM-003). The Computational Function HE-CF-LTM-001 runs a whole table. The product step takes the form of the Kaplan-Meier step HE-FM-ADMC-002, whose n_j is the number under observation just before an event time (HE-VR-ADMC-010); the half count of withdrawals in grouped data is what differs here. Kaplan and Meier's two bounds on the factor are the HE-FM-ADMC-002 factor with n_j set to n or to n minus w (derived). Converting a one-year interval probability to another cycle length is HE-CF-TP-002, and the rescaling HE-FM-TP-003 covers any interval length. Using a rate is HE-FM-TP-001, the trapezoid area under the yearly survival points is the LY output of HE-CF-PSM-001 with its discount rate d of 0, and reading conditional probabilities back from a survival curve is HE-CF-MKA-001. Notation follows the Life Table Method article, with n_e for its n prime and S_prev for the survival carried into the interval.

  • Actuarial survival through one interval with withdrawals counted as half

    n_e = n - w / 2; q = d / n_e; p = 1 - q; S = S_prev * p; n_next = n - d - w

    Takes the number entering an interval, its deaths and its withdrawals, and removes half of the withdrawals from the denominator to give the effective number at risk. Deaths over that number give the conditional probability of dying in the interval, and its complement multiplies the survival carried in. The number entering the next interval is what remains after all deaths and withdrawals. The product step has the form of HE-FM-ADMC-002, but the denominator is outside that record's n_j (HE-VR-ADMC-010), since it counts half of the people who withdrew and refers to no single event time. With no withdrawals in the interval the factor equals the HE-FM-ADMC-002 factor with n_j of n (derived).

  • Greenwood standard error and log-log interval of actuarial survival

    G = G_prev + d / (n_e * (n_e - d)); SE_S = S * sqrt(G); s_LL = sqrt(G) / abs(log(S)); S_lo = S^exp(z * s_LL); S_hi = S^exp(-z * s_LL)

    Adds the current interval's term d / (n_e (n_e minus d)) to the running sum and multiplies the square root of the sum by survival, which is Greenwood's formula as Stata states it for ltable, with the effective number n_e of HE-FM-LTM-001 as the denominator. Stata does not build its interval from this standard error because such limits can fall outside the range of a probability. It works on the log(minus log S) scale, with s_LL the square root of the sum divided by the absolute sum of the log factors, and raises S to exp(z s_LL) and exp(minus z s_LL). That sum of logs equals log S (derived), which is how the line writes it. With no withdrawals the standard error equals SE_p of HE-FM-BINOM-004 with p_hat of S and n of the number first entering (derived; 0 mismatches on a grid).

  • Events and censorings in an interval from a published curve and numbers at risk

    D = (R_0 + R_1) * (S_0 - S_1) / (S_0 + S_1); C = 2 * (S_1 * R_0 - S_0 * R_1) / (S_0 + S_1)

    Runs the actuarial relation backwards. Given the numbers at risk at the start and end of an interval and the survival read off the published curve at those times, the two relations of Hoyle and Henley's equation 1a, the HE-FM-LTM-001 step for survival and the count recursion for the numbers at risk, have one solution, their equation 1b. Hoyle and Henley attribute the method to Parmar and to Williamson with their colleagues and say Tierney and colleagues provided a spreadsheet to implement it. Tierney and colleagues print the same two expressions in their section 11. Hoyle and Henley fit survival curves to the resulting counts, and earlier work used them to estimate hazard ratios.

This set of formulae is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/concept/life-table-method/formulae