Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Calendar-Time And Gap-Time Visit Intensities

Informative Observation Schedules · Tutorial 45 of 697

Calendar-Time And Gap-Time Visit Intensities

Distinguish visit rates indexed by time since study entry from rates indexed by time since the previous visit, and assess which clock represents a proposed monitoring pattern.

Advanced 12 min read

What You'll Learn

  • Define calendar-time and gap-time visit intensities using the visit history.
  • Calculate how each clock predicts rates for patients with different visit histories.
  • Derive the probability of no visit over a gap from its intensity.
  • Recognize when a scheduled pattern, a reset-after-visit pattern, or both clocks may be relevant.
  • Identify assumptions, diagnostics, and limitations of comparing these models.

Two Clocks for the Same Visit Process

A visit intensity describes how quickly visits are occurring, conditional on the history observed so far. But “time” in that description can refer to different clocks. A calendar-time model measures time since study entry; a gap-time model measures time since the most recent visit. These clocks coincide before a patient’s first visit, then diverge as soon as visits occur. Choosing between them changes what the model says about patients who are at the same study day but have different visit histories.

Let \(N_i(t)\) count patient \(i\)’s visits from study entry through study time \(t\), and let \(T_{ij}\) be the time of the \(j\)th visit. Set \(T_{i0}=0\), the study-entry time. Write \(\mathcal{F}_i(t-)\) for the patient’s observed history just before \(t\), including previous visits and any covariate information available by then. The patient is assumed to be under observation and at risk of a further visit at \(t\).

Definition: The calendar-time visit intensity \(\lambda_i^{\mathrm{cal}}(t\mid\mathcal{F}_i(t-))\) is the instantaneous visit rate indexed by time \(t\) since study entry. The gap time at \(t\) is \(u_i(t)=t-T_{i,N_i(t-)}\), the time since the most recent visit (or since entry if there has been no visit). A gap-time intensity is indexed by \(u_i(t)\), along with any relevant history or covariates. In either case, an intensity \(\lambda_i(t)\) satisfies \(P\{N_i(t+h)-N_i(t)=1\mid\mathcal{F}_i(t-)\}=\lambda_i(t)h+o(h)\) as \(h\) decreases to zero; the probability of two or more visits in that short interval is \(o(h)\).

Intensities have units of visits per unit time, such as visits per day. They are conditional rates, not probabilities: a rate of \(0.2\) visits per day does not mean a 20% probability of a visit on any particular day. The probability over a longer interval depends on how the intensity behaves throughout that interval.

What Each Clock Says

A calendar-time model makes the rate depend on study time. For example, a pattern tied to a protocol milestone at week 12 can be represented by a rate that changes around that week. Patients at the same study time have the same modeled rate if the model contains no additional history-dependent terms, even if one had a recent visit and another did not.

A gap-time model makes the rate depend on time since the previous visit. It can represent, for example, a pattern in which another visit becomes increasingly likely as a patient goes longer without being seen, or a pattern in which visits are less likely immediately after a recent visit. When a visit occurs, the gap clock resets to zero. A gap-time model therefore predicts the same rate for two patients with the same gap and the same modeled covariates, even if they are at different study times.

A gap-time intensity can still depend on other predictable information. A general form is \(\lambda_i(t)=g(u_i(t), Z_i(t-),\mathcal{H}_i(t-))\), where \(Z_i(t-)\) denotes available covariates and \(\mathcal{H}_i(t-)\) denotes other history included in the model. The clock specifies the time scale for the rate; it does not require ignoring the rest of the history. Likewise, a calendar-time model can include past visits or covariates if the scientific model calls for them.

Worked Example: A Rate That Changes With Study Time

Suppose, hypothetically, that a protocol introduces more frequent monitoring after day 6. Consider the calendar-time intensity \(\lambda^{\mathrm{cal}}(t)=0.10+0.05I(t\geq 6)\), in visits per day, where \(I(t\geq6)\) equals 1 on or after day 6 and 0 before it.

