Tutorials › Competing Risks and Multi-State Models › Martingale Transforms for Weighted Event Processes

Counting Processes and Martingale Theory · Tutorial 447 of 699

Martingale Transforms for Weighted Event Processes

Build weighted martingale residuals from event counts and determine how predictable weighting changes their variance.

Advanced 11 min read

What You'll Learn

  • Define a weighted transform by integrating a predictable weight against a compensated counting process.
  • State conditions that make the transform a square-integrable martingale with mean zero.
  • Use the stochastic-integral isometry to calculate its variance.
  • Compare weighted and unweighted transforms using event-process examples.
  • Identify why nonpredictable or overly variable weights can invalidate or destabilize an analysis.

Why Weight a Compensated Event Process?

A compensated count subtracts the event accumulation expected under its intensity model from the observed count. The resulting martingale residual process has conditional mean-zero increments, making it useful for assessing departures from a model and constructing estimating quantities. A weighted transform changes which times or histories contribute most to that residual. The central trade-off is direct: larger weights at times with event intensity generally increase variance, while weights near zero suppress those contributions.

Weighting is valid only when the weight is predictable: at each time, its value may depend on information available just before that time, but not on the event increment that is about to occur. It also requires adequate integrability. These conditions are not technical decorations; they are what allow the weighted process to retain a martingale interpretation and have a finite, correctly calculated variance.

Definition and Conditions

Consider a simple counting process \(N(t)\) on a fixed interval \(0\leq t\leq\tau\), with continuous compensator \(A(t)\). Write \(M(t)=N(t)-A(t)\) for its compensated process. The filtration \(\mathcal{F}_t\) represents the information available through time \(t\). Assume \(M\) is a square-integrable martingale on this interval. For example, it is sufficient in the usual counting-process setting to have finite expected event accumulation, \(E[A(\tau)]<\infty\), together with the stated square-integrability assumptions on \(M\).

Definition: Let \(H(t)\) be a predictable process, meaning its value at time \(t\) is determined by information available just before \(t\). The weighted martingale transform of \(M\) is $$ Z_H(t)=\int_0^t H(u)\,dM(u),\qquad 0\leq t\leq\tau. $$ A sufficient square-integrability condition is $$ E\left[\int_0^\tau H(u)^2\,dA(u)\right]<\infty. $$ Under these conditions, \(Z_H\) is a square-integrable martingale with \(E[Z_H(t)]=0\), and $$ \operatorname{Var}\{Z_H(t)\}=E\left[\int_0^t H(u)^2\,dA(u)\right]. $$

Because \(M=N-A\), the transform can also be written as the weighted observed count minus the weighted compensator. When \(N\) has event times \(T_j\) and \(A\) is continuous,

$$ Z_H(t)=\sum_{j:T_j\leq t}H(T_j)-\int_0^t H(u)\,dA(u). $$

This pathwise representation makes the role of the weight visible: each observed event contributes its weight at the event time, and the compensator is weighted over time in the same way. With an intensity \(\lambda(u)\) and exposure or at-risk indicator \(Y(u)\), the compensator is commonly \(A(t)=\int_0^tY(u)\lambda(u)\,du\). The variance formula then weights that expected event accumulation by \(H(u)^2\), not \(H(u)\).

Why the Variance Formula Holds

The result is the stochastic-integral isometry for a compensated counting-process martingale. To see the key reasoning, first take a simple predictable weight that is constant on time intervals, with each interval’s weight known at its left endpoint. The transform is then a sum of weighted martingale increments. Each increment has conditional mean zero given the information at the start of its interval. Consequently, cross-products between distinct increments have expectation zero: condition on the information available before the later increment, which includes the earlier increment and the later interval’s predictable weight.

