Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › A Subject Likelihood With Right Censoring

The Basic Joint Model · Tutorial 154 of 697

A Subject Likelihood With Right Censoring

Learn to combine conditional marker densities with the survival contribution for a right-censored subject, while keeping clear which assumptions and likelihood factors are involved.

Advanced 10 min read

What You'll Learn

  • Write the conditional likelihood contribution when a subject is right-censored.
  • Distinguish a censoring-time survival contribution from an observed-event density.
  • Calculate repeated Gaussian marker densities conditional on specified random effects.
  • Combine marker and survival factors while tracking units and rounding.
  • Identify assumptions and common errors in a censored subject-level calculation.
  • Compare conditional contributions with event and censoring alternatives.

Why Right Censoring Changes the Likelihood Contribution

When a subject is followed until an event occurs, the observed time contributes an event-time density. When follow-up ends first, the event time is not observed: the data tell us only that the subject remained event-free through the censoring time. The likelihood must represent exactly that information. In a joint model, this survival contribution is combined with the subject's marker-measurement densities, conditional on the specified random effects.

The distinction matters because an event density and a survival probability are different quantities. Including an event hazard factor for a subject known only to be censored treats an unobserved event as though it occurred. Conversely, omitting survival through the censoring time discards the information that the subject was still at risk and event-free up to then.

Definition: Let \(T_i^*\) be subject \(i\)'s event time and \(C_i\) the censoring time. The observed follow-up time is \(\tilde T_i=\min(T_i^*,C_i)\), and \(\delta_i=I(T_i^*\leq C_i)\), where \(I(\cdot)\) is 1 when its condition is true and 0 otherwise. Thus, \(\delta_i=0\) denotes right censoring at \(\tilde T_i=C_i\). For marker measurements \(Y_{ij}\) at times \(t_{ij}\), let \(b_i\) denote the subject's random effects. A subject-level likelihood conditional on \(b_i\) is a likelihood for that subject's observed marker values and event/censoring information, with \(b_i\) held fixed.

Model and Assumptions

Write the conditional mean of the marker as \(m_i(t\mid b_i)\), and suppose, for this calculation, that the marker errors are conditionally independent Gaussian errors with variance \(\sigma^2\). The event hazard, conditional on the random effects and covariates, is \(h_i(t\mid b_i)\). Its cumulative hazard through time \(u\) and survival function are

$$ H_i(u\mid b_i)=\int_0^u h_i(s\mid b_i)\,ds, \qquad S_i(u\mid b_i)=\exp\{-H_i(u\mid b_i)\}. $$

The marker contribution for the observed measurements is

$$ L_{Y_i}(b_i) = \prod_{j=1}^{J_i} \frac{1}{\sqrt{2\pi}\sigma} \exp\left\{ -\frac{\left[Y_{ij}-m_i(t_{ij}\mid b_i)\right]^2}{2\sigma^2} \right\}. $$

This product assumes conditional independence of the measurement errors given the random effects and model covariates. For an observed event at time \(u\), the event-time density is \(h_i(u\mid b_i)S_i(u\mid b_i)\). For a subject censored at \(u\), the contribution is \(S_i(u\mid b_i)\). The conditional subject contribution can therefore be written

$$ L_i(b_i) = L_{Y_i}(b_i) \left\{h_i(\tilde T_i\mid b_i)\right\}^{\delta_i} S_i(\tilde T_i\mid b_i). $$

This expression assumes that the censoring process is conditionally independent of the event process in the relevant sense, so its likelihood factor can be omitted, and that the observation schedule does not add an informative sampling contribution. The event and marker models must also be specified correctly. In particular, the hazard used here is conditional on \(b_i\); the marker trajectory in the hazard is the model-defined latent trajectory, not a noisy observed marker value. The random effects are fixed at their specified values in \(L_i(b_i)\); this conditional contribution does not integrate over their distribution.

Why a Censored Subject Contributes Survival

The censoring distinction follows directly from what is observed. Conditional on \(b_i\), the probability that the event time exceeds \(u\) is \(S_i(u\mid b_i)\). A right-censored record at \(u\) tells us that \(T_i^*>u\), so its event-process likelihood factor is this probability. It does not tell us that the event occurred at \(u\).

For an observed event, the density of \(T_i^*\) at \(u\) is obtained from the survival function. Since \(S_i(u\mid b_i)=\exp\{-H_i(u\mid b_i)\}\) and \(dH_i(u\mid b_i)/du=h_i(u\mid b_i)\),

