# How exactly can the Cox-model ignore exact times?

The Cox model does not depend on the times itself, instead it only needs an ordering of the events. How come it doesn't need the time, as all of the models I've seen so far are dependent on the exact time point and/or interval?

• Your question seems to end mid sentence. Did you lose part of it? – Glen_b -Reinstate Monica Apr 15 '14 at 20:13

Intuitively, the (estimated) model parameters are hazard ratios. They're constant across time. So for any arbitrary "average" hazard function (of time), hazard ratios are all you need to describe the difference in risk between groups. The "intercept" from a Cox model is a baseline hazard function, or a time-varying hazard function for individuals having 0 values for all parameters.

As is the case in semi-parametric inference, we like to use nifty tricks to avoid estimating such complicated functions as a baseline hazard. The partial likelihood is a ratio of hazards among those who fail and those who live on at each failure time: (individuals in the "risk set"). If you write out the math, you'll see that the baseline hazard function cancels out and so you get partial likelihood contributions that do not vary as a function of time.

The one wrinkle about information regarding times is the specification of the risk set: this is why only the ordering of event times matters... this is what compelled Cox to call it a partial likelihood and not a conditional likelihood. When you think of the interpretation of the $p$-value, you consider the event times as given, but permutations of which individuals fail when is the only contribution to "randomness" in the sample.

The partial likelihood behaves much like a regular likelihood and can be maximized to obtain estimates of time-invariant hazard ratios.

The Cox model itself depends on time. Indeed, the Cox model is written (using standard notations) $$h(t) = h_0(t) \exp(x^\prime \beta)$$ Time-dependency is captured by the baseline hazard function $h_0(\cdot)$. Typical for the Cox model is that $h_0(\cdot)$ is left unspecified.

Based on a sample of survival data $$z=\big\{(y_j, \delta_j, x_j) \, \big|\, j = 1, \dotsc, N\big\}$$ where $y_j$ is the minimum between the actual event time and the censoring time, $\delta_j$ is the event indicator ($\delta_j = 1$ if the observation corresponds to an event, and $\delta_j = 0$ if the observation is right-censored), and $x_j$ is the covariate vector, the survival likelihood is of form $$L(h_0(\cdot), \beta;\, z) = \prod_{j=1}^N \big( h_0(y_j) \exp(x_j^\prime \beta) \big)^{\delta_j} \exp \big\{ -H_0(y_j) \exp(x_j^\prime \beta) \big\}$$ with $H_0(\cdot)$ the cumulative hazard function.

As we can see, the survival likelihood depends on the survival times (the $y_j$'s).

As the survival likelihood involves the (unspecified) baseline hazard, it cannot be used for inference in the Cox model. Instead, the Cox model is fitted based on a partial likelihood given by $$L_p(\beta;\, z) = \prod_{j=1}^N \left( \frac{\exp(x_j^\prime \beta)}{\sum_{\ell \in R(y_j)} \exp(x_\ell^\prime \beta)} \right)^{\delta_j}$$ with $R(y_j)$ the risk set at time $y_j$ containing all subjects still under observation just prior to $y_j$, i.e. $$R(y_j) = \big\{ \ell \,\big|\, y_\ell \geq y_j \big\}$$

As we can see, the partial likelihood depends on the survival times only through the risk set.

Now, if we change the survival times but keep the ranking identical, then this won't modify the risk sets. In other words, "the Cox model does not depend on the times itself, instead it only needs an ordering of the events."