For a compensated count with continuous compensator, the squared-increment identity underlying the isometry assigns an interval’s expected squared martingale increment to its compensator accumulation. Thus, for simple predictable weights, the squared weights multiply the corresponding compensator increments, giving the isometry. General predictable weights satisfying the stated finite-integral condition are obtained as limits of simple predictable weights in the stochastic-integral construction; the isometry carries over in that limit. This is a direct isometry argument. It does not rely on assuming that a stochastic integral appearing in a squared-process expansion has mean zero.

$$ E[Z_H(t)]=0,\qquad E[Z_H(t)^2]=E\left[\int_0^t H(u)^2\,dA(u)\right]. $$

The first equality follows because the square-integrable stochastic integral is a martingale starting at zero. The second follows from the isometry. Since the mean is zero, the second moment is the variance. If the weight or compensator is random, the expectation outside the integral is essential: the integral itself may vary across event histories.

Worked Example: A Constant Weight Under Constant Intensity

Suppose a hypothetical recurrent-event process has constant intensity \(0.4\) events per day over five days, with complete observation throughout. Thus \(A(t)=0.4t\). Use the constant predictable weight \(H(t)=2\). Calculate the variance of the transform and its value for a hypothetical path with events on days 1 and 4.

The square-integrability condition holds because the weight is bounded and the compensator is finite. The variance is

$$ \operatorname{Var}\{Z_H(5)\} =\int_0^5 2^2(0.4)\,du =4(0.4)(5) =8. $$

The variance is 8 weighted-count-squared units; the standard deviation is \(\sqrt{8}\approx2.828\) weighted-count units. For the specified hypothetical path, the weighted event sum is \(2+2=4\), and the weighted compensator is \(2(0.4)(5)=4\). Therefore \(Z_H(5)=4-4=0\). This realized value is one possible outcome; it does not imply that the transform has zero variance.

How Weighting Changes Variability

The squared weight in the variance formula is consequential. Multiplying every weight by a constant \(c\) multiplies the transform by \(c\), and its variance by \(c^2\), provided the same compensator and time interval are used. More generally, weights that emphasize periods with large expected event accumulation can contribute substantially to variance. A weight’s sign changes the direction of its event contributions, but not its direct contribution to this variance, which depends on \(H^2\).

Worked Example: Emphasizing a Later Time Period

In a hypothetical process, the intensity is constant at \(0.5\) events per day over four days. Set \(H(u)=1\) for \(0\leq u\leq2\), and \(H(u)=3\) for \(2<u\leq4\). This weight is deterministic and therefore predictable. Compare its transform variance with the unweighted variance.

The weighted variance is

$$ \operatorname{Var}\{Z_H(4)\} =\int_0^2 1^2(0.5)\,du+\int_2^4 3^2(0.5)\,du =(2)(0.5)+(2)(9)(0.5) =1+9 =10. $$

The unweighted variance is \(\int_0^4 1^2(0.5)\,du=2\). Thus this weighting gives five times the unweighted variance. The later period accounts for \(9/10\) of the weighted variance, even though it occupies only half the observation time, because its weight is three times as large and variance uses its square.

For a hypothetical path with events at days 1 and 3, the weighted event sum is \(1+3=4\). The weighted compensator is \((0.5)(2)(1)+(0.5)(2)(3)=1+3=4\), so the realized transform is zero. As in the first example, a particular realized value and the variance describe different features of the process.

Predictable weights need not be fixed constants. They may use baseline information or the observed history, as long as the value used at each time is determined before the event increment at that time. Such data-adaptive weighting can change variance even when the underlying intensity is unchanged.

Worked Example: A Weight Chosen From Baseline Information

Suppose, hypothetically, a baseline group indicator \(G\) is observed before follow-up. It equals 0 or 1 with probability one-half each, and is independent of a recurrent-event process with constant intensity \(0.5\) events per day over four days. Choose \(H(t)=1\) for \(G=0\) and \(H(t)=2\) for \(G=1\). Because \(G\) is known at baseline, this weight is predictable. Find the unconditional variance.