At day 4, the rate is \(0.10+0.05(0)=0.10\) visits per day. At day 8, it is \(0.10+0.05(1)=0.15\) visits per day. Under this model, two patients still under observation at day 8 have the same modeled rate, whether their previous visits were on days 7 and 3, respectively, because this example’s rate depends only on calendar time.

That prediction is appropriate only if the proposed rate pattern is tied to the study calendar and the model’s omitted history does not need to explain additional rate differences. A rise after day 6 is a model assumption here, not evidence that the monitoring protocol actually caused more visits.

Worked Example: A Rate That Resets After Each Visit

Suppose, hypothetically, that the gap-time intensity is \(\lambda^{\mathrm{gap}}(u)=0.04u\) visits per day, with \(u\) measured in days. The coefficient \(0.04\) has units of visits per day squared, so multiplying it by a gap in days gives a rate in visits per day.

If a patient has gone 2 days since the last visit, the rate is \(0.04(2)=0.08\) visits per day. At a gap of 6 days, it is \(0.04(6)=0.24\) visits per day. The model expresses a rising rate as the current visit-free interval grows. Immediately after a visit, \(u=0\) and this particular model’s rate is zero; that is a strong feature that would need to be scientifically and empirically defensible.

The implied probability of no visit over the next \(w\) days, conditional on starting a gap at zero and on the specified intensity remaining valid, is \(S(w)=\exp\{-\int_0^w 0.04v\,dv\}=\exp(-0.02w^2)\). For \(w=6\), this is \(\exp(-0.72)\approx0.4868\), so the probability of at least one visit within 6 days is \(1-0.4868=0.5132\). The rate at the end of the interval is \(0.24\) visits per day, but that endpoint rate alone does not give the six-day probability.

Why the No-Visit Probability Has This Form

