Functions & Formulae

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

Counterfactual survival and re-censoring function for treatment switching in a randomised trial

s(T_off, T_on, psi, k, C, delta) = (U, G, D, U_star, delta_star)

Maps one trial patient's observed time off and on the experimental treatment, a treatment effect psi, a modifier k, the potential censoring time and the event indicator to the survival the patient would have had with no experimental treatment, the time the treatment added, and the re-censored time and event indicator used in the adjusted analysis. HE-FM-TRES-001 holds the rank preserving structural failure time model, HE-FM-TRES-002 the re-censoring step, and the Computational Function HE-CF-TRES-001 estimates psi by the g-test. Whole-time scaling at a percentile of a reference curve is HE-FM-AFT-002, and HE-FM-AFT-001 gives a time ratio from an accelerated failure time coefficient, so those records are cited, not restated. Censoring switchers and reweighting non-switchers is HE-FM-DCEN-001, HE-FM-DCEN-002 and HE-FM-DCEN-003. An adjusted hazard ratio fitted to the counterfactual data and its log-scale interval are HE-FM-HR-002 and HE-FM-HR-006. The article's ICERs of GBP 85,714 and GBP 51,429 per QALY are HE-FM-ICER-001 applied to an incremental cost of GBP 30,000 and QALY gains of 0.35 and 0.58333, the gains being HE-FM-QALY-001 with one period at a utility of 0.7. Notation follows the Treatment Switching article.

  • Counterfactual untreated survival time of a trial patient under the rank preserving structural failure time model

    U = T_off + T_on * exp(k * psi); G = T_off + T_on - U

    Converts a patient's observed survival into the survival the patient would have had with no experimental treatment. Time off the experimental treatment counts in full and time on it is multiplied by exp(k * psi), so a beneficial treatment, with psi below zero, shrinks the time spent on it. With k of 1 this is the model Allison and colleagues print as equation 1 and TSD 24 as equation 1, in which the effect per unit of time on treatment is common to all patients. A k other than 1 is the treatment-effect modifier Allison and colleagues print for testing that assumption. G is the time the treatment added, the observed survival less U (derived), which equals T_on times the quantity 1 minus exp(k * psi). The formula takes psi as an input; HE-CF-TRES-001 estimates it. Two-stage methods use the same algebra with the time to the secondary baseline as T_off, the time after it as T_on and psi as minus the log of an acceleration factor from HE-FM-AFT-001 (derived from Jackson and colleagues' equation 2).

  • Re-censoring a counterfactual survival time at the earliest possible censoring time

    D = min(C, C * exp(k * psi)); U_star = min(U, D); delta_star = delta * (U <= D)

    Replaces a patient's potential censoring time by the smallest value it can take on the counterfactual scale. A beneficial treatment shrinks the counterfactual time of a treated patient, so censoring that was uninformative on the observed scale may depend on prognosis once times are converted (Allison and colleagues; TSD 16 Appendix A). D is the smaller of C and C * exp(k * psi). If U is above D the patient's time is cut to D and the event is treated as not seen. An event at U equal to D is kept, as Allison and colleagues replace U only when D is below U. U comes from HE-FM-TRES-001. U_star and the comparison U <= D take the form of the last two parts of HE-FM-ADMC-001 with U as the event time and D as the censoring time (derived), and delta carries over the original status so that a patient censored in the trial stays censored.

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/treatment-switching/formulae