Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Event-Time Probability Integral Transform Residuals

Model Diagnostics · Tutorial 605 of 697

Event-Time Probability Integral Transform Residuals

Learn how to transform fitted event-time distributions into probability integral transform residuals while correctly incorporating right censoring.

Advanced 10 min read

What You'll Learn

  • Define the fitted event-time distribution used for a joint-model PIT residual.
  • Calculate PIT residuals for observed events and randomized residuals for right-censored observations.
  • Derive why the resulting residual is uniform under a correct model and independent censoring.
  • Transform uniform residuals to a normal scale and interpret basic diagnostic plots.
  • Recognize how informative censoring, model conditioning, and parameter estimation affect these diagnostics.

Why Transform Event Times?

A fitted joint model gives each subject a distribution for the event time, conditional on the information used for prediction. A useful diagnostic asks whether observed event times behave like draws from those fitted distributions. The probability integral transform (PIT) puts times on a common probability scale: if a continuous event-time distribution is correctly specified, its CDF evaluated at the event time is uniform on \((0,1)\). This makes residuals from subjects with different fitted risks comparable.

Right censoring complicates this idea. For a censored subject, the event time is not observed; we know only that it exceeds the censoring time. Substituting the censoring time into the event-time CDF and treating the result as an ordinary event residual would discard that uncertainty. Instead, the censored observation identifies a range of possible PIT values, and a random draw from the appropriate conditional range gives a randomized residual.

Definition and Assumptions

For subject \(i\), let \(T_i\) be the event time and \(C_i\) the censoring time. The observed time is \(\tilde T_i=\min(T_i,C_i)\), and \(\delta_i=I(T_i\le C_i)\) indicates an observed event. Let \(\mathcal H_i\) denote the covariates and longitudinal history used to form the subject’s event-time prediction. From the fitted joint model, write

$$ F_i(t\mid\mathcal H_i)=P(T_i\le t\mid\mathcal H_i), \qquad S_i(t\mid\mathcal H_i)=1-F_i(t\mid\mathcal H_i). $$

The distribution used here must correspond to the intended prediction target. For example, if prediction is conditional on observed longitudinal history, latent random effects are integrated over their distribution given that history. The event or censoring outcome being diagnosed should not also be used to update that prediction distribution; doing so would use the outcome twice.

Definition: For a continuous event-time distribution, the event-time PIT residual is \(U_i=F_i(T_i\mid\mathcal H_i)\) when the event is observed. For a right-censored observation, draw \(V_i\sim\mathrm{Uniform}(0,1)\), independently of the data conditional on the fitted information, and set $$ U_i=F_i(C_i\mid\mathcal H_i)+S_i(C_i\mid\mathcal H_i)V_i. $$ The normal-scale PIT residual is \(Z_i=\Phi^{-1}(U_i)\), where \(\Phi\) is the standard normal CDF. Under the stated model and censoring assumptions, \(U_i\) is uniform on \((0,1)\), and \(Z_i\) has a standard normal distribution.

The key assumptions are that the event-time distribution is continuous, the fitted conditional CDF is correctly specified, and censoring is independent of the event time conditional on the information in \(\mathcal H_i\). The residual also requires a well-defined event-time prediction distribution for each subject. If censoring remains informative after conditioning on that information, the simple randomization above need not produce uniform residuals.

Why Randomization Handles Censoring

For an observed event, the usual PIT applies directly: the event time is known, so evaluate its fitted CDF. For a censored subject with \(C_i=c\), the event is known only to have occurred after \(c\). Under a continuous fitted distribution, that means its latent PIT value \(F_i(T_i\mid\mathcal H_i)\) lies above \(F_i(c\mid\mathcal H_i)\). Conditional on \(T_i>c\), it is distributed uniformly over that remaining probability range. The random draw fills in that unobserved portion rather than pretending the event happened at \(c\).

The following calculation justifies uniformity. Suppress the subject index and condition on \(\mathcal H\). Fix a censoring time \(c\), and suppose censoring is independent of \(T\) given \(\mathcal H\). For \(0<u\le F(c)\), a randomized censored residual cannot be at or below \(u\), because it is drawn above \(F(c)\). Therefore,

$$ P(U\le u\mid C=c,\mathcal H) =P\{T\le F^{-1}(u)\mid\mathcal H\} =u. $$

Here \(F^{-1}(u)\le c\), so the probability comes from observed events before \(c\). For \(F(c)<u<1\), the event contribution is \(F(c)\). Among subjects with \(T>c\), the chance that the randomized residual falls between \(F(c)\) and \(u\) is \((u-F(c))/S(c)\). Weighting this by the probability \(S(c)\) of being censored at \(c\) gives

