These are separate data, so results from the randomized trial must not be carried over. First inspect the construction of the survival response: a command creating a survival time object must pair follow-up in months with an event indicator, whose death/censoring coding should be checked explicitly. A censoring time is not an observed death time. Stratified product-limit fits would then summarize Kaplan–Meier estimators for the dose groups before adjusted regression.
If the fitted command is a Cox proportional-hazards model with dose, sex and age, its specification is
There is no separate intercept estimate because an intercept is absorbed into the unspecified baseline hazard . With the stated coding, compares high-dose with low-dose death hazards at equal sex and age; compares female with male hazards at equal dose and age; is the hazard multiplier for a one-year age increase. A negative treatment coefficient would correspond to a lower fitted hazard under high dose. A hazard ratio is not a ratio of survival probabilities, nor directly a ratio of survival times. Under this model the survivor function is .
The coefficient standard errors, Wald ratios and exponentiated confidence intervals should be read together. The common large-sample interval for a coefficient's hazard ratio is
Global likelihood-ratio, score and Wald tests assess the included slopes jointly; for exactly these three one-coefficient terms their reference degrees of freedom are three. They need not coincide in a small sample. The Cox partial likelihood uses the event risk sets; the fitted log-likelihood is not a full likelihood for an estimated baseline survival curve. The method for tied event times should be recorded.
Check the proportional hazards assumption using scaled Schoenfeld residuals and time trends; check the functional form of age, influential subjects and independent censoring. Dose-by-age or dose-by-sex interaction terms are scientifically possible but require enough information and a stated model comparison. Adjustment can alter a crude dose association, and the allocation mechanism here is not specified as randomized. No coefficients, confidence limits, significance results, exact fitted calls or diagnostics for this dataset are recoverable without the output sheet. The displayed model is an interpretation template, not a claim that it was the exact missing command.
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.
If both groups share the same survival function and the common fit is adequate, their complete Cox–Snell residuals have the same unit exponential distribution. Under independent censoring in each group, both groupwise Kaplan–Meier estimators should therefore be close to and to each other, subject to ordinary sampling variation and the number of subjects still at risk. Different censoring patterns can change precision without changing the residual survival target.
Both group curves should approximately follow the same unit-exponential survival curve.
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.
At a distinct event time , estimate the conditional probability of surviving that time by . Multiplication of these conditional survival probabilities gives the Kaplan–Meier estimator, and taking minus its logarithm gives an integrated hazard estimate:
The conditional failure count has a binomial likelihood whose maximizing event fraction is . Tied failures therefore enter directly as one count. Even ordering failures arbitrarily, with no intervening censoring, produces the same survivor function factor because
The failure-versus-censoring ordering convention still matters when both have the same recorded time. If , the survivor function becomes zero and the logarithmic integrated hazard is infinite.
At the last observed failure time , any individual still in the risk set must either fail there or be censored there or later. If there are no such censored observations, every remaining individual fails, so . Thus the final Kaplan–Meier estimator factor is zero, while the final Nelson–Aalen estimator jump is one:
There is no small-jump approximation at this endpoint. Without ties the final risk set has size one, so the same discrepancy follows from its last single failure.
The proposed hybrid recording rule updates the event times of students who leave but does not update the follow-up of those who remain. Thus the recorded end of observation depends on the subsequent outcome: this is outcome-dependent updating of survival follow-up.
In the four-student illustration, all four are known to be event-free at month six. Under the proposed coding, the three students without event reports are censored at month six, while the student whose event is subsequently reported remains in the risk set until month seven. The recorded risk set at that event therefore has size one, although the other three may still be studying. The Kaplan–Meier estimator factor would be and the Nelson–Aalen estimator jump would be . This creates an artificial complete loss of estimated survival at that event.
If event notification is complete through the common eight-month cutoff, the absence of a notification establishes that the other three have not had the event by that cutoff. They should remain in the risk set at month seven. With only these four subjects, the corresponding factors are instead and . Updating only failures while backdating nonfailures' censoring creates a severely biased risk set. If notifications are incomplete, absence of a report does not establish continued study; positive follow-up confirmation is then required.
A censoring observation means an event time is not observed exactly: the information supplies a bound or interval instead. Under right censoring, one observes and the event indicator ; if , one knows only . Left censoring gives an upper bound, while interval censoring locates the event between two observations.
Uninformative censoring means that, conditional on the covariates used in the analysis, the censoring mechanism supplies no additional information about the event time. Independence within those covariate strata is a sufficient formulation: subjects remaining in the observed risk set have the same future hazard as the corresponding event-free population. A fixed study cutoff unrelated to prognosis is an example of administrative censoring.
Informative censoring occurs when that condition fails. For example, students at high risk of leaving may also become harder to contact before their departure is formally recorded; censoring at loss of contact selectively removes high-risk students. Ordinary Kaplan–Meier estimator and Nelson–Aalen estimator calculations then use an unrepresentative risk set. The distinction determines whether ordinary survival estimates can be interpreted as population survival. Merely knowing that an observation is censored does not establish independence.
Use , a nonincreasing right-continuous survivor function. The empirical likelihood treats an exact event as a probability mass rather than maximizing an unrestricted probability density function at isolated data points. Under a noninformative observation mechanism, the event-time likelihood contributions are
The second, third and fourth rows account for right censoring, left censoring and interval censoring, respectively. A censoring mechanism with unknown dependence on cannot simply be dropped; these are the event-time factors under independent censoring or another ignorable mechanism.
There is a useful finite-dimensional reduction before optimization. Let be the set in which observation tells us its event time lies. Partition the time axis using all observed endpoints, keeping endpoint singletons when required. Within each cell, membership in every is constant. Assign cell masses , with , including a tail cell when necessary, and let be the cell-membership indicator. Then
Mass locations within a cell are not identifiable and need not be separate parameters. Repeated observation sets can be grouped and their factors raised to their counts. Cells with the same membership column can also be combined. If one column is componentwise dominated by another, transferring its mass to the dominating column weakly increases every factor; hence an unconstrained maximizing distribution can omit the dominated cell. This proves likelihood support reduction under censoring directly. The remaining log-likelihood is a concave function of the probability masses on a simplex, often far smaller than the original unrestricted distribution problem. Added constraints can restrict which transfers remain permissible.
For right censoring alone, take a grid of all distinct observation times and initially allow a discrete hazard
Let be the number of events at and the risk set immediately before that time. For tied recorded times, use the convention that events precede censoring, so those censored at remain in this risk set. The mass at is , and the probability of surviving past is . Substitution into the exact-event and right-censoring factors yields
The exponent counts all observed individuals whose information requires survival beyond that jump. In particular, censoring observations affect the risk set even though they give no event factor.
Each factor can now be maximized separately. For , its derivative is , giving ; the second derivative is negative. The same result holds at the boundaries: if , and if . The Kaplan–Meier estimator is therefore
Only event times contribute nontrivial factors. Residual mass after the last observation may be placed anywhere later without changing the empirical likelihood. A terminal plateau is therefore not evidence of permanent survival; the tail is unobserved.
For a constrained Kaplan–Meier estimator with , first split the support cells at . In the probability-mass representation the exact optimization problem is
The last sum excludes a singleton mass at , because . This is a concave maximization with linear equality constraints, so it directly gives a constrained nonparametric maximum-likelihood estimator. It also handles a time lying between observed events or beyond all follow-up.
An equivalent hazard formulation adds to the grid, permits zero-event jumps when needed, and imposes
For an interior solution using only positive-event jumps before , add to the log-likelihood. Differentiating gives
The multiplier is found by solving the scalar equation
with denominators and fitted hazards in their admissible ranges. On an admissible event-only interior branch, this product is increasing in , making a one-dimensional root search straightforward.
A constraint can require mass at a time with no observed event. The event-only multiplier equation must not be used blindly. To include boundary cases, put . Before , the constraint becomes , and each contribution is
For its multiplier equation again gives . For , its derivative is , so the maximum has when , and may have when . Such a jump supplies mass needed by the constraint; an unobserved tail with is included by the same rule. For example, if every observation is right-censored after and there are no events, the ordinary estimate has . To impose , put mass at and the remaining after all censoring times. The maximized likelihood is , although there are no event-time factors at all. The mass-constrained optimization above automatically accounts for this possibility and for any remaining tail nonuniqueness.
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.
Let be the distinct observed event times, with individuals at risk just before and events there. Parameterize the event-time distribution by the conditional failure probabilities . Under independent censoring, the survival part of the nonparametric likelihood groups into factors
An individual still under observation at contributes either a failure factor or a survival factor; later-censored individuals contribute the latter factors until censoring. Maximizing each factor independently gives , including the boundary solutions when or . Multiplying the conditional survival probabilities yields the Kaplan–Meier estimator
The notation here denotes the survivor function, as in the question. The estimator is constant between event times. Under the usual simultaneous-event convention, individuals censored at remain in its risk set while events are processed, and are then removed.
Define the individual background survivor function and common excess component by
Integrating the additive hazard function decomposition gives
The relative survivor function therefore compares actual survival with the survival expected from background mortality, and is common across individuals under this model. If , it is the survivor function of a hypothetical process having only the excess hazard. If excess mortality can be negative, the ratio may exceed one and lacks an ordinary survival-probability interpretation.
To estimate it, let indicate that individual is in the risk set, let , and let count all observed deaths. Assume appropriate independent censoring. The aggregate event intensity is
Consequently the background correction must use the current risk-set average
only on the observed range where . Dividing the event count by estimates the total hazard there. Subtracting the known average background gives the offset-adjusted cumulative hazard estimator
Here is the event count at and ; under an untied scheme . One possible estimate is .
A product-limit version retains the full event fraction, which is especially relevant when the excess mortality is not small. Estimate the relative-survival differential equation by
At an event time it multiplies the curve by . Between events it solves . Starting at one therefore gives the risk-set-adjusted relative survivor estimator
The Kaplan–Meier estimator factor accounts for observed all-cause mortality; the continuous multiplier corrects for known background mortality. The exponential cumulative-hazard version instead has event jumps ; it is close when event fractions are small but is not identical to this product-limit version.
Even if each background hazard is small, its accumulated contribution over long follow-up cannot simply be discarded. Nor should the excess contribution be linearized merely because the background is small. Using the known background integral inside the exponential avoids both errors. The average is over the evolving risk set: replacing it by an initial-cohort mean, or dividing by an arbitrary average of individual background survivor functions, is generally wrong when the background hazards differ. Censoring and deaths change which individuals contribute to the background correction.
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.
Use the Aalen–Johansen estimator of the cumulative incidence function, updating the overall Kaplan–Meier estimator for either event:
Right censoring changes subsequent risk sets, not the survival function by itself. Starting with the given estimates at , the complete calculation is
The middle event is of the competing type: it decreases overall survival while leaving the disease cumulative incidence function unchanged at that instant. The event-free intervals leave every estimate and risk set unchanged.
At the final time, both the event subject and the subject censored at that time are in the just-before risk set, so its denominator is eight. This is the usual event-before-censoring convention for recorded ties. After the event and right censoring, six subjects remain at risk. Consequently
The nine numbered source items are the inputs to this single calculation, not nine further questions.
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.
The Kaplan–Meier estimator is , with event count and risk set size . Its median is the first event time with estimated survival at most . Since and , the estimated median completion time is minutes.
The original last event exhausts the final risk set, so the fitted survival function drops to zero at and its conventional full area is finite. Integrate the right-continuous step function: its height is one before time one, and after each event the height is the newly computed survival value. There are three-minute gaps from to and from to . Thus
Using the exact risk-set products rather than rounded printed survival values gives . This is not the sample mean of the observed event-or-censoring times; right censoring changes the estimated survival weights.
If the final observation at is instead censored, every earlier Kaplan–Meier estimator value is unchanged and no event factor is inserted at . The median remains minutes, but the curve stays at at the end of follow-up. By terminal censoring and survival-mean identifiability, a full unrestricted mean is no longer determined nonparametrically by these observations. Extending the final positive step forever would give an infinite integral, but that plotting convention does not establish an infinite population mean. Extra assumptions about the unobserved tail would be needed for a finite full-mean estimate.
The restricted mean survival time through is still minutes in either version: the two curves differ only at or after the endpoint, which does not affect the area up to it. All these interpretations require independent censoring. Giving up may be related to how long a person would have taken to finish, so that assumption needs scientific justification in this study.