Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Measurements Recorded at the Event Time

The Basic Joint Model · Tutorial 147 of 697

Measurements Recorded at the Event Time

Learn how to define a consistent event-time measurement convention and combine the marker density with the event-time density in a joint-model likelihood.

Advanced 10 min read

What You'll Learn

  • Distinguish a marker measured immediately before an event from one measured after it.
  • State the assumptions needed to combine the marker and event-time densities.
  • Derive the conditional likelihood contribution for an event-time marker.
  • Calculate the contribution with a marker model and a hazard model.
  • Recognize when a tied or rounded timestamp does not establish the required observation order.
  • Identify why a post-event measurement cannot automatically use the pre-event marker model.

Why the Order at a Tied Time Matters

A longitudinal record and an event record can carry the same timestamp. For example, a blood sample may be recorded at 10:00, as is a clinical event. That equality of recorded times does not say whether the sample was drawn just before the event or after it. The distinction matters: a marker observed after an event may have a different distribution from the marker trajectory that existed just before the event.

A likelihood contribution is therefore meaningful only after specifying a consistent observation convention. This tutorial uses the convention that a marker recorded at the event time was measured immediately before the event occurred. The event time is treated as exact, and the marker is an observation of the subject’s pre-event longitudinal process at that time. If the actual protocol establishes a different order, the likelihood must reflect that protocol instead.

Definition: An event-time marker measurement is a longitudinal measurement whose recorded time equals the subject’s event time \(T_i\). Under the pre-event convention used here, the measurement is taken immediately before the event at \(T_i\), and its distribution is specified by the longitudinal model evaluated at \(T_i\) (or by its left limit if the latent trajectory can jump).

Model and Assumptions

Let \(b_i\) denote the subject-specific random effects, and let \(m_i(t;b_i)\) be the latent marker trajectory for subject \(i\) at time \(t\), given those effects and the covariates. Write \(Y_i(T_i)\) for the marker measured at the event time. A simple measurement model is \(Y_i(T_i)=m_i(T_i;b_i)+\varepsilon_i(T_i)\), where the measurement error has a specified density. For example, if the error is normal with standard deviation \(\sigma\), then the conditional marker density is normal with mean \(m_i(T_i;b_i)\) and standard deviation \(\sigma\).

Let \(h_i(t\mid b_i)\) be the event hazard conditional on the random effects, and let \(S_i(t\mid b_i)\) be the corresponding conditional survival function. For an exact event at time \(t\), the conditional event-time density is \(f_i(t\mid b_i)=h_i(t\mid b_i)S_i(t\mid b_i)\). This density is defined with respect to time, so its units are inverse time.

The likelihood contribution below relies on the following assumptions. The event is observed at an exact time, and the marker is observed according to the stated pre-event convention. Conditional on \(b_i\) and the modeled covariates, the measurement error is independent of the event process. The marker density and hazard are correctly specified, and the measurement is not selected by an additional unmodeled process that depends on the marker value. The observation schedule or event-triggered measurement protocol is treated as specified; it is not assigned an extra likelihood factor here. These assumptions concern the contribution for an observed event, not a right-censored record.

Key result: Under the pre-event convention and conditional independence assumptions, the joint conditional density of the event time and its marker measurement is $$ p\{Y_i(T_i)=y_i,T_i=t_i\mid b_i\} = p\{Y_i(T_i)=y_i\mid b_i,t_i\}\, h_i(t_i\mid b_i)S_i(t_i\mid b_i). $$ The marker factor is a density with respect to marker units; the event factor is a density with respect to time.

Why the Contribution Factors This Way

Condition first on \(b_i\). The joint density rule gives the marker’s conditional density given the event time, multiplied by the density of that event time:

$$ p(y_i,t_i\mid b_i) = p(y_i\mid T_i=t_i,b_i)f_i(t_i\mid b_i). $$

Under the stated conditional independence assumption, observing that the event occurred at \(t_i\) does not further change the distribution of measurement error around the latent marker value at \(t_i\). Thus \(p(y_i\mid T_i=t_i,b_i)=p(y_i\mid b_i,t_i)\). Substituting the hazard-survival expression for the event-time density gives

