Functions & Formulae

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

Delta-adjusted analysis of QALYs lost to follow-up with its tipping-point shift

m(E_obs_T, E_obs_C, p_T, p_C, delta, r, Delta_C, lambda) = (Delta_E, ICER, delta_star)

Takes each arm's mean QALYs among participants still followed, the proportion of each arm lost to follow-up, an assumed shift delta in the mean QALYs of those lost from the new treatment arm, a ratio r that sets the shift for those lost from usual care at r times delta, the incremental cost and a cost-effectiveness threshold, and returns the delta-adjusted QALY gain and ICER under that shift and the tipping-point shift at which the conclusion changes. The arm mean over everyone randomised, E_bar, is one minus p times E_obs plus p times (E_obs plus delta), which equals E_obs plus p times delta. That is the two-part mixture of HE-FM-LOCF-001 with tau read as p, mu_end as E_obs and mu_last as E_obs plus delta, so its bias_mu, tau times (mu_last minus mu_end), becomes p times delta. The QALY gain under shifts in both arms is Delta_tilde of HE-FM-LOCF-002 with the same reading in each arm, the observed gain plus p_T times delta_T minus p_C times delta_C, here with delta_T equal to delta and delta_C equal to r times delta. The ICER under a shift is HE-FM-ICER-001 and the gain needed at the threshold, Delta_C / lambda, is H_d of HE-FM-CET-002. These live records are cited, not restated, and HE-CF-LTFU-001 runs them in sequence for the article's scenarios. The inverse probability of censoring weights of HE-FN-DCEN-001 and HE-FM-DCEN-001 to HE-FM-DCEN-004 assume that censoring is unrelated to the unseen outcome once measured covariates are allowed for, and the administrative censoring time of HE-FM-ADMC-001 is set by design, so neither represents a departure from missing at random. This package adds the shift at which the delta-adjusted QALY gain falls to Delta_C / lambda. Notation follows the Loss to Follow-Up article.

  • Tipping-point shift for QALYs lost to follow-up at a cost-effectiveness threshold

    H_d = Delta_C / lambda; delta_star = (H_d - Delta_E_obs) / (p_T - r * p_C)

    Sets the delta-adjusted QALY gain equal to the gain needed at threshold lambda, H_d = Delta_C / lambda (HE-FM-CET-002), and solves for the shift. With a shift delta for those lost from the new treatment arm and r times delta for those lost from usual care, the gain is Delta_E_obs plus (p_T minus r times p_C) times delta (HE-FM-LOCF-002 read as in HE-FN-LTFU-001), so the tipping-point shift is H_d minus Delta_E_obs, divided by p_T minus r times p_C (derived). Setting r = 0 confines the shift to the new treatment arm and gives the article's delta_star = (Delta_C / lambda minus Delta_E_obs) / p_T, and r = 1 applies the same shift to both arms, when only the difference in the proportions lost moves the gain. A negative delta_star is a QALY shortfall for those lost that the base case can absorb. When the denominator is positive the base-case conclusion holds for every shift that lies on the same side of delta_star as zero.