$$ \begin{aligned} P(U\le u\mid C=c,\mathcal H) &=F(c)+S(c)\frac{u-F(c)}{S(c)}\\ &=u. \end{aligned} $$

Thus the conditional CDF of the combined event and censored residual is \(u\) throughout \((0,1)\). In the first case, the event contribution is \(u\), not \(F(u)\): \(u\) is already a probability-scale value, whereas \(F\) takes an event time as its argument. This calculation relies on independence of censoring conditional on \(\mathcal H\); if \(T\) and \(C\) remain associated, the event-time distribution among subjects with a given censoring time may differ from the fitted distribution.

Worked Example: Checking the Conditional CDF

Suppose the fitted event time is exponential with rate \(1\) per time unit, so \(F(t)=1-e^{-t}\). Consider a fixed censoring time \(c=1\). Then \(F(c)=1-e^{-1}=0.6321\) and \(S(c)=e^{-1}=0.3679\). Calculate the conditional probability that the randomized residual is at most \(u=0.2\), and then at \(u=0.8\).

Since \(0.2\le0.6321\), only an event before the corresponding quantile can contribute. The quantile is \(F^{-1}(0.2)=-\log(0.8)=0.2231\), which is before \(c=1\). Therefore,

$$ P(U\le0.2\mid C=1)=P(T\le0.2231)=1-e^{-0.2231}=0.2000. $$

In particular, this probability is not \(F(0.2)=1-e^{-0.2}=0.1813\), because \(0.2\) is the residual threshold, not an event time. For \(u=0.8>F(c)\), the event contribution is \(0.6321\), and the censored contribution is

$$ 0.3679\left(\frac{0.8-0.6321}{0.3679}\right) =0.1679, \qquad 0.6321+0.1679=0.8000. $$

Both probabilities agree with the uniform CDF at their respective thresholds.

Calculating and Reading the Residuals

For each subject, first obtain the fitted conditional CDF and survival probability at the observed time. If \(\delta_i=1\), calculate \(U_i=F_i(\tilde T_i\mid\mathcal H_i)\). If \(\delta_i=0\), calculate \(F_i(C_i\mid\mathcal H_i)\) and \(S_i(C_i\mid\mathcal H_i)\), generate \(V_i\), and use the randomized formula. Finally, if desired, transform \(U_i\) to \(Z_i=\Phi^{-1}(U_i)\). Values of \(U_i\) near zero or one correspond to unusually early or late event-time outcomes relative to the fitted distribution; their normal-scale counterparts are far into the negative or positive tails.

Under a well-specified model and the assumptions above, a histogram of PIT values should be approximately flat, and their empirical CDF should be near the diagonal. On the normal scale, a quantile-quantile plot should be roughly linear against a standard normal reference. These are population benchmarks, not exact requirements in a finite sample. A single randomized residual for a censored subject also depends on the draw \(V_i\), so repeating the randomization can alter the plot. Keep the random-number seed and, when a conclusion is sensitive to the draw, inspect whether it persists across several randomizations.

Worked Example: One Event and One Censored Observation

Suppose a fitted model gives an exponential event-time distribution with rate \(0.2\) per month for two hypothetical subjects, conditional on their respective histories. Subject A has an observed event at 4 months. Subject B is censored at 3 months, and the randomization draw is \(V_B=0.4\). Calculate both PIT values and approximate normal-scale residuals.

For Subject A, \(F_A(4)=1-e^{-0.2(4)}=1-e^{-0.8}=0.5507\). Thus \(U_A=0.5507\), and \(Z_A=\Phi^{-1}(0.5507)\approx0.127\). The event occurred slightly later than the median of this fitted exponential distribution, so the residual is slightly positive.

For Subject B, \(F_B(3)=1-e^{-0.6}=0.4512\) and \(S_B(3)=e^{-0.6}=0.5488\). The censored PIT value is

$$ U_B=0.4512+(0.5488)(0.4)=0.6707. $$

Consequently, \(Z_B=\Phi^{-1}(0.6707)\approx0.442\). This value is one randomized draw from the portion of the probability scale above \(0.4512\), not an assertion that Subject B’s event occurred at 3 months. A different valid draw would give a different residual for this censored subject.

Joint-Model Conditioning and Practical Checks

In a joint model, the event distribution can depend on a latent longitudinal trajectory or shared random effects. The PIT is only meaningful relative to the distribution appropriate for the stated conditioning set. For a prediction based on the observed marker history, for example, the fitted survival distribution should account for uncertainty about the latent effects given that history. Using a subject-specific survival curve at an estimated random effect as though that effect were known can understate predictive uncertainty.