$$ p(y_i,t_i\mid b_i) = p(y_i\mid b_i,t_i)\, h_i(t_i\mid b_i)S_i(t_i\mid b_i). $$

This is a conditional contribution, given the random effects. If the subject-specific effects are unobserved, the corresponding observed-data contribution integrates this product over their distribution:

$$ L_i = \int p(y_i\mid b_i,t_i)\, h_i(t_i\mid b_i)S_i(t_i\mid b_i)\, p(b_i)\,db_i. $$

The integration is over the product, not over either factor in isolation. In particular, the same random effects can link the marker and the event process even though their errors are conditionally independent. For a subject with earlier marker records, their modeled contributions also enter the subject’s likelihood; the expression here isolates the additional marker recorded at the event time.

Worked Example: One Event-Time Measurement

Suppose a hypothetical subject has random effects fixed at \(b_i=0\) for this conditional calculation. The marker model is normal with mean \(m_i(t;0)=11.5+0.4t\) and standard deviation \(1.5\) marker units. The event hazard is constant at \(0.08\) per year. An event occurs at \(t_i=3\) years, and a marker value of \(y_i=12.4\) is recorded immediately before it. Calculate the conditional joint density contribution.

The marker mean at the event time is \(11.5+0.4(3)=12.7\). Therefore its density at 12.4 is

$$ p(12.4\mid b_i=0,t_i=3) = \frac{1}{1.5\sqrt{2\pi}} \exp\left\{-\frac{(12.4-12.7)^2}{2(1.5)^2}\right\} \approx 0.2607 $$

per marker unit. With a constant hazard of \(0.08\) per year, survival to 3 years is \(S_i(3\mid 0)=e^{-0.08(3)}=e^{-0.24}\). The event-time density is

$$ f_i(3\mid 0) = 0.08e^{-0.24} \approx 0.06293 $$

per year. Multiplying the two conditional densities gives

$$ p(12.4,3\mid 0) \approx 0.2607(0.06293) \approx 0.01641 $$

per marker unit per year. This is a joint density contribution, not the probability of observing exactly 12.4 and an event at exactly 3 years; for continuous variables, an exact point has probability zero.

Worked Example: Shared Random Effects Change Both Factors

Consider a second hypothetical model. Given a scalar random effect \(b_i\), the marker is normally distributed with mean \(10+b_i\) and standard deviation 1 marker unit. The event hazard is constant in time at \(0.10e^{0.3b_i}\) per year. At \(t_i=2\) years, the observed event and pre-event marker value are \(y_i=10.4\). Calculate the conditional contribution for \(b_i=-1\) and for \(b_i=1\).

For \(b_i=-1\), the marker mean is 9. The marker density is

$$ p(10.4\mid b_i=-1,t_i=2) = \frac{1}{\sqrt{2\pi}} \exp\left\{-\frac{(10.4-9)^2}{2}\right\} \approx 0.1497 $$

per marker unit. The hazard is \(0.10e^{-0.3}\approx 0.07408\) per year, so the event-time density at 2 years is

$$ f_i(2\mid -1) = 0.0740818\,e^{-0.0740818(2)} \approx 0.06388 $$

per year. The joint conditional contribution is approximately \(0.06388(0.1497)=0.009565\) per marker unit per year.

For \(b_i=1\), the marker mean is 11, so its density at 10.4 is

$$ p(10.4\mid b_i=1,t_i=2) = \frac{1}{\sqrt{2\pi}} \exp\left\{-\frac{(10.4-11)^2}{2}\right\} \approx 0.3332 $$

per marker unit. The hazard is \(0.10e^{0.3}\approx 0.13499\) per year, giving

$$ f_i(2\mid 1) = 0.1349859\,e^{-0.1349859(2)} \approx 0.1030 $$

per year. The joint conditional contribution is approximately \(0.103048(0.333225)=0.03434\) per marker unit per year. These are likelihood contributions conditional on two different random-effect values; their numerical comparison alone is not a probability comparison between those values.

Worked Example: Applying the Convention to a Tied Timestamp

