Tutorials › Competing Risks and Multi-State Models › Compensators and Cumulative Mean Functions

Counting Processes and Martingale Theory · Tutorial 441 of 699

Compensators and Cumulative Mean Functions

Learn how to integrate a stochastic intensity into a compensator, relate it to expected event counts, and recognize when that interpretation relies on integrability and a correctly specified intensity.

Advanced 12 min read

What You'll Learn

  • Define a compensator from a predictable event intensity
  • Distinguish a compensator path from an observed counting-process path
  • Relate expected counts to expected compensator increments
  • Calculate compensators with constant, at-risk, and cause-specific intensities
  • Identify assumptions and common failures in compensator interpretation

From an Instantaneous Rate to an Accumulated Quantity

A counting process records how many events have occurred by each time. Its intensity describes the rate of event accumulation using information available just before each time point. To understand expected evolution over an interval, the rate must be accumulated over that interval. This accumulated, history-dependent rate is the compensator.

The distinction matters because an observed count is random, whereas the compensator describes the event accumulation anticipated by the model from the evolving history. A compensator is generally itself random: different event histories can produce different intensity paths and therefore different compensator paths.

Definition: Let \(N(t)\) be a counting process adapted to a filtration \(\mathcal{F}_t\), the information available by time \(t\). If \(N\) has a nonnegative, predictable intensity \(\lambda(t)\), its compensator is the integrated intensity $$ A(t)=\int_0^t \lambda(u)\,du. $$ Predictable means that the rate at time \(t\) is determined by information available immediately before \(t\), not by a jump that occurs at \(t\). Under the usual integrability conditions, \(N(t)-A(t)\) is a martingale. In particular, when the relevant expectations are finite, expected count increments equal expected compensator increments.

For a simple counting process, a jump increases \(N(t)\) by one. Informally, an intensity \(\lambda(t)\) says that, over a short interval of length \(dt\), the conditional expected number of events is approximately \(\lambda(t)dt\), given the history just before that interval. The integral adds up these local rates. If the rate has units of events per day, then \(A(t)\) and \(N(t)\) are counts, measured in events.

The integral is path-dependent whenever the intensity depends on the history. For example, with an at-risk indicator \(Y(t)\) and a rate \(\lambda_0(t)\) while at risk, the intensity is \(\lambda(t)=Y(t)\lambda_0(t)\). The compensator accumulates rate only during the periods when \(Y(t)=1\).

Why the Compensator Describes Expected Evolution

The martingale characterization gives the expected-count interpretation precisely. If \(N-A\) is an integrable martingale, then its conditional expectation at a later time, given current information, equals its current value. For \(s\leq t\), this implies:

$$ E\{N(t)-N(s)\mid\mathcal{F}_s\} = E\{A(t)-A(s)\mid\mathcal{F}_s\}. $$

Thus, given the history at time \(s\), the expected number of future events through time \(t\) equals the expected compensator accumulated over that interval. Taking unconditional expectations gives \(E\{N(t)-N(s)\}=E\{A(t)-A(s)\}\). This equality requires the relevant martingale and integrability conditions; it is not a claim that the two random quantities are equal on every observed path.

The cumulative mean function \(m(t)=E\{N(t)\}\) is a deterministic function of time. The compensator \(A(t)\) is usually a random process. Under the stated conditions, \(m(t)=E\{A(t)\}\), but \(A(t)\) is not generally the same object as \(m(t)\). Confusing these quantities can lead to incorrect interpretations of both a model and its plotted curves.

Worked Example: Constant Event Rate

Suppose, hypothetically, that events follow a Poisson process with constant intensity \(\lambda(t)=0.4\) events per day. Calculate the compensator at day 5 and the expected number of events during the first 5 days.

The intensity is deterministic and predictable, nonnegative, and integrable over the five-day interval. For a Poisson process, the count has finite expectation and the integrated intensity is its compensator. Therefore,

$$ A(5)=\int_0^5 0.4\,du =0.4(5) =2.0\text{ events}. $$

The martingale expectation relationship gives \(E\{N(5)\}=E\{A(5)\}=2.0\) events. This does not mean that the observed count must equal two. A particular five-day path might contain zero, one, or several events; two is the model-based expected count across repetitions of the process.

Risk Sets Make the Compensator History-Dependent

In event-history data, the intensity often includes an indicator of whether an individual is still under observation and at risk for the event. This makes the integrated rate stop accumulating when the individual leaves the risk set. The at-risk process must be predictable: at each time, it reflects status just before that time.

Worked Example: One Event With a Constant Hazard

Consider a hypothetical individual who can experience one event. While event-free and under observation, the event intensity is \(0.10\) per day. Let \(T\) denote the event time, and suppose observation continues through day 10 if no event occurs. The intensity is \(\lambda(t)=0.10Y(t)\), where \(Y(t)=1\) while the individual is at risk and \(Y(t)=0\) after the event.

For a realized event time \(T\), the compensator through day 10 is

$$ A(10)=\int_0^{10}0.10Y(u)\,du =0.10\min(T,10). $$

The rate is predictable because the individual’s at-risk status just before time \(u\) is known then. The exponential event-time model has survival probability \(P(T\geq u)=e^{-0.10u}\). Consequently, the expected compensator is

$$ E\{A(10)\} =\int_0^{10}0.10P(T\geq u)\,du =\int_0^{10}0.10e^{-0.10u}\,du =1-e^{-1} \approx 0.6321\text{ events}. $$

