Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Residual Diagnostics Under Right Censoring

Model Diagnostics · Tutorial 606 of 697

Residual Diagnostics Under Right Censoring

Learn to preserve censoring information when checking survival residuals, using censoring-aware plots and summaries rather than treating censoring bounds as event times.

Advanced 11 min read

What You'll Learn

  • Define the transformed event-time residual and its censoring bound.
  • Explain how right censoring distorts naive residual plots and summaries.
  • Construct a Kaplan–Meier residual plot and compare it with the exponential reference.
  • Use randomized residuals for censored observations, and recognize their limitations.
  • Check the assumptions needed to interpret residual diagnostics.
  • Identify common failures in censoring-aware residual analyses.

Why Censoring Changes a Residual Plot

A survival residual is often intended to put event times on a common scale so that their distribution can be checked against a known target. But in right-censored data, some event times are not observed. Replacing each such time with its censoring time does not give an observed event-time residual: it gives a lower bound on that residual. A diagnostic that ignores this distinction can make a model look wrong—or hide a real problem—because it treats incomplete information as exact data.

The earlier material on Event-Time Probability Integral Transform Residuals motivates transforming fitted event-time distributions to a common reference scale. Here the central issue is how to retain the censoring information after that transformation. In a joint model, use the fitted event-time distribution under the same conditioning convention as the residual being checked—for example, conditional on the specified covariates, longitudinal history, and latent effects when those are part of the residual definition.

Definition: Let \(T_i^*\) be subject \(i\)'s event time and \(C_i\) the censoring time. The observed time is \(Y_i=\min(T_i^*,C_i)\), and \(\delta_i=I(T_i^*\leq C_i)\) indicates an observed event. Let \(\widehat{\Lambda}_i(t)\) be the fitted cumulative hazard for the event time under the chosen conditioning convention. The transformed event-time residual is \(R_i=\widehat{\Lambda}_i(T_i^*)\). If \(\delta_i=1\), it is observed as \(r_i=\widehat{\Lambda}_i(Y_i)\). If \(\delta_i=0\), the observed information is the bound \(R_i\geq c_i^R\), where \(c_i^R=\widehat{\Lambda}_i(Y_i)\). Equality is possible if the fitted cumulative hazard is flat between censoring and event times; the inequality is strict if it increases strictly over that interval.

The cumulative-hazard transformation is useful because, under a correctly specified continuous event-time distribution with no unmodelled cure fraction, the true residual \(\Lambda_i(T_i^*)\) has a unit exponential distribution. Thus its survival function is \(S_R(r)=\exp(-r)\) for \(r\geq0\), and its cumulative hazard is \(r\). In practice, replacing the true cumulative hazard with an estimate makes the diagnostic approximate; the reference distribution does not remove estimation uncertainty.

The construction also relies on a suitable censoring assumption: conditional on the variables used for the event-time model and residual, censoring must be independent of the event time. If censoring depends on relevant information that has not been conditioned on or modelled, a residual plot can reflect that dependence as well as event-model misfit. The fitted cumulative hazard must be nondecreasing, as cumulative hazards are; it need not be strictly increasing for the censoring-bound inequality.

Keep the Bound, Not a Fictional Event

For an observed event, the transformed event time is known. For a censored observation, only the fact that the event had not occurred by \(Y_i\) is known. Since \(\widehat{\Lambda}_i\) is nondecreasing and \(T_i^*>Y_i\) for a censored subject, it follows that

$$ R_i=\widehat{\Lambda}_i(T_i^*)\geq \widehat{\Lambda}_i(Y_i)=c_i^R. $$

If the fitted cumulative hazard is strictly increasing from \(Y_i\) to \(T_i^*\), the inequality is strict. If it is flat there, the transformed values can be equal, even though the event occurs later. Therefore a censored point plotted at \(c_i^R\) must be marked as censored—not presented as an observed event residual.

Worked Example: Reading a Censored Residual Bound

Suppose a hypothetical subject has fitted cumulative hazard \(\widehat{\Lambda}_i(t)=0.25t\), where \(t\) is measured in months. The subject is censored at 4 months, so \(\delta_i=0\).

Calculate the bound. The transformed censoring time is \(c_i^R=\widehat{\Lambda}_i(4)=0.25(4)=1.00\). The data tell us \(R_i\geq1.00\), not \(R_i=1.00\). Because this fitted cumulative hazard is strictly increasing, if the latent event time is later than 4 months, its transformed residual is strictly greater than 1.00.

