Why Represent a Score as a Martingale Integral?
The score is the derivative of the log-likelihood with respect to a model parameter. In an event-history model, its direct likelihood expression typically has one contribution for each observed event and another for the time spent at risk. A martingale representation combines these contributions into a single expression: a predictable weight integrated against a compensated event count. This form makes the score's mean-zero property transparent when the intensity model is correct.
The property is about repeated data generated under the model at its true parameter value. It does not say that the score calculated from one observed history must equal zero. That distinction is important: in one data set, event counts may be above or below their model-based compensator.
Here, \(\lambda(t;\theta)\) is the instantaneous event rate conditional on the observed history just before time \(t\). In a multiplicative intensity model it can, for example, be written \(Y(t)\alpha(t;\theta)\), where \(Y(t)\) is a predictable at-risk process and \(\alpha(t;\theta)\) is the event rate for those at risk. Predictability means that a process's value at time \(t\) is determined by information available immediately before \(t\). The result below applies to this setting and to other correctly specified predictable intensities.
From the Likelihood Score to the Martingale Form
Consider observation over a fixed interval \([0,\tau]\). Suppose the log-likelihood contribution that depends on \(\theta\) is \(\ell(\theta)=\int_0^\tau \log\{\lambda(t;\theta)\}\,dN(t)-\int_0^\tau \lambda(t;\theta)\,dt\). Terms not depending on \(\theta\) can be omitted. Assume the intensity is positive wherever events can occur and is differentiable in \(\theta\). Differentiating gives the score \(U(\theta)=\partial\ell(\theta)/\partial\theta\).
Since \(\partial_\theta\lambda=\lambda\,\partial_\theta\log\lambda\) wherever \(\lambda>0\), define \(g(t;\theta)=\partial_\theta\log\{\lambda(t;\theta)\}\). The score can then be written as follows.
This identity is algebraic: the event term is weighted by \(g\), and the time-at-risk term is the same weight multiplied by the intensity. At \(\theta=\theta_0\), the expression in braces is \(dM(t;\theta_0)\). Thus the score at the true parameter is a martingale transform.
The justification uses the defining mean-zero increment property of a martingale. For a predictable integrand, the stochastic integral against a martingale is itself a martingale when the required integrability conditions hold. Since \(M(0;\theta_0)=0\), the integral begins at zero and has mean zero at the fixed endpoint \(\tau\):
For a vector parameter \(\theta\), the same argument applies component by component. If \(\lambda\) is positive, the score vector is the integral of the vector \(\partial_\theta\log\lambda(t;\theta)\) against \(dN(t)-\lambda(t;\theta)\,dt\). Each component has mean zero at \(\theta_0\) under the corresponding integrability and predictability conditions.
Keep both the event contribution and the integrated intensity contribution; the latter is essential to the score identity.
Use \(\partial_\theta\lambda=\lambda\,\partial_\theta\log\lambda\) to write the score with the increment \(dN-\lambda\,dt\).
Only then does the fitted intensity provide the true compensator, making the increment a martingale increment.
The weight must be predictable and the stochastic integral must be integrable before its mean-zero property can be invoked.
Worked Examples
Worked Example: A Constant Event Rate
Suppose a hypothetical event process has constant rate \(\theta\) per person-year over a total of \(7.5\) person-years at risk, and \(3\) events are observed. Assume the intensity is correctly specified as \(\lambda(t;\theta)=Y(t)\theta\), with the observed risk exposure fixed and not dependent on \(\theta\). The log-likelihood, up to terms not involving \(\theta\), is \(\ell(\theta)=3\log\theta-7.5\theta\).
Differentiating gives \(U(\theta)=3/\theta-7.5\). At \(\theta=0.400\) events per person-year, \(U(0.400)=3/0.400-7.5=7.5-7.5=0\). The score is zero for this observed count at this rate. If units are tracked, its units are person-years per event (equivalently, years when event counts are treated as dimensionless), because a score differentiated with respect to a rate has reciprocal-rate units.
The martingale form is \(U(\theta)=\int_0^\tau (1/\theta)\{dN(t)-\theta Y(t)\,dt\}\). The weight \(1/\theta\) is predictable, and the finite exposure and finite event count make the integral integrable here. If \(0.400\) is the true rate, the score has expectation zero over repeated histories under this model. The zero calculated above is a feature of these particular observed data, not the meaning of the expectation statement.
Worked Example: A Time-Varying Covariate Effect
Consider a hypothetical model with intensity \(\lambda(t;\beta)=Y(t)\,0.2\exp\{\beta z(t)\}\) events per person-year. The covariate \(z(t)\) is predictable and equals either \(0\) or \(1\). Across the observed risk intervals, there are \(4\) person-years with \(z=1\) and \(1\) event, and \(3\) person-years with \(z=0\) and \(1\) event. Assume the baseline rate \(0.2\) is fixed, the model is correctly specified, and the observed intervals are covered by the stated risk exposures.
Only intervals with \(z=1\) contribute to the derivative with respect to \(\beta\), since \(\partial_\beta\log\lambda=z(t)\). The score is \(U(\beta)=\int z(t)\{dN(t)-0.2\exp(\beta z(t))Y(t)\,dt\}\). At \(\beta=\log 2\), the event contribution in the \(z=1\) intervals is \(1\), and the compensator contribution is \(0.2\times 2\times 4=1.6\). Therefore \(U(\log 2)=1-1.6=-0.600\).
The score is dimensionless because \(\beta\) and \(z\) are dimensionless; both the event count and the compensator count are measured in events. This observed score is negative, not zero. Under the model with \(\beta=\log 2\) as the true value, the expected score over repeated histories is zero, provided the predictable covariate and integrability conditions hold. The observed \(z=0\) interval contributes nothing because its weight \(\partial_\beta\log\lambda\) is zero.
Worked Example: A Shared Effect for Two Event Types
Suppose two competing event types have hypothetical cause-specific intensities \(\lambda_1(t;\beta)=Y(t)\,0.1\exp\{\beta x(t)\}\) and \(\lambda_2(t;\beta)=Y(t)\,0.3\exp\{-\beta x(t)\}\), measured in events per person-year. The covariate \(x(t)\) is predictable. In intervals with \(x=1\), there are \(2\) person-years at risk, one type 1 event, and no type 2 events. In intervals with \(x=0\), there is \(1\) person-year at risk and one type 2 event. Assume the two intensities correctly specify the event-type rates and the risk process is appropriately defined up to event or censoring.
The log-intensity derivatives are \(x(t)\) for type 1 and \(-x(t)\) for type 2. Thus the score at \(\beta=0\) is \(U(0)=\int x(t)\{dN_1(t)-\lambda_1(t;0)\,dt\}-\int x(t)\{dN_2(t)-\lambda_2(t;0)\,dt\}\). For \(x=1\), the type 1 contribution is \(1-(0.1)(2)=0.8\). The type 2 contribution, including its negative score weight, is \(-\{0-(0.3)(2)\}=0.6\). The \(x=0\) interval contributes zero. Hence \(U(0)=0.8+0.6=1.4\).
This dimensionless score is not expected to be zero for these particular data. At the true \(\beta=0\), its expectation is zero under the specified two-type intensities, since each compensated type-specific count is a martingale and the weights are predictable and integrable. In this example the calculation is a sum of two martingale integrals, one for each event type.
Conditions, Comparisons, and Failure Modes
The representation depends on more than differentiating a formula. In particular, the compensator must correspond to the data-generating conditional intensity at \(\theta_0\). If an intensity is misspecified, \(N(t)-\int_0^t\lambda(u;\theta_0)\,du\) need not be a martingale under the actual law, so the martingale argument for a mean-zero score does not follow. Predictability also matters: a weight chosen using information from an event at time \(t\) is not generally a valid pre-event martingale integrand.
The usual likelihood expression assumes that parameter-dependent contributions are represented in the intensity likelihood. If the initial-state distribution or observation mechanism has a parameter-dependent likelihood contribution, its score must also be included; the intensity integral alone is not then the full score. Similarly, if the model permits zero intensities or has parameter-dependent support, the log-intensity derivative may not exist everywhere. The displayed identity applies on the relevant positive-intensity support under regularity conditions that permit differentiation; boundary and support changes need separate treatment.
The direct score formula and the martingale form are equivalent ways to calculate the same quantity when the likelihood and assumptions above apply. The direct formula makes the event and exposure contributions explicit. The martingale form highlights the compensated-count structure and makes the mean-zero result available. Neither form says that each observed score vanishes. Nor does this representation, by itself, establish finite-sample normality or justify a particular variance estimate; those are separate inferential questions.
A practical check is to compare the event and compensator terms numerically and to verify that the proposed weight uses only information available just before each time. Also check that the intensity is evaluated at the parameter value being discussed. A score at an arbitrary trial value can be computed from the same algebra, but it is not generally an integral against the true martingale under the actual data-generating law.
Check Your Understanding
Answer each question, then compare with the solutions below.
- For a scalar intensity, what expression is integrated against the compensated count to represent the score?
- Why is predictability of the score weight required for the martingale argument?
- In a constant-rate model with \(2\) events and \(5\) person-years of exposure, calculate the score at \(\theta=0.5\) events per person-year, and state its units.
- Does a score of \(1.4\) in one observed competing-risks data set contradict the mean-zero result? Explain.
- Name one circumstance in which the intensity integral might not be the complete likelihood score.
Solutions. (1) The weight is \(g(t;\theta)=\partial_\theta\log\{\lambda(t;\theta)\}\), and the representation is \(U(\theta)=\int g(t;\theta)\{dN(t)-\lambda(t;\theta)\,dt\}\). (2) The martingale-integral mean-zero result requires the weight at time \(t\) to be determined by information available just before \(t\), rather than by the event increment being integrated. (3) \(U(\theta)=2/\theta-5\), so \(U(0.5)=2/0.5-5=4-5=-1\). Its units are person-years per event when \(\theta\) is measured in events per person-year. (4) No. The mean-zero statement concerns the expectation across histories under the correct model at the true parameter; an individual observed score need not be zero. (5) A parameter-dependent initial-state distribution or observation mechanism can contribute an additional likelihood score.