Cox–Snell residual 2026-10-06
A Cox–Snell residual is the fitted cumulative hazard function evaluated at an observed event or censoring time. Under a correct model, complete transformed event times are unit exponential; censored transformed times retain their event indicators. A logarithmic Kaplan–Meier estimator survivor plot should be close to a line of slope minus one.
Cumulative hazard probability transformation Created 2026-10-06 Updated 2026-10-14
For a proper continuous event time and invertible cumulative hazard function , the survivor function identity gives .
Write for the survival function; this is the function denoted in the survival notation. For a proper continuous event-time distribution with hazard function , its cumulative hazard function is . The probability integral transform makes uniform on , including when has flat intervals: those intervals have zero event probability. Consequently
Thus the cumulative hazard probability transformation gives . No strict monotonicity of is needed on intervals that carry no event mass. The usual proper continuous survival law is essential; an atom of subjects who never fail would instead require separate treatment of the mass at infinity.
Under independent censoring, order the distinct observed failure times as . Let be the size of the risk set just before , and let be the number of failures there. The estimated conditional probability of surviving that event time is . Multiplying these conditional survival probabilities gives the Kaplan–Meier estimator
A censored observation leaves the risk set after its censoring time but does not create a downward survival jump. With tied failure and censoring times, the displayed risk-set convention includes those censored at the time while processing failures, then removes them.
Since , the Kaplan–Meier estimator of the cumulative hazard function is
This is not exactly the Nelson–Aalen estimator , although the two are close when the individual fractions are small. If a jump exhausts the risk set, becomes zero and becomes infinite; transformed residuals beyond that point require a finite-tail modelling convention or restriction of follow-up.
Let be the distinct group survival functions, and let denote the common pooled cumulative hazard function used for the residuals. At a point where its inverse is defined, residual survival in group is
Thus the group residual curves generally differ. On intervals where , the same common increasing transformation gives : the better-surviving group has more large residual failure times. If the original survival curves cross, the residual curves can also cross, so no fixed ordering or proportional hazards assumption is implied.
Distinct group distributions generally produce distinct residual survival curves, even when the pooled residual curve looks exponential. Separate correctly fitted group hazards would restore the unit-exponential target within each group, but that is a different transformation from the common fit under discussion.
The transformed values are Cox–Snell residuals. Under a correct common survival function and a good fitted cumulative hazard function, the complete transformed failure times should have unit exponential distribution. Transform the observed times and retain their original censoring indicators, then estimate residual survival with a Kaplan–Meier estimator. Its target is
so a plot of its logarithm against should lie approximately on a line of slope . Censored residuals must not be treated as fully observed failure times.
There is a useful caution for this particular common nonparametric fit. The shared-fit Cox–Snell residuals reproduce the fitted survival curve property means that the pooled residual plot is largely built into the transformation. With event ordering and compatible tie processing preserved, at a transformed failure time its residual Kaplan–Meier estimator equals . Finite steps, coalesced censoring times and estimation uncertainty still matter, and an infinite final residual arises if the fitted survivor becomes zero. Separate group plots are more informative about a common-distribution assumption than this pooled fit alone.
For the population identity, write , , and . Assume independent censoring, with . Then
while the Tonelli theorem and the cumulative hazard function give
This is mean accumulated hazard under independent censoring, proving . For the fitted martingale residual ,
Hence its expectation is approximately zero when the fitted hazard error at the observed time is small in mean. This spells out the required sense of a good estimate; pointwise consistency alone does not control a divergent tail. In particular, a Kaplan–Meier estimator with zero final survival gives infinite transformed times there and cannot supply finite residuals without a tail restriction. Neither exact finite-sample zero mean nor validity under informative censoring is being assumed.
To check an omitted explanatory variable , plot the martingale residuals against or compare groupwise mean residuals, using a smooth trend or appropriate uncertainty intervals. Under a correct conditional survival model and conditionally independent censoring, should be approximately zero. A systematic positive trend indicates more observed failures than the fitted accumulated hazard predicts; a negative trend indicates fewer. Such patterns suggest adding , a nonlinear term or an interaction and reassessing the fit. The bounded-above, often long negative tail of martingale residuals means that the diagnostic is a mean-pattern check, not a requirement for symmetric Gaussian residuals.
For a continuous nonnegative event time with hazard function , the cumulative hazard function is
Its derivative is the instantaneous hazard wherever the derivative exists.
Insert and into the survival likelihood. Each individual's log contribution simplifies to
Therefore
Failures contribute a log hazard function term as well as exposure, whereas both failures and censored subjects contribute the negative cumulative hazard function over their observed follow-up.
Use the standard right censoring setup with everyone entering observation at time zero. At each observed time , the pre-exit risk set has size . The Nelson–Aalen estimator of the cumulative hazard function is
Censoring removes an individual from later risk sets but contributes no event increment.
Exchange the two finite sums:
Each event increment appears in exactly as many subjects' fitted cumulative hazards as there were subjects at risk for that increment. This proves the event-count identity for Nelson–Aalen cumulative hazards. Common entry is relevant: with delayed entry, a subject does not accumulate the increments before entering, so an entry-time subtraction would be needed.
One method for ties is to group observations at each distinct recorded time. If events occur at , use the pre-time risk set size including observations censored at that same recorded time, and take one jump . This is the usual events-before-censoring convention within a recorded tie. Since ,
Thus the grouped Nelson–Aalen event-count identity preserves the required identity at the recorded observation times. It is a sum over individuals, not an unweighted sum over distinct times.
A second method, suitable when ties reflect rounded times, is to break ties by small perturbations or an artificial ordering, then apply the untied estimator. The event-count identity holds on that new, untied time grid. It does not generally persist if all estimates are mapped back to the original common time. For example, two tied failures among two individuals give a grouped jump , so the original-time sum is . Sequentially breaking the failures gives jumps and , whose total is ; assigning the completed jump to both original tied observations gives sum . On the perturbed grid the two values are and , whose sum is again . This distinction states exactly what the second method does and does not preserve.
Another common grouped survival approach is the Kaplan–Meier estimator, from which one may estimate cumulative hazard by . Its jump is , not , and it likewise does not have the Nelson–Aalen event-count identity. In particular it becomes infinite at a time when all remaining individuals fail.
A frailty model uses an unobserved nonnegative random hazard multiplier to represent variation in individual risk. In a proportional frailty model, conditional on the cumulative hazard function is , giving survivor . Averaging over the frailty random variable by the law of total probability yields
the Laplace transform of the frailty distribution evaluated at the baseline integrated hazard. This also applies to atoms by integration against the probability measure; the printed Dirac expression is not an ordinary continuous density.
In the given two-atom case, the Dirac delta function notation assigns probabilities and to and . These have mean one, fixing the frailty scale relative to the baseline hazard. With , the two conditional integrated hazards are and . Therefore
The frailty distribution among survivors shifts toward the smaller multiplier over time, reproducing the declining population hazard and limit one without changing either individual's constant conditional hazard.
For a proper continuous event time, the survival function is . The assumed invertibility of the cumulative hazard function gives, for ,
Therefore
This is the cumulative hazard probability transformation; it applies also conditionally on a subject's covariates, using that subject's correctly specified cumulative hazard function.
The fitted transformed times are Cox–Snell residuals. They retain their event/right censoring indicators, so a right-censored residual represents an exponential observation known only to exceed its displayed value. Under the fitted model and independent right censoring, calculate the Kaplan–Meier estimator of residual survival and compare it with , or calculate the residual Nelson–Aalen estimator and compare its cumulative hazard with the diagonal . Systematic departures reveal model inadequacy; sparse extreme residual risk sets and parameter estimation require caution. Treating all censored residuals as observed event times would invalidate this diagnostic.
Without right censoring, the residual mean should be approximately one. With right censoring, use the modified Cox–Snell residual
For a true unit-rate exponential distribution, the memoryless property gives . Thus an event keeps its known transformed time, while a censored observation is replaced by the conditional expected event time. Under independent right censoring, iterated expectation makes the mean of these adjusted values one when the true hazards are used, and approximately one when fitted hazards are used. These mean-imputed values do not themselves have an exponential distribution, so the survival-curve diagnostic should still use the original censored residual dataset. Moreover fitting equations can force the adjusted sample mean to one, making its mean alone a weak diagnostic.
For the proposed mixture of a finite right censoring time and no right censoring, and
Consequently
When right censoring has positive probability this choice is unique; if , no correction is needed and any has the same effect. Its independence from is the content of exponential memorylessness: the expected extra lifetime after any right censoring time is one. Conditioning on an arbitrary independent right censoring time proves the same correction beyond this special two-point mixture.
Synchronous radius and its limits. Kepler's third law for a circumplanetary orbit gives
Here is the gravitational constant. A planet-synchronous orbit repeats after one spin period. A planet-stationary orbit additionally requires a circular orbit, zero orbital inclination to the equator and prograde motion. Then an antenna fixed on the ground points continuously at the same satellite; merely matching the orbital period does not give this property.
Write the planetary radius as . Requiring the semi-major axis to exceed gives . The stellar tidal force restricts the circumplanetary orbit to the Hill sphere, of radius . Thus
These are the surface and Hill-radius constraints in the idealized spherical, small- model. Long-term prograde stability generally requires a radius appreciably inside the Hill sphere; for nonzero orbital eccentricity, the surface constraint applies to the periapsis, not just to the semi-major axis.
Collision time and the launch population. A phase-mixed isotropic swarm occupies a shell of radial scale . Its number density scales as , its relative speed as , and its geometric collision cross-section as . Consequently the total collision rate scales as . To give the numerical normalization used here, adopt an effective shell volume . At a fixed position the velocity directions are uniformly distributed in the tangent plane, so their mean relative speed is . For an unordered pair, the collision cross-section is , giving
Thus the mean interval between collisions is in this large-population kinetic model. The effective shell width fixes an order-one coefficient: small orbital eccentricity and random planes alone do not specify a unique radial probability density. Phase mixing, negligible gravitational focusing, , and uncorrelated encounters are implicit in this estimate. Exactly identical orbital periods with perfectly fixed phases do not themselves produce a memoryless collision process.
For nearly planet-stationary orbits with , the swarm volume is smaller by a factor of order , while the relative speed is smaller by the same factor, since vertical motion of scale dominates the eccentric motion. The two changes cancel in the rate : there is no parametric factor in the collision time within the same phase-mixed kinetic approximation. Numerical factors and phase correlations can differ. This is not an argument that bringing all satellites into one nearly circular plane makes their phases random.
With , an Inhomogeneous Poisson process has cumulative hazard function
The survival function of the first collision is . Setting the expected number of collisions to one gives
This is a characteristic first-event population, with probability of an earlier event. It is not a median: the median has an additional factor .
Which population collides next? Immediately after the first disruption let and . The latter follows from mass conservation for equal-density spherical pieces. Using the same unordered-pair counting and geometric collision cross-sections as above, define ; then
Here stand for the usual large-population approximations to . The factor two distinguishing identical and different species is essential. The probability that the next collision is fragment–fragment is
It is the most likely type if and . It has probability greater than one half if
For , a strongly fragment-dominated next event therefore requires ; the fragment–satellite comparison is more restrictive than the satellite–satellite comparison. If , the next event must be fragment–fragment, provided fragments remain.
Population equations and the normalization discrepancy. Every satellite–satellite event produces fragments and destroys two satellites. Every satellite–fragment event produces a net fragments and destroys one satellite; every fragment–fragment event destroys two fragments. Consistent collision counting therefore gives
For , and . The last two terms in are then twice those in the printed equation. This is a genuine factor-of-two inconsistency: equal-size fragment pairs have a collision cross-section smaller by , so their event rate must be if the satellite event rate is ; destroying both fragments necessarily gives the sink .
If the printed equation is taken as a prescribed approximate rate model instead, its implicit event rates are , and . Under precisely that mixed normalization, its corresponding satellite equation is
The printed source term also neglects the consumed fragment in a satellite–fragment event, a legitimate relative approximation. That approximation does not repair the pair-counting discrepancy.
The ensuing cascade. This is a two-size fragmentation cascade. First use the printed approximate model, dropping satellite–satellite events as requested. Put , , and take . Then
Integrating this linear differential equation, with and , gives
Initially the collisional cascade grows if , with approximate early exponential growth time when the satellite population is nearly fixed. The fragment population reaches its maximum at
Afterwards satellites are depleted and fragment–fragment losses dominate. For the continuum solution has , , with
When no satellites remain initially, directly. Small integer populations eventually invalidate these deterministic differential equations.
The consistently counted model has, to leading order in , exactly the same curve and peak, but both retained time derivatives are twice as large. Its growth time is , and . Keeping and the consumed fragment replaces by and in the curve by . This explicitly separates the physical collision bookkeeping from the printed normalization while giving the evolution under both conventions.
For a continuous positive survival time, and the hazard function is wherever . Therefore
Since , integrating gives the cumulative hazard function identity
At an endpoint where survival reaches zero, the corresponding cumulative hazard is interpreted as and the exponential as zero.
The command cox.zph checks the proportional hazards assumption test through time dependence of scaled Schoenfeld residuals. Under constant coefficients, their expected trend against transformed event time should be flat. A significant covariate-specific test would suggest that its coefficient varies with time; the global test checks the coefficients jointly.
The p-values are for age, for gender and for group, with global . Thus these tests find no evidence against proportional hazards. They do not prove the assumption, establish the correct age functional form, or test the censoring mechanism.
The separate diagnostic plot targets the broader fitted survival distribution. The code evaluates a fitted cumulative hazard function at each observed time and multiplies by the subject's fitted hazard multiplier, forming Cox–Snell residuals:
The curve returned without newdata by survfit is a reference-profile curve, not necessarily the all-zero-covariate baseline. The multiplier must use the same centering as that reference curve; the fitted linear predictors use the model's reference convention. With this consistency, times the multiplier is the fitted subject-specific cumulative hazard.
Part (a) shows why complete transformed event times should be approximately unit exponential if the Cox proportional-hazards model is correct. The Q–Q plot compares ordered fitted residuals with an independent random exponential sample. Most points are near the diagonal, with some upper-tail departures, so it gives no obvious indication of a gross distributional failure. A random reference sample adds simulation noise, and estimated parameters and tied recorded times prevent this from being an exact distribution-free test.
Importantly, four observed times are censored. Their transformed times retain the censoring indicators and are not complete exponential observations. Simply plotting all residuals as uncensored therefore gives only a rough visual check. A more appropriate Cox–Snell residual survival diagnostic fits a Kaplan–Meier estimator or Nelson–Aalen estimator to , retains the censoring flags, and checks whether the estimated cumulative hazard is close to , equivalently whether estimated survival is close to . Taken together, the supplied checks are broadly compatible with the fitted model, while none resolves potentially informative censoring from giving up.
For a continuous proper event time with cumulative hazard function and survivor function , use the assumed inverse of . For ,
Therefore the integrated-hazard transformation is unit exponential:
This cumulative hazard probability transformation is the basis for the following survival-model residual diagnostics.
For a nonnegative continuous event time , the survivor function is , and its probability density function is
The hazard function is the instantaneous event rate conditional on being event-free at that time:
If the event is certain to occur in finite time, the density is proper: , so . Since and , the cumulative hazard function is . Therefore a certain eventual event requires unbounded integrated hazard:
If the lifetime has a finite upper endpoint, the same divergence occurs as that endpoint is approached, and is interpreted as infinite beyond it.
For administrative censoring with uniform entry, let entry time . Then has the uniform distribution on , where , , and . Its density and survivor function are
Dividing density by survival and integrating gives the censoring hazard and integrated hazard:
The hazard function is undefined once no uncensored individuals remain. As , it diverges like and the cumulative hazard function diverges logarithmically. This reflects the certainty of administrative censoring by the longest possible follow-up time, not dependence of censoring on the event process.
Let and be the total observed counting process and size of the risk set. When the individual cumulative hazard functions are all , summing the conditional intensity equations gives
Replace the expected increment by its observed value and divide by the predictable risk set size. Thus the Nelson–Aalen estimator in integral form is
with the integrand defined as zero when . This is an integral against the step counting process, so each event time contributes its event count divided by the risk set just before that time. The Nelson–Aalen estimator estimates integrated hazard over times with observable risk; it does not supply information after observation has ended.