Unstabilised IPCW weight updated over one interval

Divides a patient's weight at the end of the previous interval by the probability of remaining unswitched (uncensored) through the current interval, given no earlier switch, baseline and time-dependent covariates and survival to the interval's start. Starting from 1, repeated division builds the product over intervals in the article's formula. Patients who cannot be censored in an interval keep their weight.

Signature

w_t = w_prev / p_t
Inputs
InputsDefinitionUnit
w_prevWeight carried from earlier intervals, 1 before the firstnone
p_tConditional probability of not switching (not being artificially censored) in interval t, given no earlier switch, the covariate history and being alive; above 0 and at most 1probability
Output
w_tWeight given to a patient still uncensored and alive through interval tnone

Function

Inverse probability of censoring weighting for dependent censoring

Maps patients who remain under observation to weights equal to the inverse of their probability of having remained uncensored, given their covariate history, so that they also represent similar patients who were censored. Weighted versions of the Kaplan-Meier estimator, the Cox model and mean cost estimators then remove the bias that dependent censoring causes, provided every factor predicting both censoring and outcome is measured. The notation follows the Dependent Censoring article and its switchers-censored control arm.

Try this function

Implementations

  • Excel

    Unstabilised IPCW weight from named cells

    With the previous weight in PrevWeight and the probability of remaining unswitched in ProbUnswitched, the formula returns the weight, held in IPCWWeight. With a fitted logistic model of switching, ProbUnswitched is 1 minus the predicted probability of switching in the interval.

    =PrevWeight/ProbUnswitched

Assumptions

  • No unmeasured confounders of censoring and the outcome

    Data are available on every baseline and time-dependent factor that predicts both switching and survival; this cannot be tested from the observed data, and with all such factors unmeasured IPCW reduces to simple censoring.

  • Positivity: every patient has some chance of remaining unswitched

    p_t is above 0 at every covariate level (positivity); if some covariate level makes switching certain, the method cannot work.

Worked examples

  • Progressed non-switcher in the article's control arm

    Half of the 60 progressed patients stayed unswitched, so each progressed non-switcher gets weight 1 / 0.5, which is 2, as in the article.

    w_prev = 1; p_t = 0.5; w_t = 2
  • Progression-free patient who cannot switch

    Progression-free patients cannot switch, so their probability of remaining uncensored is 1 and the weight stays 1, as in the article.

    w_prev = 1; p_t = 1; w_t = 1
  • Three non-switchers left among 60 eligible patients

    Had 57 of the 60 progressed patients switched, each of the 3 non-switchers would weigh 60 / 3, which is 20, as in the article's extreme-weights step.

    w_prev = 1; p_t = 0.05; w_t = 20

Common errors

  • Dividing by the probability of switching

    At 30 of 60 switched the two probabilities are both 0.5, which hides the error; at 57 of 60 the probability of switching, 0.95, gives a weight of about 1.05 instead of 20.

  • Accepting IPCW results without inspecting the weights

    Very high weights for a few patients are likely to lead to erroneous results; the article's three non-switchers weighted 20 make two-year survival swing from 0.605 to 0.505 with one extra death.

  • Truncating extreme weights without a sensitivity analysis

    Truncating weights at a percentile, often the 99th or 95th, reduces standard errors but adds bias; the percentile chosen needs its own sensitivity analysis.

Sources

  • Unstabilised weights as the inverse probability of remaining uncensored

    Latimer NR, Abrams KR. NICE DSU Technical Support Document 16: Adjusting survival time estimates in the presence of treatment switching. Sheffield: Decision Support Unit, ScHARR, University of Sheffield; 2014. Appendix A, IPCW: unstabilised weights are the inverse of the conditional probability of having remained uncensored until time t given baseline and time-dependent covariates, and past treatment history drops out of the switching model because a patient is censored as soon as switching occurs; section 3.2.1: non-switchers similar to switchers receive higher weights, the no unmeasured confounders assumption cannot be tested using the observed data, and the method cannot work if some covariate level ensures switching; section 4: IPCW reduces to simple censoring when all confounders are unmeasured.

    View source →

  • Very high weights for a few patients lead to erroneous IPCW results

    Latimer NR, Abrams KR. NICE DSU Technical Support Document 16: Adjusting survival time estimates in the presence of treatment switching. Sheffield: Decision Support Unit, ScHARR, University of Sheffield; 2014. Section 6, step 4: for the IPCW it is particularly important to assess the weights calculated for each patient over time, since instances where certain patients are allocated particularly high weights are likely to lead to erroneous results; section 6, step 2: if more than 90 per cent of control group patients switch, IPCW is highly prone to bias given a sample size in the region of 500.

    View source →

  • Truncation of weights at the 99th or 95th percentile and its sensitivity analysis

    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. Sheffield: Decision Support Unit, ScHARR, University of Sheffield; 2024. Section 4.2.2.1: truncation selects a maximum weight at a prespecified percentile of the weight distribution, often the 99th or 95th; as truncation increases the estimates become more biased through loss of information but standard errors are reduced; if weights are truncated, a sensitivity analysis should be undertaken around the truncation percentiles.

    View source →

Canonical Identity

Stable URI · Machine-readable · Resolvable · CC BY 4.0