Solution (source code)

= Solution

Use the right-continuous <Breslow estimator>, so the increase from the value at $x_{m-1}$ to the value at $x_m$ means the interval $(x_{m-1},x_m]$. There is no event between these consecutive exit times, and at $x_m$ the <risk set> contains only subject $m$. Hence
$$
\widehat H_0(x_m)-\widehat H_0(x_{m-1})
=\frac{v_m}{e^{\widehat\beta^Tz_m}},
$$
and the fitted individual <cumulative hazard> increases by
$$
\boxed{\widehat H_m(x_m)-\widehat H_m(x_{m-1})
=e^{\widehat\beta^Tz_m}\frac{v_m}{e^{\widehat\beta^Tz_m}}=v_m.}
$$
It is the subject's integrated hazard, rather than the reference baseline increment, that equals the event indicator.

For the final unheaded request, a fitted <martingale residual> at a subject's exit is
$$
\widehat M_i=v_i-e^{\widehat\beta^Tz_i}\widehat H_0(x_i).
$$
The revised observation leaves the last subject at risk until a later event time, still after every other subject has exited. Every earlier <risk set> is exactly the same as before, and the new final event again contributes the constant factor one. Thus part a gives unchanged coefficients, and every earlier <Breslow estimator> increment is unchanged. No additional events occur during the extended interval because all other subjects have already left observation.

For $i<m$, the event indicator and fitted <cumulative hazard> at $x_i$ remain unchanged, hence so does $\widehat M_i$. For the terminal subject, let $C$ denote its old fitted integrated hazard at its censored exit. That old residual is $-C$. Part b shows that the new final event adds one to its fitted integrated hazard, giving new residual
$$
\widehat M_m^{\rm new}=1-(C+1)=-C=\widehat M_m^{\rm old}.
$$
Therefore \b[all fitted <martingale residuals> remain unchanged]. Their invariance does not assert that the fitted <survivor function> at later times or the terminal event record is unchanged: the new late <baseline hazard> jump is real. This is the <terminal-observation invariance of Cox martingale residuals>, which relies on a unique final subject and unchanged covariate history.