Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Choosing the Time Origin and Risk Set

The Basic Joint Model · Tutorial 144 of 697

Choosing the Time Origin and Risk Set

Learn to choose and state a time origin consistently, determine who belongs to a risk set, and interpret what changes when the time coordinate is recentered.

Advanced 10 min read

What You'll Learn

  • Distinguish time since enrollment, diagnosis, and another defined origin.
  • Define entry, observed event or censoring time, and the risk set just before a given time.
  • Re-express longitudinal trajectories and hazards after shifting the time origin.
  • Identify how inconsistent time coordinates change coefficient and baseline-hazard interpretations.
  • Recognize entry/event ties and other risk-set bookkeeping pitfalls.

Why the Time Origin Matters

A joint model connects a subject’s longitudinal trajectory to an event process over time. Its longitudinal submodel describes the marker at time \(t\), while its event submodel describes the hazard at time \(t\), often through the latent current marker value. The symbol \(t\) must refer to the same time scale in both submodels. If \(t\) means months since diagnosis for the marker but months since enrollment for the hazard, the model combines quantities from different points on the subject’s history.

The origin is the event or reference time defined as time zero. Depending on the scientific question, it might be diagnosis, randomization, enrollment, or another clearly specified event. Choosing an origin is not just a matter of labeling the horizontal axis: it determines what a trajectory intercept means, how follow-up durations are calculated, and what the baseline hazard describes.

Definition: Let \(t\) denote time measured from a stated origin. For subject \(i\), let \(A_i\) be the time they enter observation and the event risk set on that time scale, \(T_i\) their event time, and \(C_i\) their censoring time. Define \(U_i=\min(T_i,C_i)\) and let \(\Delta_i=1\) if the event is observed and \(\Delta_i=0\) if the subject is censored. The subject is in the risk set immediately before time \(t\) when \(A_i<t\le U_i\), under the convention that entry at exactly \(t\) occurs after events at \(t\). Thus, \(R(t)=\{i:A_i<t\le U_i\}\).

The strict inequality at entry and inclusive inequality at exit describe the risk set immediately before \(t\). A subject entering at \(t\) is not yet at risk immediately before \(t\); a subject whose event or censoring occurs at \(t\) has not yet left just before that time. If event and entry times can be recorded as tied, the data protocol must specify their ordering. The convention above excludes entrants at \(t\) from events at \(t\). When timestamps are rounded and the order is unknown, the tie convention is a modeling and data-management decision, not something the recorded times resolve by themselves.

Time in the Two Submodels

A common shared-random-effects specification makes the alignment explicit. Write the latent marker trajectory as \(m_i(t)=x_i(t)^{\mathsf T}\beta+z_i(t)^{\mathsf T}b_i\), where \(b_i\) is the subject-specific random-effects vector. A current-value event model can be written as

$$ h_i(t\mid b_i)=h_0(t)\exp\{\gamma^{\mathsf T}w_i(t)+\alpha m_i(t)\}. $$

Here \(h_i(t\mid b_i)\) is the event hazard conditional on the random effects and covariate history, \(h_0(t)\) is the baseline hazard, and \(m_i(t)\) is the latent marker value at the same time \(t\). The hazard is defined among subjects who have entered and remain event-free just before \(t\). The longitudinal and event submodels need compatible time coordinates so that \(m_i(t)\), covariates, and \(h_0(t)\) refer to the same point on the chosen clock.

Changing a shared origin by a fixed amount can be a harmless coordinate transformation if all relevant times and functions are transformed consistently. But the interpretation changes, and the baseline hazard must be re-expressed on the new scale. Choosing time since enrollment rather than time since diagnosis can also change the scientific question: the former describes hazard by duration in the study, whereas the latter describes it by duration since diagnosis. These are not generally interchangeable if subjects enroll at different times after diagnosis.

Key condition: State the time origin and time units for the longitudinal measurements, event and censoring times, entry times, time-varying covariates, and baseline hazard. Use one consistent coordinate in both submodels. If the origin is shifted, transform the trajectory, risk-set times, and baseline hazard together.

What Recentring Does

Suppose the original time is \(t\), and a new coordinate is \(s=t-c\), where \(c\) is a fixed constant. A marker trajectory on the new scale is \(m_i^*(s)=m_i(s+c)\). The hazard on that scale is \(h_i^*(s\mid b_i)=h_i(s+c\mid b_i)\). In particular, the new baseline hazard is \(h_0^*(s)=h_0(s+c)\), wherever the new time scale is defined. This follows directly from the definition of a hazard: an interval of length \(ds\) on the new scale is the same interval of length \(dt=ds\) on the original scale.

$$ h_i^*(s\mid b_i) =\lim_{ds\to 0} \frac{P(s\le S_i<s+ds\mid S_i\ge s,b_i)}{ds} =h_i(s+c\mid b_i). $$

