Functions & Formulae

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

Penalised-likelihood ranking of candidate survival models

IC(lnL, k, n) = -2 * lnL + penalty(k, n)

Maps the maximised log-likelihood and the number of estimated parameters of each model fitted to the same data to an information criterion, a fit statistic with a penalty for each extra parameter. Lower values rank higher, and only differences between models fitted to the same observations carry meaning. In health technology assessment the candidates are usually parametric survival curves fitted to trial time-to-event data before extrapolation. The criteria measure fit within follow-up only, so they inform but do not settle the choice of curve.

  • Akaike information criterion from the maximised log-likelihood

    AIC = 2 * k - 2 * lnL

    Akaike's criterion charges a penalty of 2 for each estimated parameter. A more complex model is therefore preferred only if each extra parameter raises the maximised log-likelihood by more than one unit. Because it compares maximised likelihoods rather than testing one model against another, it can rank survival distributions that are not nested within one another.

  • AIC difference from the best-scoring candidate model

    delta = AIC_i - AIC_min

    Rescales each model's AIC to its distance from the smallest AIC in the candidate set, so the best model scores 0 and the arbitrary constant cancels. On Burnham and Anderson's rule of thumb, a difference of 2 or less indicates substantial support, 4 to 7 considerably less, and above 10 almost none.

  • Akaike weight of a candidate model

    w = exp(-delta / 2) / S

    Converts AIC differences into weights that sum to 1 across the R candidate models. The weight w_i equals exp(-delta_i/2) divided by S, where S is the sum of exp(-delta_r/2) over all R candidates. It is read as the weight of evidence that the model is the best approximating model in the set, given the data. Adding or removing a candidate changes every weight.

  • Bayesian information criterion as a companion to AIC

    BIC = k * log(n) - 2 * lnL

    Schwarz's criterion replaces the AIC penalty of 2 per parameter with the natural logarithm of the sample size, so the penalty grows with n. With 300 patients it is about 5.70 per parameter, and BIC leans towards simpler distributions. NICE DSU TSD 14 recommends presenting AIC and BIC, or other suitable tests of internal validity, when survival models are compared. The function log is the natural logarithm.

  • Small-sample corrected Akaike information criterion (AICc)

    AICc = 2 * k - 2 * lnL + 2 * k * (k + 1) / (n - k - 1)

    Adds a second-order correction to AIC that matters when the number of parameters is large relative to the sample size. The correction shrinks towards 0 as n grows, so AICc converges to AIC. Burnham and Anderson recommend AICc unless the ratio of sample size to parameters exceeds about 40, which makes it relevant for small trial arms.