Suppose a hypothetical record reports both an event and a marker measurement at exactly 4 years. The protocol specifies that the sample is drawn immediately before event adjudication. Conditional on \(b_i=0\), assume a normal marker density with mean \(8+0.2t\) and standard deviation 2 marker units, and a constant event hazard of \(0.05\) per year. The measured marker is 9.0. Under the stated convention, calculate the contribution.

The marker mean at 4 years is \(8+0.2(4)=8.8\). Its density at 9.0 is

$$ p(9.0\mid b_i=0,t_i=4) = \frac{1}{2\sqrt{2\pi}} \exp\left\{-\frac{(9.0-8.8)^2}{2(2)^2}\right\} \approx 0.1985 $$

per marker unit. The event-time density is

$$ f_i(4\mid 0) = 0.05e^{-0.05(4)} = 0.05e^{-0.2} \approx 0.04094 $$

per year. The conditional joint density is therefore approximately \(0.1985(0.04094)=0.008125\) per marker unit per year.

The calculation is justified by the protocol’s ordering, not by the timestamp equality alone. If “4 years” is a rounded time rather than an exact time, the exact-time event density cannot automatically be treated as the density for the recorded time; the timestamp precision and its observation process must be addressed. If the sample was taken after the event, this pre-event marker density is not justified by the stated model.

Diagnostics, Alternatives, and Limitations

Before using this contribution, check the data and protocol rather than treating matching timestamps as proof of a pre-event measurement. Useful checks include the following:

  • Confirm whether the event time is exact or rounded, and whether the marker and event clocks use the same time origin and units.
  • Check the protocol or records for the actual order of sampling and event occurrence. A documented pre-event sample supports this convention; an unknown order does not.
  • Verify that the marker mean and measurement-error distribution are evaluated at the event time, and that the hazard and survival use the same time scale.
  • Check that the conditional independence and measurement-selection assumptions are credible. If event occurrence changes the measurement process or marker error beyond what the model represents, the product needs a richer model.

The main alternative is to use an explicitly post-event marker model when the measurement truly follows the event and the scientific model supports that distribution. Another possibility, when the records cannot establish order, is to obtain more precise timing or specify a model for the timing and order mechanism. Neither alternative is achieved by simply swapping factors: the marker distribution itself may change, and the observation process may carry information.

A frequent mistake is to reason, “The marker and event have the same timestamp, so I can evaluate the usual longitudinal model at that time and multiply by the event density.” The correction is that a timestamp tie does not establish the measurement’s relation to the event. The product is justified only after an ordering convention or protocol is stated and the conditional marker model and independence assumptions are appropriate. A further limitation is that this contribution handles an observed event with one marker measurement at that time; it does not by itself address censoring, rounded event times, or a post-event response process.

Key takeaway: For an event-time marker measured immediately before an exact event, the conditional contribution is the marker density at the event time multiplied by the event-time density, \(h_i(t_i\mid b_i)S_i(t_i\mid b_i)\). The observation order and conditional assumptions are part of the model, not details that can be inferred from matching timestamps.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. Under the pre-event convention, what two conditional densities form the contribution for a marker value \(y_i\) recorded at an exact event time \(t_i\)?
  2. A marker is recorded at the event timestamp, but the data system rounds times to the nearest day and provides no order information. Is the exact-time pre-event contribution automatically justified? Explain.
  3. In a model with event-time density \(0.04\) per year and marker density \(0.25\) per marker unit, what is the joint conditional density contribution, and what are its units?
  4. Why does conditional independence given the random effects not imply that the marker and event time are independent marginally?
  5. A specimen was collected after an event, but an analyst evaluates the pre-event longitudinal density at the event time. What assumption has not been justified?

Solutions. (1) Multiply \(p(y_i\mid b_i,t_i)\) by \(f_i(t_i\mid b_i)=h_i(t_i\mid b_i)S_i(t_i\mid b_i)\). (2) No. Rounded matching times do not establish the actual order or an exact event time; the timing precision and protocol must be considered. (3) The product is \(0.25(0.04)=0.010\) per marker unit per year. It is a density, not a point probability. (4) Both factors can depend on the shared random effects, so integrating over those effects can induce marginal dependence. (5) The analyst has not justified that a post-event measurement follows the pre-event marker distribution; an appropriate post-event or observation-process model may be needed.

Clinical Biostats