Signature
D = min(C, C * exp(k * psi)); U_star = min(U, D); delta_star = delta * (U <= D)
| Inputs | Definition | Unit |
|---|---|---|
C | Time from randomisation to the data cut-off for the patient, known for patients who died as well as for those still alive | months |
k | Same modifier as HE-FM-TRES-001, above zero and fixed at baseline; 1 gives the standard rule | ratio, no unit |
psi | Value of psi from HE-FM-TRES-001 at which the times are computed | log ratio, no unit |
U | Output of HE-FM-TRES-001 for the patient | months, the unit of C |
delta | 1 if the event was observed in the trial and 0 if the patient was censored | none (1 or 0) |
D | Earliest possible censoring time given the treatment effect, the smaller of C and C * exp(k * psi) | months, the unit of C |
|---|---|---|
U_star | Counterfactual time used in the adjusted analysis, the smaller of U and D | months, the unit of C |
delta_star | 1 if the event stays observed after re-censoring and 0 otherwise | none (1 or 0) |
Function
Counterfactual survival and re-censoring function for treatment switching in a randomised trial
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.
Try this function
Implementations
Excel
Re-censoring time cell for one patient
Named cells CensorTimePotential, PsiRecensor and ModifierRecensor hold the inputs and the formula goes in a cell named RecensorTime. A blank CensorTimePotential returns 0 with no error, because MIN ignores the blank reference and the product is 0, so the patient is then censored at time 0.
=MIN(CensorTimePotential,CensorTimePotential*EXP(ModifierRecensor*PsiRecensor))
Excel
Re-censored time and event cells for one patient
CounterfactualInput holds U and EventObservedInput holds delta. A cell named RecensoredSurvival holds the formula shown. A cell named RecensoredEvent holds
=EventObservedInput*(CounterfactualInput<=RecensorTime), where Excel treats the comparison as 1 or 0 in the product. A blank EventObservedInput counts as 0, so the patient is read as censored with no error.=MIN(CounterfactualInput,RecensorTime)
Assumptions
Every patient in an arm with switching is re-censored
TSD 24 section 4.2.1.1 says re-censoring estimates adjusted potential censoring times for all patients in an arm in which switching occurred, not only for those who switched. Allison and colleagues do not apply it in an arm where switching does not occur, since there is no informative censoring there, which may keep more events.
Censoring by reaching a calendar date
The rule takes censoring to happen when a patient survives to a specific calendar date, so C is known for every patient (Allison and colleagues). Jackson and colleagues section 4.1 note that further assumptions are needed for patients who drop out, for example treating the drop-out time as C if that censoring is uninformative on the observed scale.
Modifier fixed at baseline for re-censoring
With k other than 1 the rule uses C * exp(k * psi), which Allison and colleagues print for a k determined at baseline. A k observed after randomisation may need more complicated re-censoring, which their package does not implement.
Results are given with and without re-censoring
Re-censoring gives valid estimates up to the longest re-censored follow-up but loses longer-term data, and the loss grows with the effect because D depends on psi (TSD 24 section 4.2.1.1). TSD 24 reports that analyses with and without it were both prone to bias, often in opposite directions, and its recommendations ask that RPSFTM, IPE and two-stage analyses be run both ways for NICE.
Worked examples
Article's re-censoring time with the switcher's death kept
With administrative censoring at 36 months and exp(psi) of 0.6, D is 21.6 months, as in the article. The switcher's U of 12 months is below D, so the death stays observed. All inputs are illustrative.
C = 36; k = 1; psi = -0.510826; U = 12; delta = 1; D = 21.600; U_star = 12.000; delta_star = 1
Counterfactual death after the re-censoring time becomes censored
A control patient with a counterfactual death at 24 months has that death treated as censored at 21.6 months, as the article describes. The inputs are illustrative.
C = 36; k = 1; psi = -0.510826; U = 24; delta = 1; D = 21.600; U_star = 21.600; delta_star = 0
Switcher alive at the cut-off stays censored at an earlier time
A switcher alive at 36 months with 6 months off and 30 months on treatment has U of 24 months from HE-FM-TRES-001, censored. The time is cut to 21.6 months, which removes the link between the time of the switch and the censoring time. The inputs are illustrative.
C = 36; k = 1; psi = -0.510826; U = 24; delta = 0; D = 21.600; U_star = 21.600; delta_star = 0
Limiting case of a harmful treatment with psi above zero
With psi of 0.2 the product C * exp(psi) is above C, so D stays at 36 months and no data are lost; a counterfactual death at 30 months stays observed. The inputs are illustrative.
C = 36; k = 1; psi = 0.2; U = 30; delta = 1; D = 36.000; U_star = 30.000; delta_star = 1
Modifier of one half with psi held at the article value
With k of 0.5 and psi at the article's value D is 27.885 months in place of 21.6, so a counterfactual death at 24 months is now kept. Psi is held fixed for the arithmetic only, as in HE-EX-TRES-004. The inputs are illustrative.
C = 36; k = 0.5; psi = -0.510826; U = 24; delta = 1; D = 27.885; U_star = 24.000; delta_star = 1
Common errors
Re-censoring only the patients who switched
Cutting only switchers' times keeps the link between switching and censoring. TSD 24 section 4.2.1.1 says potential censoring times are adjusted for all patients in the arm, because the aim is to break the dependence between switching, censoring time and prognosis. In the article's example a non-switcher with a death at 30 months is cut to 21.6 months as well.
Re-censoring an arm with no switching
Allison and colleagues do not apply the rule in an arm where switching does not occur. They add that using the difference between arms can potentially keep more events, with a gain in efficiency. In a control arm with no switching at all, every U equals the observed time, and re-censoring with the article's values would still cut a death at 30 months to 21.6 (derived).
Leaving the event flag unchanged after cutting the time
A death at a counterfactual 24 months that is cut to 21.6 months and kept as a death puts an event at a time when none happened. Allison and colleagues replace the censoring indicator by 0 whenever D is below U.
Using the reciprocal factor for the re-censoring time
Writing C * exp(-k * psi) gives 60 months for a beneficial treatment in the article's example, so the MIN returns 36 and no re-censoring happens (derived). The correct D is 21.6 months.
Extrapolating from re-censored data without seeing what was lost
In the article's example re-censoring removes the 14.4 months of follow-up after 21.6 months, 40% of the 36 months observed (derived). TSD 16 and TSD 24 warn that this loss can harm extrapolation. TSD 24 asks for results without re-censoring as well, and TSD 16 for a check of the impact of re-censoring on the tail of the counterfactual Kaplan-Meier curve.
Sources
Allison, White and Bond on the earliest possible censoring time
Allison A, White IR, Bond S. rpsftm: An R Package for Rank Preserving Structural Failure Time Models. The R Journal. 2017;9(2):342-353. doi:10.32614/RJ-2017-068. Section Theory, heading Re-censoring, the rescaled censoring time, the unnumbered definition of D as the smaller of C and C times exp(psi), replacing U by D with an indicator of 0 when D is below U, and no re-censoring in arms without switching. Heading Sensitivity analysis, the same rule with exp(k psi).
NICE DSU TSD 16 on recensoring in arms at risk of switching
Latimer NR, Abrams KR. NICE DSU Technical Support Document 16: Adjusting survival time estimates in the presence of treatment switching. NICE Decision Support Unit; July 2014. doi:10.15131/shef.data.33847621. Appendix A, heading RPSFTM, the recensored time as the minimum of the administrative censoring time and its product with exp(psi), for patients in groups at risk of switching, and loss of the event when the recensoring time is below the event time. Section 3.3.2 on the loss of long-term information for extrapolation, and its framework for choosing a method on inspecting the tail of the counterfactual Kaplan-Meier curve.
NICE DSU TSD 24 on analyses with and without re-censoring
Bell Gorrod H, Latimer NR, Abrams KR. NICE DSU Technical Support Document 24: Adjusting survival time estimates in the presence of treatment switching: an update to TSD 16. NICE Decision Support Unit; April 2024. doi:10.15131/shef.data.33850897. Section 4.2.1 and section 4.2.1.1, Issues relating to re-censoring, on adjusting potential censoring times for all patients in an arm with switching, the loss of longer-term data as the effect grows, and running the analysis both ways, as its section 6 recommendations ask.
Jackson and colleagues on potential censoring times
Jackson D, Ran D, Zhang F, Ouwens M, Druker V, Sweeting M, Hettle R, White IR. New Methods for Two-Stage Treatment Switching Estimation. Pharmaceutical Statistics. 2025;24(1):e2462. doi:10.1002/pst.2462. Section 4.1, Re-Censoring, the potential censoring time as the data cut-off time unless the patient drops out, the further assumptions for drop-outs, and the recommendation to analyse with and without re-censoring.
Canonical Identity
Stable URI · Machine-readable · Resolvable · CC BY 4.0