The expected count is the probability of an event by day 10, since at most one event can occur: \(E\{N(10)\}=P(T\leq10)=1-e^{-1}\approx0.6321\) events. The equality with the expected compensator is confirmed. Yet for a path with an event on day 4, \(N(10)=1\) while \(A(10)=0.10(4)=0.4\) events. The compensator is not a fitted count for that individual; its expectation, rather than its pathwise value, matches the expected count.

Cause-Specific Compensators

For multiple event types, each transition or cause can have its own counting process and intensity. If \(N_k(t)\) counts events of type \(k\), with predictable intensity \(\lambda_k(t)\), its compensator is \(A_k(t)=\int_0^t\lambda_k(u)\,du\). The compensator for the total event count is the sum of these cause-specific compensators when the total count is the sum of the type-specific counts.

Worked Example: Two Competing Event Types

Suppose, hypothetically, that a person is initially at risk for two mutually exclusive first events. While at risk, the cause-specific intensities are constant: \(0.06\) per month for type 1 and \(0.04\) per month for type 2. An event of either type ends the risk period. Assume these intensities describe the cause-specific event rates and that there are no tied events.

Before either event, the total rate is \(0.06+0.04=0.10\) per month, so the probability of still being event-free at month \(u\) is \(e^{-0.10u}\). The type-1 compensator is \(A_1(6)=0.06\min(T,6)\), where \(T\) is the time to either event. Its expectation is

$$ E\{A_1(6)\} =\int_0^6 0.06e^{-0.10u}\,du =\frac{0.06}{0.10}(1-e^{-0.60}) \approx 0.2707\text{ events}. $$

The probability that the first event is type 1 by month 6 is the type-1 rate divided by the total rate, multiplied by the probability of any event by month 6:

$$ P(\text{type 1 by month 6}) =\frac{0.06}{0.10}(1-e^{-0.60}) \approx 0.2707. $$

This equals the expected type-1 count because at most one type-1 event can occur. Similarly, \(E\{A_2(6)\}=(0.04/0.10)(1-e^{-0.60})\approx0.1805\) events. Adding the two expectations gives approximately \(0.4512\) total events, the probability of either event type occurring by month 6.

Assumptions, Diagnostics, and Interpretive Limits

The compensator interpretation depends on the model and the observation scheme. The intensity must be predictable and nonnegative, and its integral must be finite on the time interval of interest. To use equality of expectations, the count and compensator must also satisfy the required integrability conditions. If the intensity is only locally integrable, the martingale relationship may hold locally; it does not automatically guarantee finite unconditional expectations over an arbitrarily long interval.

A compensator is tied to the specified filtration and intensity model. Changing what history is included can change the conditional intensity and therefore the compensator. Likewise, omitting a relevant predictable covariate or using the wrong risk set can make a proposed rate inconsistent with the event process. Calculating an integrated rate correctly does not establish that the rate is scientifically or statistically adequate.

Useful checks include verifying that the intensity is zero when an individual is not at risk, checking that its units integrate to event counts, and ensuring that its value at an event time does not rely on information revealed by that event. If the modeled rate becomes negative, is not predictable, or accumulates outside the observation window, the proposed quantity does not satisfy the stated intensity setup. A discrepancy between one observed \(N(t)\) path and its \(A(t)\) path alone is not a diagnostic failure: pathwise equality is not expected.

QuantityWhat it representsRandom?
\(N(t)\)Observed events accumulated by time \(t\)Yes
\(A(t)\)Integrated predictable intensity along the evolving historyUsually
\(m(t)=E\{N(t)\}\)Marginal expected count by time \(t\)No

These quantities answer related but distinct questions. The compensator retains the path-specific rate information; the cumulative mean function averages over possible paths; the counting process records the realized path. In simple models with deterministic intensity, the compensator may itself be deterministic. In history-dependent models, it is generally random even though its expectation gives the cumulative mean under the required conditions.

Common Mistake

Key takeaway: Do not interpret \(A(t)\) as the number of events that should have occurred by time \(t\) on a particular path. It is the accumulated predictable rate. Under suitable conditions, \(E\{A(t)\}=E\{N(t)\}\), but individual realizations of \(A(t)\) and \(N(t)\) need not be close or equal.

A frequent error is to see \(N(t)-A(t)\) and treat the compensator as a deterministic fitted curve that the observed count ought to follow. The correction is to identify what is random: in general both the observed count and its compensator vary with the event history. Their difference has a martingale interpretation under the model, while the equality of expected counts is an expectation statement, not a pathwise requirement.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A counting process has deterministic intensity \(0.25\) events per hour for 8 hours. Find its compensator at 8 hours and its expected count.
  2. Explain why a realized path with \(N(5)=1\) and \(A(5)=0.6\) does not by itself contradict the compensator relationship.
  3. For one event type, \(\lambda(t)=Y(t)\lambda_0(t)\). What role does \(Y(t)\) play in the compensator?
  4. Two cause-specific compensators are \(A_1(t)\) and \(A_2(t)\), and the total count is \(N_1(t)+N_2(t)\). State the total compensator and the condition needed for the corresponding expected-count interpretation.

Solutions. (1) \(A(8)=\int_0^8 0.25\,du=2.0\) events, so the expected count is 2.0 events under the Poisson model and finite-expectation conditions. (2) The expectation relationship concerns averages across possible paths; it does not require the realized count and compensator to agree. (3) \(Y(t)\) restricts accumulation to times when the individual is at risk, and must be predictable. (4) The total compensator is \(A_1(t)+A_2(t)\). If the total count and compensator satisfy the relevant integrability and martingale conditions, the expected total count increment equals the expected total compensator increment.

Clinical Biostats