= Solution
In the <martingale residual>
$$
y_i=v_i-e^{\widehat\beta z_i}\widehat H_0(x_i),
$$
$v_i$ is the observed event count up to the end of the individual's follow-up: 1 for a recorded event and 0 for <right censoring>. The second term is the fitted <counting-process compensator>, obtained by integrating that individual's fitted <hazard function> while they remain at risk:
$$
\int_0^{x_i}e^{\widehat\beta z_i}\,d\widehat H_0(u)
=e^{\widehat\beta z_i}\widehat H_0(x_i).
$$
Thus \b[the residual is observed events minus the fitted cumulative event intensity over follow-up]. The fitted intensity is not an event probability and can exceed 1. Positive values indicate more events than predicted over that observed exposure; negative values indicate fewer. A <right-censored> individual has a nonpositive residual. With true model parameters and <independent censoring>, the underlying observed-minus-compensator process is a <martingale>; fitted terminal residuals are not independent identically distributed errors.
Back to article page