For a linear marker trajectory \(m_i(t)=\beta_0+\beta_1t+b_{0i}+b_{1i}t\), substitution gives

$$ m_i^*(s) =(\beta_0+c\beta_1)+\beta_1s+(b_{0i}+cb_{1i})+b_{1i}s. $$

Thus, the fixed intercept is now the population trajectory at original time \(c\), and the subject-specific intercept is recentered in the same way. The slope remains the rate of change per time unit. If a model imposes a particular parametric form on \(h_0(t)\), the shifted baseline may not retain the same form with the same parameters; it must be checked rather than assumed.

Worked Example: Recentring a Marker Trajectory

Suppose, hypothetically, that time \(t\) is months since diagnosis and the latent marker trajectory for a subject is \(m_i(t)=10+0.5t\), measured in marker units. The study begins four months after diagnosis, so define study time \(s=t-4\). Find the trajectory at study time \(s=0\) and \(s=6\), and compare it with the original-time expression.

Substituting \(t=s+4\) gives \(m_i^*(s)=10+0.5(s+4)=12+0.5s\). At enrollment, \(s=0\), so the latent marker is \(12+0.5(0)=12\) units. Six months after enrollment, \(s=6\), it is \(12+0.5(6)=15\) units. On the diagnosis scale, these are \(t=4\) and \(t=10\): \(10+0.5(4)=12\) and \(10+0.5(10)=15\), respectively.

The recentered intercept is 12 marker units, the predicted value at enrollment; it is not the predicted value at diagnosis. The slope is \(0.5\) marker units per month on either scale. If the event model uses the latent current value, its marker term at the same event time must use \(m_i^*(s)\), not \(m_i(t)\) with an unrelated value of time.

Worked Example: Risk-Set Membership With Entry and Exit Times

Consider these hypothetical subjects, with times in months on a common study clock. Here \(U_i\) is the event or censoring time; an event is observed when \(\Delta_i=1\).

Subject\(A_i\)\(U_i\)\(\Delta_i\)
1061
2080
3260
4691
5141

Find the risk set immediately before month 6. Apply \(A_i<6\le U_i\) to each subject. Subjects 1, 2, and 3 satisfy the condition: for example, subject 3 has \(2<6\le6\). Subject 4 entered at 6, so \(A_4<6\) is false; subject 5 exited at 4, so \(6\le U_5\) is false. Therefore \(R(6)=\{1,2,3\}\), with three subjects at risk immediately before month 6.

Subject 1 has an event at month 6 and subject 3 is censored then, but both are still in the risk set immediately before that instant. Under the stated convention, subject 4, who enters at the same recorded time, is not included in that risk set.

When the Clocks Do Not Match

Consider a subject whose enrollment occurs four months after diagnosis. If the marker model is evaluated at months since diagnosis but the event model’s baseline hazard is indexed by months since enrollment, then the expression \(m_i(t)\) in the hazard link does not refer to the marker at the event model’s time \(t\). A current-value association parameter \(\alpha\) is meant to describe how the latent marker value at time \(t\) relates to the hazard at that same time. Misalignment makes that interpretation incorrect, even if the model can be made to produce numerical estimates.

The risk set also depends on the chosen clock. On a diagnosis-time scale, someone enrolled at month 4 has entry time \(A_i=4\); on a study-time scale beginning at enrollment, their entry time is \(A_i=0\). Those descriptions may represent the same observed follow-up after a consistent transformation, but their baseline hazard has a different time interpretation. If enrollment occurs at different disease durations, using study time makes the baseline hazard a function of time since enrollment, not time since diagnosis.

Worked Example: A Marker Association at the Correct Time

Suppose, hypothetically, that on the diagnosis-time scale a subject’s latent marker is \(m_i(t)=10+0.5t\), and the event model contains \(\exp\{\alpha m_i(t)\}\) with \(\alpha=0.2\) per marker unit. At diagnosis time \(t=10\) months, \(m_i(10)=10+0.5(10)=15\) units. The marker multiplier in the hazard is \(\exp(0.2\times15)=\exp(3)\), approximately \(20.09\), relative to the same baseline and other covariates when the marker contribution is zero.

Now express time as months since enrollment, with enrollment at diagnosis month 4. The same event time is \(s=10-4=6\), and the correctly recentered marker is \(m_i^*(6)=12+0.5(6)=15\). The marker multiplier remains \(\exp(0.2\times15)\), as it must. Using the untransformed diagnosis-scale expression with \(s=6\) would instead give \(10+0.5(6)=13\) units and \(\exp(2.6)\), approximately \(13.46\). That discrepancy is caused by mixing clocks, not by a biological change in the marker association.