Conditional on \(G=0\), the variance is \(\int_0^4 1^2(0.5)\,du=2\). Conditional on \(G=1\), it is \(\int_0^4 2^2(0.5)\,du=8\). The transform has conditional mean zero in either group, so its unconditional mean is also zero. Averaging its conditional second moments gives

$$ \operatorname{Var}\{Z_H(4)\} =\frac{1}{2}(2)+\frac{1}{2}(8) =5. $$

Equivalently, \(E[H^2]=\tfrac12(1^2)+\tfrac12(2^2)=2.5\), and the expected compensator over four days is \(2\), giving \(2.5(2)=5\). The calculation depends on the stated independence and common intensity across groups; without them, the group-specific compensator and its expectation would need to be used.

Assumptions, Diagnostics, and Alternatives

Before interpreting a weighted transform, check the conditions that support it. The count and compensator must describe the event process under the model being used; the weight must be predictable; and its squared magnitude must be integrable against the compensator in expectation. For time-varying risk sets, the compensator must also reflect the observation window and the relevant at-risk process. An incorrect risk set or intensity can make a nominally calculated residual fail to have the intended mean-zero interpretation.

A practical diagnostic is to inspect the time pattern and range of the weights alongside the compensator accumulation. Very large weights concentrated where many events are expected can dominate both the transform and its variance. Check that weights are formed from information available before each event time, and verify numerically that \(E[\int H^2\,dA]\) is finite or, in an applied analysis, that its estimated counterpart is not dominated by a few extreme contributions. If the weight is estimated, its estimation and any resulting uncertainty may require additional analysis; the known-weight isometry alone does not automatically account for that uncertainty.

The unweighted residual \(M(t)\) is the special case \(H(t)=1\). It gives equal direct weight to every event contribution, whereas a weighted transform targets selected times or histories at the cost of altered variability. Standardizing by the square root of the variance can put a transform on a unit-variance scale when that variance is positive and known or appropriately estimated. A unit-variance calculation does not, by itself, establish a normal distribution or justify a particular test.

Common pitfall: Choosing a weight using whether an event occurs at the current time, and then treating the result as a martingale transform, is generally invalid. That choice uses the increment the weight is supposed to precede, so predictability fails and the weighted increment need not have conditional mean zero. Use a weight determined from the past instead. Also, local square-integrability alone does not guarantee a finite variance or a mean-zero true martingale; verify the finite expected integral condition, or use an appropriate localization argument for a different claim.

These transforms are limited by their assumptions and purpose. They summarize weighted deviations from a specified compensator; they do not establish that the intensity model is correct, and a zero realized transform is not proof of model adequacy. If the compensator is estimated from the same data, the simple known-compensator variance formula may not capture all sources of uncertainty. Interpret both the weighting target and the variance calculation in the context of how the intensity and weights were obtained.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. For constant intensity \(\lambda=0.3\) events per day over six days and constant weight \(H=2\), what is the transform variance?
  2. Why does multiplying a predictable weight by \(c\) multiply the variance by \(c^2\)?
  3. A proposed weight at time \(t\) is 1 if an event occurs at \(t\), and 0 otherwise. What condition is at issue?
  4. For a predictable random weight \(H\), which quantity determines the variance: \(\int H\,dA\) or \(E[\int H^2\,dA]\)?

Solutions. (1) The integrability condition holds for this bounded weight and finite interval, and \(\operatorname{Var}\{Z_H(6)\}=\int_0^6 2^2(0.3)\,du=4(0.3)(6)=7.2\). (2) The transform is linear in the weight, so \(Z_{cH}=cZ_H\), and \(\operatorname{Var}(cZ_H)=c^2\operatorname{Var}(Z_H)\). (3) Predictability fails: the weight uses the current event increment rather than information available just before it. (4) The variance is \(E[\int H^2\,dA]\), assuming the stated square-integrability condition; the squared weight and the outer expectation both matter.

Clinical Biostats