The gap-time survival expression follows directly from the definition of an intensity. Let \(S(w)\) be the conditional probability of no visit during the first \(w\) days after a visit, with a specified predictable covariate path. Over a short additional interval of length \(h\), the chance of a visit, conditional on having had none so far, is \(g(w)h+o(h)\). Thus \(S(w+h)=S(w)\{1-g(w)h+o(h)\}\). Subtract \(S(w)\), divide by \(h\), and take the limit as \(h\) decreases to zero to obtain the differential equation \(S'(w)=-g(w)S(w)\), with \(S(0)=1\). Separating variables and integrating gives the result.

$$ S(w)=\exp\left\{-\int_0^w g(v)\,dv\right\}, \qquad P(\text{at least one visit by }w)=1-S(w). $$

If covariates change during the gap, \(g(v)\) is evaluated along their predictable path, rather than treated as a fixed number. This argument justifies a waiting-time probability from a specified intensity. It does not mean that every intensity model is a homogeneous Poisson process: a Poisson-process interpretation requires additional assumptions about the process, not merely a rate formula.

Worked Example: Same Study Day, Different Gaps

Consider two hypothetical patients still under observation on study day 10. Patient A’s previous visit was on day 9, so \(u_A(10)=10-9=1\) day. Patient B’s previous visit was on day 4, so \(u_B(10)=10-4=6\) days. Compare a calendar-time model \(\lambda^{\mathrm{cal}}(t)=0.05+0.01t\) with a gap-time model \(\lambda^{\mathrm{gap}}(u)=0.05+0.02u\), both in visits per day.

Under the calendar-time model, each patient’s day-10 rate is \(0.05+0.01(10)=0.15\) visits per day. Under the gap-time model, Patient A’s rate is \(0.05+0.02(1)=0.07\) visits per day, while Patient B’s is \(0.05+0.02(6)=0.17\) visits per day. The two models make different predictions because the patients share calendar time but not gap time.

These calculations compare the implications of two specified models; they do not establish which model fits real data better. The choice should be guided by how visits are generated and assessed using observed visit histories.

Choosing and Checking a Time Scale

A useful starting question is: what change in the study situation should make the visit rate change? If visits cluster around a shared study milestone, calendar time may capture that structure. If the mechanism concerns how long a patient has waited since their last contact, gap time may be more natural. A process can involve both: a protocol may change monitoring at a calendar milestone while patients also become more likely to return after a long gap.

The comparison assumes that study entry and visit times are recorded on a consistent time scale, that the relevant at-risk period is correctly identified, and that the intensity conditions on the history needed for the scientific question. Visits must be counted consistently; a terminal event or end of follow-up ends the period at risk for further visits. The formulas describe rates for a specified observation process and do not by themselves account for unobserved triggers or explain why a patient’s visits occur.

Modeling choiceRate is indexed byDistinctive predictionPotential use
Calendar timeTime since study entry, \(t\)At a given \(t\), patients with different prior-visit times have the same rate if no visit-history terms are included.Monitoring patterns tied to study milestones or calendar schedules.
Gap timeTime since the most recent visit, \(u_i(t)\)At a given gap, patients at different study times have the same rate if no calendar-time terms are included.Patterns tied to waiting time since last contact.
Both clocksCalendar time and gap timeRates can vary both across study time and across patients’ current gaps.Situations with plausible calendar and post-visit patterns, provided the data can distinguish them.

A hybrid model might specify \(\lambda_i(t)=\exp\{\beta_0+f(t)+g(u_i(t))\}\), where \(f\) and \(g\) are chosen functions. This flexibility is not automatically an advantage: calendar time and gap time can be strongly related in a dataset, making their separate patterns difficult to distinguish. With sparse or similar visit histories, the data may provide little information about whether a rate pattern belongs to one clock or the other.

Useful checks include comparing observed visit frequency across study-time bands and across gap-length bands, and checking whether the model’s predicted rates reproduce those patterns. A calendar-only model is questionable if patients at the same study time show systematic rate differences associated with their gaps. A gap-only model is questionable if rates vary around common study milestones even among patients with similar gaps. These are diagnostic clues, not proof of a particular mechanism. Also check whether fitted rates are plausible near \(u=0\), at long gaps, and near study boundaries; a simple functional form can imply implausible rates outside the range well represented in the data.

A common mistake is to say, “Visits occur later in the study, so the rate must depend on calendar time.” Later visits also occur after longer observation and may follow longer gaps; the visit times alone do not identify which clock is responsible. The correction is to compare the histories that distinguish the clocks: at the same study time, do rates differ with gap length, and at similar gap lengths, do rates differ with study time? If the observed histories do not provide such contrasts, the distinction may not be identifiable from those data.

Neither clock is universally correct. A calendar-time model can miss a reset-after-visit pattern; a gap-time model can miss shared changes tied to study milestones. A hybrid model can be hard to estimate and interpret, and no clock choice corrects an incorrectly measured visit history or an omitted, unobserved trigger. The aim is to state clearly which time scale the modeled intensity represents and to assess whether that description is plausible.

Key takeaway: Calendar time asks how visit intensity changes with time since study entry; gap time asks how it changes with time since the last visit. When patients at the same study time have different gaps, or the same gap at different study times, the clocks can make distinct, testable predictions.

Check Your Understanding

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

  1. At study day 12, two patients have gaps of 2 and 7 days. Which clock predicts the same rate for both patients if the model includes only that clock?
  2. For \(\lambda^{\mathrm{gap}}(u)=0.03u\) visits per day, calculate the rate at a gap of 5 days.
  3. Using the same intensity, calculate the probability of at least one visit in the first 4 days of a gap, assuming the gap starts at zero and the intensity remains valid.
  4. Give one reason a hybrid calendar-time and gap-time model may be difficult to interpret or estimate.

Solutions. (1) A calendar-time-only model predicts the same rate for both at day 12; a gap-time-only model generally predicts different rates because their gaps differ. (2) The rate is \(0.03(5)=0.15\) visits per day. (3) The cumulative intensity is \(\int_0^4 0.03v\,dv=0.015(16)=0.24\). Thus the probability is \(1-\exp(-0.24)\approx1-0.7866=0.2134\), or about 21.34%. (4) Calendar time and gap time may be strongly related in the observed histories, so their separate contributions may be weakly identified; a flexible hybrid can also be harder to interpret.

Clinical Biostats