A likelihood-based analogue of the coefficient of determination compares the fitted and intercept-only log-likelihoods and :
For a Cox proportional-hazards model, these are maximized partial likelihood logarithms with and without the covariates. The expression measures improvement in fit, rather than the fraction of variation in event times explained. Its attainable maximum can be below one. It does not test the proportional hazards assumption or establish predictive calibration.
Since the observed times are ordered, the final risk set is . Its Cox partial likelihood factor is therefore
for either value of the last event indicator. Every earlier risk set and earlier event factor is unaffected by changing . Thus the entire partial likelihood as a function of is unchanged, not merely its value at one fitted coefficient. Its maximizing set, its score function and its Observed Fisher information are identical. In particular, any consistently chosen finite fitted is unchanged. The lone terminal event conveys no relative-hazard information because there is no other individual with whom to compare it.
Converting size to a regression factor allows two unrestricted contrasts rather than imposing a linear trend on numerical size codes. The command relevel with a numeric second argument selects the second existing factor level as its reference level. For sorted codes this is medium, coded . However, the displayed coefficient labels size1 and size3 instead correspond to codes with code as reference. The printed coding and coefficient labels are inconsistent. The actual factor levels and labels must be checked. Under the intended medium-size reference, the two reported contrasts compare small and large businesses with medium ones; with literal coding their printed names would be size0 and size2.
Using B's delayed-entry survival object, the Cox proportional-hazards model is
Here is the unspecified baseline hazard for a medium-size village business and is the Cambridge indicator. The fitted hazard ratios are conditional on the other covariates and constant over business age under the proportional hazards assumption. The function fits regression coefficients through partial likelihood; its survival object must actually be B's version, rather than A's earlier object with the same name.
The location coefficient , with standard error , gives and a two-sided Wald test p-value about . Its reported hazard ratio is , with 95% confidence interval . At the same age and size, a Cambridge business therefore has an estimated closure hazard about 55.2% lower than a village business. The reciprocal ratio is . A hazard ratio is not a survival-probability ratio or a proportional increase in lifetime.
The intended small-versus-medium contrast is , with standard error , and p-value . Its hazard ratio is , with 95% confidence interval . The intended large-versus-medium contrast is , with standard error , and p-value ; its hazard ratio is , with interval . Neither size contrast provides convincing evidence of an effect. The wide intervals also show why these results do not establish equality of size-specific hazards.
The sample has businesses. The likelihood-ratio test, Wald test and score test jointly test all three coefficients being zero; their statistics are , and on three degrees of freedom, with p-values , and . None rejects at 5%. This is compatible with the significant one-coefficient location test: testing a specified one-dimensional contrast and testing three coefficients together are different questions. The location result offers some adjusted evidence, but the joint output does not demonstrate a strong overall improvement, and interpretation should acknowledge the uncertainty and the number of comparisons.
The reported is a Cox–Snell likelihood pseudo-R-squared, here . It measures likelihood improvement rather than a literal fraction of variance in lifetimes explained. Its attainable maximum is reported as . It does not validate the proportional hazards assumption or establish useful predictive performance. Adjusted survival predictions would require estimating the baseline survival function as well: . The coefficient summary alone does not supply adjusted five- or ten-year survival probabilities.
Before reporting results, check the size coding discrepancy, the precise sampling dates and the survival records. The stated January 2000–December 2005 span is six calendar years, despite being called five years. Check nonnegative ages, entry no later than exit, correctly recorded closure indicators and the same opening-based clock throughout. Establish whether inclusion and censoring are plausibly independent of lifetime given the covariates, and whether different opening cohorts or calendar environments can reasonably share the fitted lifetime model. Simply including delayed entry does not cure informative selection, omitted confounders or dependence between businesses.
Assess proportional hazards using Schoenfeld residuals against time and a proportional hazards assumption test, supplemented by groupwise log-minus-log survival plots. Investigate influential observations with coefficient-deletion diagnostics and deviance residuals, and inspect overall fit using Cox–Snell residuals. Consider a city-by-size interaction or time-varying effects if supported by the available events, rather than relying on the displayed three main effects. Finally, report the uncertainty and declining late risk sets—only six remain at the final listed event—and distinguish a conditional association from a causal explanation or a prediction for all future businesses.
Write the Cox proportional-hazards model as , where is the hazard multiplier and is the unspecified baseline hazard. At an untied event time , let be the risk set immediately before the event and its failing individual. With independent censoring conditional on the covariates, the conditional probability that individual supplies the next event, given an event at that time and the risk set, is obtained by dividing its instantaneous event rate by the aggregate rate:
More precisely this is the limit of the conditional probability for one event in a short interval; simultaneous events have smaller-order probability in the continuous model. Multiplication of these successive conditional contributions gives the Cox partial likelihood
Censored individuals remain in each risk set until their censoring time but supply no numerator. Conditioning removes the baseline hazard; this is a partial likelihood for , rather than a complete likelihood for event and censoring times.
Ties require an observation model or an approximation. Suppose a recorded tie hides the order of continuous events, with no intervening entry or censoring. Put for the tied event set and . An exact marginal contribution for the coarsened ranks is the sum of the ordinary rank contributions over every possible order:
For example, if fail together while remains at risk, the two possible orders give
The risk set is depleted after the first of the two events. This expression concerns the missing event order; it is not the full likelihood of an interval in which the events occurred.
Convenient alternatives are the Breslow approximation for tied event times and the Efron approximation for tied event times:
The first keeps the initial denominator at every event; the second removes an average share of the tied-event multipliers successively. In the example their denominators are and . These conventional partial-likelihood factors omit multiplicities independent of , which do not affect its estimate; they should not be mistaken for normalized probabilities of the unordered event set.
For genuinely discrete event times there is another exact construction. If individual event odds are proportional to , conditioning on exactly events gives the exact tied-set conditional likelihood
For the same three individuals this is . It is not generally equal to the continuous-time rank sum: the assumptions differ.
Large tie groups make naive summation over orders or subsets impractical. Recursion helps with the subset denominator, and Breslow or Efron avoids exhaustive enumeration. However, extensive ties can also indicate that time is measured too coarsely for an exact continuous-time ordering to be a useful target.
For example, if patients are assessed only at annual visits, use one row per patient-year still at risk and model the probability of an event in that interval. A grouped proportional-hazards model follows directly by integrating the hazard over the interval, with covariates constant there:
Fit the resulting person-period likelihood, with Bernoulli distributions for the interval event indicators and interval-specific intercepts. Many events in the same year are then ordinary observations rather than a combinatorial ordering problem. This requires a compatible interval-observation scheme and appropriate independent censoring; it avoids pretending that unobserved within-year event times are known.
For the distinct observed event times , let and let be the risk set immediately before that event. The Cox partial likelihood is
The different risk sets already incorporate each event and any intervening censoring. Differentiating this log-likelihood gives
Therefore a finite interior maximum-likelihood estimate from the Cox partial likelihood satisfies the first-order condition
Moreover
Each summand is the conditional event-covariate variance, so the partial likelihood is log-concave. If some informative risk set has unequal covariates, the curvature is strictly negative and an existing finite root is the unique maximizer.
The finite-interior qualification is necessary. With two at-risk subjects having covariates zero and one, suppose the subject with covariate one is the sole observed event and the other is subsequently censored. Then increases strictly and has its supremum only as ; the score has no finite zero. If every event risk set has identical covariates, the coefficient is instead unidentifiable and the score is identically zero. The displayed fitted-score equation applies to the regular case in which the proportional-hazards estimate is finite.
A proportional hazards model assigns individual the hazard function , where is the baseline hazard for multiplier one and is a time-constant hazard multiplier. In a Cox proportional-hazards model, for a covariate vector and coefficient vector ; ratios are constant whenever the baseline is nonzero.
Assume independent individuals, independent censoring conditional on the covariates, and no tied events. Immediately before an event at , condition on its observed risk set and one event in a small time interval. The individual event probability is , while the total is . Their limiting ratio is . Multiplication over observed events gives the Cox partial likelihood
The unspecified baseline hazard cancels. This is the usual successive conditional event contribution defining the partial likelihood, not the full event-time likelihood conditioned simultaneously on all event times.
For the four individuals the successive event risk sets are , and . Individual leaves at its right censoring time and contributes no event numerator. Consequently
The last event contributes one and carries no further relative-risk information.
Because , the three possible complete event orders are , , and . Write and . Their partial likelihoods, with the final singleton factor omitted, are respectively
Adding first and gives , and therefore
Thus
This is Cox rank-likelihood deletion consistency: summing out the unobserved position of leaves the relative order information in the observed events. It is an algebraic marginalization of complete-order probabilities under time-constant hazard multipliers. It does not include the probability density function of the actual censoring time, establish the distribution of given all observed times, or justify informative censoring. Ignoring the censoring mechanism in the survival analysis still requires independent censoring given the modeled covariates.
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.
Within the risk set , the Cox proportional-hazards model makes the conditional failure probabilities proportional to . Thus
The score function sums observed minus expected covariates at event times. At a finite interior maximum of the Cox partial likelihood,
The balance holds in aggregate, not separately at every event. The log partial likelihood is concave because
When there is informative covariate variation in the risk sets, this gives a unique finite solution if it exists. A completely separated event pattern can instead have its maximum only as ; the question's finite implicitly excludes that case.
Fit the Cox proportional-hazards model with the other explanatory variables, initially omitting the variable whose form is being assessed, and plot the resulting martingale residuals against . Add a smooth trend, for example using a cubic spline or a local smoother. A systematic pattern indicates that affects the hazard function; the shape helps suggest a linear term, a transformation, or a nonlinear spline term in the log hazard.
Refit with the proposed form and inspect martingale residuals against again. Under an adequate functional form, their conditional mean should have no systematic trend, allowing for model fitting and the other covariates. Compare plausible alternative forms using the partial likelihood and suitable model checks.
Use the smoothed pattern to assess the covariate's functional form, rather than treating these residuals as normal regression errors. Martingale residuals are asymmetric, bounded above by 1, and can be arbitrarily negative; the raw residual plot can therefore be misleading without smoothing. This diagnostic concerns the covariate form, and does not by itself test the proportional hazards assumption.
Let
and let be the common partial likelihood contribution from the first observations. Since , the three possible complete-data tail orderings and their partial likelihoods are
Their sum is
When individual is right-censored at , that individual leaves the risk set before the event at , so the directly calculated Cox partial likelihood is also . Summing over the unobserved compatible event orderings therefore reproduces the censored-data partial likelihood.
A semiparametric proportional hazards model specifies
with finite-dimensional parameter but an unspecified baseline hazard . A partial likelihood uses a component of the data likelihood that depends on while eliminating the nuisance function. In the Cox proportional-hazards model, conditioning on which member of each risk set experiences the event produces the Cox partial likelihood.