$$ -\frac{d}{du}S_i(u\mid b_i) = h_i(u\mid b_i)S_i(u\mid b_i). $$

That derivative gives the event-time density, which explains the hazard factor for \(\delta_i=1\). A censored observation instead contributes the probability of surviving beyond its censoring time. Combining the two cases gives \(\{h_i(\tilde T_i\mid b_i)\}^{\delta_i}S_i(\tilde T_i\mid b_i)\): when \(\delta_i=1\), it is the event density; when \(\delta_i=0\), it reduces to survival alone.

Worked Example: Survival Contribution at a Censoring Time

Suppose a hypothetical subject has a constant conditional event hazard of \(0.05\) per year and is right-censored at \(C_i=4.796\) years. Assume entry into the risk set was at time 0 and there is no delayed entry. Under a constant hazard, \(H_i(C_i\mid b_i)=0.05C_i\), so

$$ L_{T_i}(b_i) = S_i(C_i\mid b_i) = \exp(-0.05\times4.796) = \exp(-0.2398) \approx 0.7868. $$

The contribution is the probability, under the specified conditional event model, of remaining event-free through 4.796 years. There is no hazard factor at 4.796 years because no event was observed then. For comparison, if \(C_i\) is defined by \(C_i=-\log(0.7868)/0.05\), the arithmetic gives \(C_i\approx4.796\) years. The survival contribution is dimensionless; the hazard \(0.05\) has units of events per year.

Calculating Conditional Marker Densities

For a continuous marker, a density value is not itself a probability at one exact measurement value. It is a likelihood factor, with units inverse to the marker's measurement units. Under the Gaussian model, the density is largest when the observed value equals its conditional mean and decreases as the residual grows relative to \(\sigma\). Multiple measurements contribute a product when their errors are conditionally independent.

Worked Example: Two Marker Densities Given Random Effects

Consider hypothetical measurements in marker units at times \(t_{i1}=1\) year and \(t_{i2}=2\) years. Conditional on specified random effects, suppose the model means are 2.000 and 2.000 marker units, respectively, and the residual standard deviation is \(\sigma=0.5\) marker units. The recorded measurements are \(Y_{i1}=2.000\) and \(Y_{i2}=2.283\).

For the first measurement, the residual is \(2.000-2.000=0\), and its conditional density is

$$ f(Y_{i1}\mid b_i) = \frac{1}{\sqrt{2\pi}(0.5)} \exp\left\{-\frac{0^2}{2(0.5)^2}\right\} \approx 0.7979. $$

For the second, the residual is \(2.283-2.000=0.283\) marker units. Thus,

$$ f(Y_{i2}\mid b_i) = \frac{1}{\sqrt{2\pi}(0.5)} \exp\left\{-\frac{(0.283)^2}{2(0.5)^2}\right\} \approx 0.6798. $$

The conditional marker likelihood is the product of the two densities. Using the unrounded density values gives approximately \(0.5424\) per squared marker unit. For example, the unrounded second factor is about \(0.679791\), and the unrounded first factor is about \(0.7978846\); their product is approximately \(0.5424\). The rounded displayed factors are not needed to reproduce the final rounding. This marker contribution alone says nothing about whether the subject experienced an event; the follow-up information supplies a separate factor.

Combining Marker Measurements With Right-Censored Follow-Up

Consider now a subject with both types of information. A convenient illustrative hazard is \(h_i(t\mid b_i)=h_0(t)\exp\{\alpha m_i(t\mid b_i)\}\). If the baseline hazard and conditional marker trajectory are constant over follow-up, the conditional hazard is constant too. The following calculation uses this simplified setting so each part of the likelihood can be checked directly.

Worked Example: Full Conditional Contribution for a Censored Subject

Suppose a hypothetical subject has the two marker observations from the preceding example, with conditional marker mean \(m_i(t\mid b_i)=2.000\) marker units throughout follow-up and \(\sigma=0.5\) marker units. Let the baseline hazard be \(h_0(t)=0.1\) per year and the association coefficient be \(\alpha=0.4\) per marker unit. The specified random effects imply the stated trajectory; they remain fixed throughout this calculation. The conditional hazard is therefore

$$ h_i(t\mid b_i) = 0.1\exp(0.4\times2.000) = 0.1e^{0.8} \approx 0.2226 \text{ per year}. $$

Assume the subject is censored at \(C_i=3.2746\) years, after both measurements, and no event is observed, so \(\delta_i=0\). Carrying the unrounded hazard through the calculation gives