Check a possible latent event time. If the unobserved event time were 6 months, then \(R_i=\widehat{\Lambda}_i(6)=0.25(6)=1.50\). This is consistent with the observed lower bound of 1.00.

Why non-strict monotonicity matters. For a nondecreasing fitted cumulative hazard with a flat interval from month 4 to month 6, \(\widehat{\Lambda}_i(4)=\widehat{\Lambda}_i(5)\) could hold. An event at month 5 would then have \(R_i=c_i^R\), despite occurring after censoring. In that case the data still give \(R_i\geq c_i^R\), and equality is possible. A fitted flat interval has its own modelling implications, but it does not justify replacing the general inequality with a strict one.

The naive alternative is to plot every censored subject at \(c_i^R\) as if an event occurred there, or to calculate a mean from those values and the observed event residuals. That approach pulls censored observations toward smaller residual values: it substitutes a lower bound for an unknown value. Omitting censored subjects is not a general fix either. It discards information and can select an unrepresentative subset, particularly when censoring patterns are related to covariates or follow-up.

Kaplan–Meier Diagnostics on the Residual Scale

A direct censoring-aware summary retains both the transformed time and the event indicator. For each subject, record \(W_i=\widehat{\Lambda}_i(Y_i)\) and \(\delta_i\). An event contributes an observed residual at \(W_i\); a censored subject contributes a right-censored residual at \(W_i\). Under the assumptions above, a Kaplan–Meier estimate of residual survival can be compared with the exponential reference \(S_R(r)=\exp(-r)\).

At each distinct residual time \(r_j\), let \(n_j\) be the number at risk just before that time and \(d_j\) the number of observed residual events there. The Kaplan–Meier estimate is the product of the estimated conditional probabilities of surviving each event time:

$$ \widehat{S}_R(r)=\prod_{r_j\leq r}\left(1-\frac{d_j}{n_j}\right). $$

Censored observations reduce the later risk sets but do not create downward steps in the estimated survival curve. Under a well-calibrated residual model, the curve should broadly track \(\exp(-r)\), allowing for sampling variability. A plot of \(-\log\widehat{S}_R(r)\) can instead be compared with the straight line \(r\), wherever the estimated survival is positive. This is a diagnostic comparison, not a formal proof of model adequacy.

Worked Example: A Censoring-Aware Residual Survival Plot

Consider six hypothetical transformed residual records, with times already on the cumulative-hazard scale. Four are observed events at 0.20, 0.50, 0.80, and 1.20; two are censored at 0.35 and 0.90. These values are illustrative, not observations from a real study.

First event, at 0.20. All six subjects are at risk and one event occurs, so the Kaplan–Meier estimate becomes \(1(1-1/6)=5/6=0.8333\). The exponential reference there is \(\exp(-0.20)=0.8187\).

Censoring at 0.35, then an event at 0.50. The censoring removes one subject from later risk sets but does not change the estimated survival. Four subjects are at risk at 0.50, so the estimate becomes \((5/6)(1-1/4)=5/8=0.6250\). The reference value is \(\exp(-0.50)=0.6065\).

Event at 0.80. Three subjects are at risk, giving \((5/8)(1-1/3)=5/12=0.4167\). The reference is \(\exp(-0.80)=0.4493\). Censoring at 0.90 changes the subsequent risk set but not this survival estimate. The last event at 1.20 occurs with one subject at risk and brings the Kaplan–Meier estimate to zero.

The estimates at 0.20, 0.50, and 0.80 are reasonably close to their reference values in this small illustration. A final zero estimate is not by itself evidence of misfit: with one subject left at risk, a single event forces the product to zero. A real assessment should consider uncertainty and the number at risk, especially in the tail.

A pooled Kaplan–Meier curve is appropriate when the transformed residuals have the common reference distribution and residual censoring is independent of residual event time. Conditional independence of the original event and censoring times given model variables supports this construction when the transformation and conditioning are applied consistently. If that independence is doubtful, or if the diagnostic concerns a subgroup or a particular covariate pattern, investigate the conditioning and censoring mechanism rather than assuming that a pooled curve settles the issue.

Randomized Residuals and Other Comparisons

