Use the right-continuous Breslow estimator, so the increase from the value at to the value at means the interval . There is no event between these consecutive exit times, and at the risk set contains only subject . Hence
and the fitted individual cumulative hazard increases by
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
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 , the event indicator and fitted cumulative hazard at remain unchanged, hence so does . For the terminal subject, let denote its old fitted integrated hazard at its censored exit. That old residual is . Part b shows that the new final event adds one to its fitted integrated hazard, giving new residual
Therefore 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.
Use the usual semiparametric Cox proportional-hazards model with observed covariates :
The covariates are implicit in the question's regression fit, even though the displayed data notation only lists exit times and event indicators. Assume entry at a common origin, time-constant covariates, distinct observed times and independent censoring. Write and . Conditional on a single event at in its risk set, the chance that individual supplies it is
The baseline hazard cancels. Consequently estimate by maximizing Cox partial likelihood
For example, the score and information of Cox partial likelihood follow by differentiation. Define , and . Then
When a finite identifiable maximum exists, iterate until convergence. The Observed Fisher information also gives the usual asymptotic coefficient uncertainty. Censored subjects enter the relevant risk sets, even though they supply no numerator event factor.
After fitting , estimate the cumulative hazard of the reference subject by the Breslow estimator
Its jump at an event is the observed event count divided by the total fitted hazard multiplier at risk. The estimate is an integrated baseline hazard, with hazard represented by a measure placing these jumps at observed event times. If a smooth ordinary hazard function is wanted, smooth these increments with a chosen kernel and bandwidth; differentiating the step function as an ordinary function would incorrectly give zero away from the jumps. The fitted individual cumulative hazard is over that individual's follow-up. The invariances below concern this Cox partial likelihood fit and this Breslow estimator; they need not hold for a fully parametric proportional-hazards fit or an arbitrarily smoothed hazard estimator.
Use one row per consecutive at-risk episode, retaining a patient identifier for dependence and an episode number for event order. In calendar time, the intervals are ; status is one if the row ends in a headache and zero if it ends in censoring. Patient 001 contributes
PatientNext-event episodeStartStopEvent
0011024.810
001224.833.110
001333.140.210
001440.251.910
001551.960.000
The fifth episode is censored, not a fifth observed headache. All rows retain . This start-stop recurrent-event data layout corresponds to the counting-process intensity in survival analysis
where indicates that the patient is currently observed and eligible for a headache. Fit the regression coefficient by Cox partial likelihood using the resulting risk sets, and estimate the baseline cumulative hazard nonparametrically, for example by the Breslow estimator. Patient rows are portions of one history, not new independent patients.
Begin by defining the scientific target: prediction for a new patient, or estimation of adjusted covariate effects. Check event definitions, follow-up origins, right-censoring codes and any delayed entry. The analysis assumes independent patients and censoring that is noninformative conditional on modeled covariates. For fixed explanatory variables , the Cox proportional-hazards model is
with an unrestricted baseline hazard and coefficients constant over time. Report as the conditional hazard ratio for a one-unit change in the coded variable, not as a risk ratio or automatically a causal effect.
For untied event times, fit the coefficients by maximizing the Cox partial likelihood
The baseline cancels within each event risk set. Use an appropriate tied-event method, such as an Efron approximation or an exact method for a genuinely discrete event scale; the Breslow approximation for tied event times is another explicit approximation. Numerical score/information methods fit the model, and inverse information gives conventional covariance estimates for independent subjects. Report coefficient estimates, hazard ratios, uncertainty and the coding that makes their interpretation meaningful. After fitting, the Breslow estimator gives , from which provides predicted survival.
Adequacy is broader than significance of coefficients. Inspect influential observations, deviance residuals and data errors. Cox–Snell residuals should have approximately unit-exponential survival under a well-fitting model, retaining the original censoring indicators; a cumulative-hazard plot of these residuals should be near the 45-degree line. This is an overall diagnostic, not a substitute for the functional-form and proportionality checks below. For prediction, assess held-out discrimination and survival prediction calibration at prespecified time horizons with methods accounting for censoring. A high concordance index alone does not establish good calibration or correct hazard structure.
Use bootstrap or held-out cross-validation that repeats the complete modeling procedure, including imputation, variable selection and tuning. Validation of only the final fitted coefficients understates overfitting from earlier decisions. Report any substantive lack of fit rather than presenting a single time-independent hazard ratio when the data do not support that representation.
The ordinary Nelson–Aalen estimator adds at event time . Under a fitted proportional hazards model, replace the number at risk by the sum of fitted hazard multipliers:
This is the Breslow estimator of the integrated baseline hazard, using fitted regression coefficients obtained by maximizing the Cox partial likelihood. The denominator arises because the total event intensity is ; with every multiplier equal to one it reduces to the Nelson–Aalen estimator.
The estimator is right-continuous, so already includes the event at . Subtracting it leaves only the events at and , whose risk sets are and . Hence
There is no increment at the censoring time . If the lower endpoint had instead been , an additional would be present. The final singleton event can increase the baseline hazard estimate even though its partial likelihood contribution is one.
In the Cox proportional-hazards model, replace the number at risk in the Nelson–Aalen estimator by the sum of relative hazards:
The total event counting process has conditional rate , so the estimated baseline hazard increment is . Integrating gives the Breslow estimator
When , all relative hazards are 1 and this reduces to the Nelson–Aalen estimator. The denominator is positive at each observed event time.
Insert the Breslow estimator into the fitted cumulative intensities and interchange the finite sums:
Every observed event contributes exactly one after summing its fitted contribution over its risk set. Therefore
This identity is algebraic and holds for any finite coefficient used consistently in the relative hazards and the Breslow estimator; it does not require the score equation to be solved exactly. It can fail if the baseline hazard is estimated or smoothed by a different procedure.
In a proportional hazards model, individual has
The exponential term is the hazard multiplier relative to the baseline hazard . With unspecified, the Cox partial likelihood multiplies, over event times, the failing subject's multiplier divided by the sum of multipliers in the current risk set. After estimating , the Breslow estimator is
A Stratified Cox model uses a separate baseline hazard for each stratum but a common . Its partial likelihood is the product of within-stratum partial likelihoods, and a separate integrated baseline hazard is estimated in each stratum.
In a matched pair, the only informative comparison occurs while both members remain at risk. If the exposed member fails first, the pair contributes ; if the unexposed member fails first, it contributes . A censoring as the first recorded time gives no informative failure comparison, and any later one-person risk set contributes one. With only two observations per stratum, each stratum supplies almost no information about its arbitrary baseline hazard, so a useful common integrated baseline-hazard estimate is generally unavailable.
For the fitted Cox proportional-hazards model,
where is the fitted baseline cumulative hazard, usually obtained with the Breslow estimator.
In an untied Cox proportional-hazards model with a single subject remaining after all other observed exit times, that subject's event contributes the constant factor one to Cox partial likelihood. Replacing its terminal censoring time by a later event therefore preserves the fitted coefficients and every earlier Breslow estimator increment. At its new event, the subject's fitted cumulative hazard increases by one, cancelling the increase of one in its event indicator. Every martingale residual is unchanged. This property relies on the subject being alone in the terminal risk set and the same covariate history being retained.
Zero sum of Cox martingale residuals Created 2026-10-05 Updated 2026-10-14
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.