$$ H_i(C_i\mid b_i) = 0.1e^{0.8}\times3.2746 \approx 0.7288, \qquad S_i(C_i\mid b_i) = \exp\{-0.1e^{0.8}\times3.2746\} \approx 0.4825. $$

The marker likelihood from the two measurements is approximately \(0.5424\) per squared marker unit. Therefore, the full conditional subject contribution is

$$ L_i(b_i) = (0.7978846\ldots)(0.679791\ldots) \exp\{-0.1e^{0.8}\times3.2746\} \approx 0.2617 \text{ per squared marker unit}. $$

The survival factor is dimensionless, so multiplying it by the two marker densities leaves the marker-density units unchanged. There is no factor \(0.2226\) per year in this expression: \(\delta_i=0\), and the observed follow-up ends in censoring rather than an event. This is a conditional likelihood value, not the probability of observing the two exact marker values.

Checks, Alternatives, and Limitations

A useful audit is to substitute the event indicator before doing arithmetic. If \(\delta_i=0\), the event-process factor must reduce to \(S_i(\tilde T_i\mid b_i)\); if \(\delta_i=1\), it must be \(h_i(\tilde T_i\mid b_i)S_i(\tilde T_i\mid b_i)\). Then verify that the cumulative hazard integrates the conditional hazard over the correct time interval and that the marker measurements used in the likelihood occurred before the event or censoring time, as required by the specified observation scheme.

These are the main alternatives and common substitutions to distinguish:

Observed follow-upEvent-process factorWhat the record says
Event at \(\tilde T_i\)\(h_i(\tilde T_i\mid b_i)S_i(\tilde T_i\mid b_i)\)The event occurred at the recorded time.
Right censoring at \(\tilde T_i\)\(S_i(\tilde T_i\mid b_i)\)The subject was event-free through the recorded time.
Censoring incorrectly treated as an event\(h_i(\tilde T_i\mid b_i)S_i(\tilde T_i\mid b_i)\)This incorrectly asserts an event at the censoring time.

The calculation is conditional on the supplied random effects. A likelihood for observed data that does not condition on known random effects requires accounting for their distribution; the numerical conditional contribution here is not a substitute for that operation. Nor does this calculation repair a misspecified hazard, marker model, dependence assumption, or censoring mechanism. If censoring is informative after conditioning on the modeled variables, omitting its mechanism can give an inadequate likelihood. If there is delayed entry, survival must be conditioned on reaching entry event-free, changing the survival factor; the time interval cannot simply be assumed to begin at zero.

Common pitfall: “The subject's follow-up ended at \(C_i\), so multiply by the hazard at \(C_i\).” That reasoning confuses an observed event with the end of observation. For right censoring, the data establish survival through \(C_i\), not an event at \(C_i\), so the correct factor is \(S_i(C_i\mid b_i)\) without a hazard multiplier.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A subject is censored at 6 years under a constant conditional hazard of \(0.08\) per year. What is the event-process contribution?
  2. A subject has an observed event at 5 years under a constant hazard of \(0.12\) per year. What is the event-time density contribution?
  3. For one marker measurement, the residual is \(0.4\) marker units and \(\sigma=0.5\) marker units. Calculate its Gaussian density.
  4. Why is \(0.3S_i(2\mid b_i)\) not the correct event-process contribution for a subject censored at 2 years under a constant hazard of \(0.3\) per year?
  5. If \(h_i(t\mid b_i)=0.05\exp(0.2t)\) per year from time 0 to 4 years, calculate the survival contribution for a subject censored at 4 years.

Solutions. (1) \(H=0.08\times6=0.48\), so the contribution is \(S(6)=e^{-0.48}\approx0.6188\). (2) The event density is \(h(5)S(5)=0.12e^{-0.12\times5}=0.12e^{-0.6}\approx0.06586\) per year. (3) The density is \(\{1/[\sqrt{2\pi}(0.5)]\}\exp\{-0.4^2/[2(0.5)^2]\}=0.7978846\exp(-0.32)\approx0.5794\) per marker unit. (4) The subject was event-free through 2 years; the contribution is \(S(2)=e^{-0.3\times2}=e^{-0.6}\approx0.5488\). Multiplying by \(0.3\) would add a hazard factor and treat censoring as an event. (5) \(H(4)=\int_0^4 0.05e^{0.2t}\,dt=(0.05/0.2)(e^{0.8}-1)\approx0.3064\), so \(S(4)=e^{-0.3064}\approx0.7361\).

Clinical Biostats