Assumptions, Checks, and Alternatives

Before constructing a risk set or interpreting a time-dependent joint model, establish the following:

  • A defined origin and unit. Every time must be interpretable as a duration from the stated origin, in a stated unit such as months.
  • Compatible time coordinates. The marker trajectory, event hazard, covariates, entry, and exit times must use the same clock, or be explicitly transformed to one.
  • Correct entry and exit records. \(A_i\) must represent when the subject first becomes under observation and at risk on that scale; \(U_i\) must represent the event or censoring time on the same scale.
  • A stated tie convention. Define whether a subject entering at an event time contributes to the risk set for that instant. The definition \(A_i<t\le U_i\) uses entry-after-events ordering for exact ties.

Useful diagnostics are often basic checks of the time records: verify that \(A_i\le U_i\), inspect subjects with \(A_i=U_i\), list the number at risk at selected event times, and compare recorded visit, entry, event, and censoring dates after conversion to the analysis clock. Plotting longitudinal records against the selected time scale can reveal trajectories that have been accidentally shifted or incorrectly labeled. A risk-set count of zero at a recorded event, or an unexpectedly large number at risk after follow-up should have ended, signals a time-record or convention problem.

The main alternative is to use a different scientifically meaningful clock, such as age rather than time since enrollment. Neither scale is universally preferable: the choice depends on which time process the baseline hazard is intended to describe. A calendar-time analysis may also be relevant when subjects experience common period effects, but calendar time and time since an individual’s diagnosis answer different questions. A change of clock is not merely a cosmetic alternative if it changes how subjects align in time or changes the meaning of the hazard.

This tutorial defines risk-set membership and the bookkeeping consequences of time origin. The likelihood adjustments needed when observation begins after the chosen origin are a separate issue. In particular, defining \(A_i>0\) on a disease-time scale does not by itself specify how delayed entry is incorporated into a likelihood.

Common Mistakes and Practical Limits

  • Including a subject with \(A_i=t\) in the risk set just before \(t\). The condition \(A_i<t\le U_i\) excludes that subject. Including them requires a different, explicitly stated ordering convention.
  • Using one clock for the marker and another for the hazard. Transform the trajectory and baseline hazard together; do not simply reuse the same numerical \(t\).
  • Calling every intercept the baseline marker value. After recentering, the intercept is the expected marker at the new origin, which may be months or years after the original origin.
  • Assuming a shift leaves a parametric baseline unchanged. The baseline on the new scale is \(h_0(s+c)\); its form and parameters need not be the same as those on the original scale.

A time origin cannot correct poor time measurement, ambiguous ties, or an ill-defined entry process. Nor does choosing a plausible clock establish that the hazard model or longitudinal trajectory is otherwise adequate. The origin makes the model’s time interpretation precise; it does not guarantee that the assumptions are scientifically appropriate.

Key takeaway: Choose the clock to match the scientific time process of interest, then use it consistently in both submodels. For the risk set immediately before \(t\), the convention here is \(R(t)=\{i:A_i<t\le U_i\}\); entry at \(t\) is excluded, while event or censoring at \(t\) is included just before exit.

Check Your Understanding

Answer each question using the stated risk-set and time-origin conventions. Solutions follow the questions.

  1. A subject enters at \(A_i=3\) months and is censored at \(U_i=7\) months. Is the subject in the risk set immediately before \(t=3\), \(t=5\), and \(t=7\)?
  2. A marker trajectory is \(m_i(t)=8+0.4t\), with \(t\) in months since diagnosis. Study time is \(s=t-5\). Write the recentered trajectory and find its value at \(s=2\).
  3. Why is it inconsistent to use a marker value measured at 12 months since diagnosis in a hazard indexed at 12 months since enrollment, when enrollment occurred 5 months after diagnosis?
  4. At a tied time \(t=9\), subject A has \(A_A=0,U_A=9\), while subject B has \(A_B=9,U_B=12\). Under the convention in this tutorial, which subject is in the risk set immediately before \(t=9\)?

Solutions. (1) At \(t=3\), \(A_i<t\) is false, so the subject is not yet in the risk set. At \(t=5\), \(3<5\le7\), so the subject is in it. At \(t=7\), \(3<7\le7\), so the subject is included immediately before censoring. (2) Substitute \(t=s+5\): \(m_i^*(s)=8+0.4(s+5)=10+0.4s\). At \(s=2\), the value is \(10+0.4(2)=10.8\) marker units. (3) The two values refer to different points in the subject’s history: 12 months since diagnosis is 7 months since enrollment. A current-value link requires the marker and hazard to use the same time coordinate and instant. (4) Subject A is included because \(0<9\le9\). Subject B is excluded because \(A_B<9\) is false; entry at the tied instant occurs after events under this convention.

Clinical Biostats