A different censoring-aware construction imputes a residual beyond each censoring bound using the fitted conditional distribution. Under the unit exponential reference, a censored residual can be drawn as \(c_i^R+E_i\), where \(E_i\sim\operatorname{Exp}(1)\). Repeating the draw produces randomized complete residual sets that can be compared with an exponential reference. The procedure uses the bound correctly, but its result includes Monte Carlo variation and depends on the fitted tail beyond censoring.

Worked Example: Randomizing Beyond a Censoring Bound

Suppose a hypothetical subject has residual censoring bound \(c_i^R=1.00\). For one illustrative draw, take \(E_i=0.37\) from a unit exponential distribution. The randomized residual is \(R_i^{\mathrm{rand}}=1.00+0.37=1.37\), which respects the information that the true residual is at least 1.00.

On the probability scale, this draw corresponds to \(U=1-\exp(-1.37)\approx0.7461\). For an observed event residual of 0.50, by contrast, the corresponding value is \(U=1-\exp(-0.50)\approx0.3935\). Under a correctly specified continuous model, the event-time probability integral transform has a uniform reference distribution. A randomized censored value can be included in such a check, but one random draw is not a known event time; repeated draws can reveal how much the plot depends on the imputation.

The Kaplan–Meier residual plot and randomized residuals answer related but different practical needs. The former estimates the residual survival distribution while retaining censoring indicators. The latter creates complete-looking residual samples by adding model-based information beyond each bound. A plot of observed event residuals alone is simpler but generally not a valid distributional check when censoring is present. Martingale and deviance residuals provide other summaries of survival-model fit, but they do not turn censoring times into observed event times or replace the need to respect censoring in a distributional residual plot.

Diagnostics, Failure Modes, and Limits

Before interpreting a residual diagnostic, check what the residual conditions on and whether censoring is plausibly independent given those variables. Confirm that event indicators and times have been coded consistently, that every censored residual is represented as censored, and that transformed times are calculated using the same fitted cumulative hazard used to define the residual. If the fitted event distribution has a cure fraction or does not describe the full event-time distribution, the unit-exponential target needs to be modified; it should not be assumed automatically.

Patterns can guide investigation without identifying a unique cause. A systematic departure of the Kaplan–Meier curve from \(\exp(-r)\) may signal event-model misfit, but it can also arise from an inadequate conditioning set, dependent censoring, or estimation error. Examine the number at risk and uncertainty before drawing conclusions from the tail. Residual plots based on the same fitted data can also appear more favorable than out-of-sample checks; parameter estimation and repeated model fitting affect the reference variation. Do not label every visible discrepancy evidence of a specific hazard or association error.

Common mistake: “The subject was censored at residual 1.00, so the event residual equals 1.00.” This confuses a lower bound with an observed value. The correction is to record a censoring time of 1.00 and retain the censoring indicator; the latent residual is at least 1.00, with strict inequality only when the fitted cumulative hazard increases strictly over the relevant interval. Another mistake is to delete censored subjects and compare the remaining event residuals with the full-sample exponential reference. That comparison ignores the information and selection introduced by censoring.

Key takeaway: A censored event-time residual is not observed at the censoring time. Preserve its censoring indicator and lower bound, then use a survival summary or an explicitly model-based randomization. Compare the result with the appropriate reference while checking the assumptions that make the comparison meaningful.

Check Your Understanding

Answer each question, then check the brief solutions below.

  1. A subject is censored at time \(Y_i\), and \(\widehat{\Lambda}_i(Y_i)=0.80\). What residual information is observed?
  2. Why does a censored observation not create a downward step in a Kaplan–Meier residual survival curve?
  3. If the fitted cumulative hazard is nondecreasing but flat from the censoring time to the latent event time, what relation holds between the transformed residual and censoring bound?
  4. Under the unit exponential reference, a censored residual has bound 0.60 and a randomized draw uses \(E_i=0.25\). Calculate the randomized residual.
  5. Name one reason a Kaplan–Meier residual curve may depart from the exponential reference other than event-model misspecification.

Solutions. 1. The subject has a right-censored residual with bound 0.80, so \(R_i\geq0.80\); it is not known to equal 0.80. 2. A censored subject leaves the risk set at that time but is not counted as an event, so the event-survival product does not acquire a downward factor there. 3. The relation is \(R_i\geq c_i^R\), and equality is possible on a flat interval. 4. \(R_i^{\mathrm{rand}}=0.60+0.25=0.85\). 5. Examples include dependent censoring, an inadequate conditioning set, or sampling and parameter-estimation variability.

Clinical Biostats