A second issue is how the model and residuals are fitted. The uniformity result is a reference property when the conditional CDF is the true distribution. In practice, model parameters are estimated, and the same subjects may contribute to fitting and checking the model. The resulting residuals need not be exactly independent uniforms, even if the model is adequate. Small samples, heavy censoring, or parameter uncertainty can also make visual departures difficult to interpret. Treat a plot as diagnostic evidence, not as a stand-alone test that proves the model correct or incorrect.

Useful checks include confirming that the event indicator and censoring time have been handled consistently, verifying that \(S_i(C_i)=1-F_i(C_i)\), and checking that the randomized residual remains in \((F_i(C_i),1)\) for every censored subject. Markedly nonuniform patterns can arise from a misspecified event-time distribution, a poor conditioning set, or informative censoring. Numerical errors in evaluating a fitted CDF can also create apparent departures, especially near zero or one.

Worked Example: A Weibull Prediction From a Joint Model

For illustration, suppose the fitted joint model, after accounting for uncertainty about the latent effects given a hypothetical subject’s history, yields the conditional survival function \(S(t\mid\mathcal H)=\exp\{-(t/10)^2\}\), with time measured in months. One subject has an event at 6 months; another is censored at 8 months, with random draw \(V=0.75\). Find their PIT values and approximate normal-scale residuals.

For the event at 6 months, \(F(6)=1-e^{-(6/10)^2}=1-e^{-0.36}=0.3023\). Hence \(Z=\Phi^{-1}(0.3023)\approx-0.518\), a negative residual indicating an earlier event than is typical under this fitted distribution.

At the censoring time, \(F(8)=1-e^{-0.64}=0.4727\) and \(S(8)=e^{-0.64}=0.5273\). Therefore,

$$ U=0.4727+(0.5273)(0.75)=0.8682, \qquad Z=\Phi^{-1}(0.8682)\approx1.12. $$

The censored residual is well above \(F(8)\), as required. It records the selected randomized location among event times later than 8 months under the fitted distribution; it does not establish that the subject’s event time was 8 months or any particular later time.

Alternatives, Limitations, and Common Mistakes

PIT residuals use the full fitted event-time distribution and place subjects on a common probability scale. Cox-Snell residuals instead transform event times through cumulative hazard; they are useful for a related model check but are not the same residual and do not remove the need to respect censoring. Event-only PIT plots are simpler, but excluding censored subjects can select a nonrepresentative subset and lose information. Treating \(F(C_i)\) as an ordinary PIT for a censored subject is also not a valid substitute: it marks only the lower edge of the subject’s possible residual range.

The formula given here assumes a continuous event-time distribution and a single event endpoint. With a distribution that has point masses, the ordinary transform can have jumps and requires additional randomization across the probability mass at an event time. If censoring is informative conditional on the chosen history, a model for the censoring mechanism or other appropriate adjustment is needed; the independent-censoring derivation no longer applies automatically. These residuals also do not, by themselves, identify which feature of a joint model is misspecified.

  • Mistake: For a residual threshold \(u\le F(c)\), using \(F(u)\) as the probability of a residual at most \(u\). Correction: \(u\) is already on the probability scale; the probability is \(u\), obtained from \(P\{T\le F^{-1}(u)\}\).
  • Mistake: Assigning \(F(C_i)\) as the residual for every censored subject. Correction: A censored subject’s latent PIT lies above this value; randomize over the remaining range.
  • Mistake: Concluding that a flat histogram proves the joint model is correct. Correction: Uniformity is a reference under specified assumptions; finite-sample variability, fitted parameters, and censoring can obscure or imitate departures.
Key takeaway: An observed event contributes its fitted CDF value. A censored observation contributes a randomized value above the fitted CDF at censoring, with the remaining probability range respected. Uniformity is expected only when the conditional event-time model and censoring assumptions are adequate.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. For an event-time CDF \(F\) and fixed censoring time \(c\), explain why the randomized-residual CDF equals \(u\) when \(u\le F(c)\).
  2. If \(F(c)=0.70\), \(S(c)=0.30\), and a censored subject has \(V=0.5\), calculate its randomized PIT residual.
  3. Why is \(F(c)\) alone not an appropriate full PIT residual for a subject censored at \(c\)?
  4. Name one assumption needed for the conditional uniformity result and describe a consequence if it fails.

Solutions. (1) Only events before \(c\) can produce residuals at or below \(u\); their probability is \(P\{T\le F^{-1}(u)\}=u\). (2) \(U=0.70+(0.30)(0.5)=0.85\). (3) \(F(c)\) is the lower endpoint of the possible PIT range given \(T>c\), not the unknown event-time PIT itself. (4) Censoring must be independent of the event time conditional on the prediction information; otherwise the conditional event-time distribution among observations with that censoring time can differ from the fitted distribution, so the residual need not be uniform.

Clinical Biostats