Zero sum of Cox martingale residuals (source code)

= Zero sum of Cox martingale residuals

When a <Cox proportional-hazards model> uses the <Breslow estimator>, the sum of fitted <martingale residuals> is zero. Each estimated <baseline hazard> jump redistributes one observed event across its <risk set>, so summing cumulative fitted intensities equals summing observed event counts. The identity holds for any finite regression coefficient used consistently in both calculations.