According to this wiki link, the hazard ratio relates to survival according to the following equation

$$ S_1(t)=S_0(t)^r \quad (1) $$

where $S$ is the survival and $r$ is the hazard ratio. So from the equation (1) above we can solve for the hazard ratio

$$ r=\frac{ln(S_1(t))}{ln(S_0(t))}=\frac{H_1(t)}{H_0(t)}=\frac{h_1(t)}{h_0(t)} $$

Where $h$, and $H$ is the hazard rate and cumulative function respectively.

Furthermore, according to the wiki the hazard ratio can be calculated with the odds probability formula

$$ HR=\frac{p}{1-p} \quad (2) $$

  1. Is $r$=$HR$? I don't understand the change in notation.

  2. The relation $S_1(t)=S_0(t)^r$ - is it valid only for Cox Proportional Hazard or is it a generalization for the vanilla survival analysis as well?

  3. How do I interpret $p$ in equation (2)? What is it? A simple example would help


1 Answer 1


$S(t|x_{1})=\exp(-\Lambda(t|x_{1}))$ where $\Lambda(t|x_{1})=\int_{0}^{t}\lambda(u|x_{1})du$, here $x_{1}=1$ for group 1 and $0$ if not. For a hazard function modlled as $\lambda(t|x_{1})=\lambda_{0}(t)\exp(\beta_{1}x_{1})$ the hazard ratio $r$ is defined as

\begin{align*} r &= \frac{\lambda(t|x_{1}=1)}{\lambda(t|x_{1}=0)}\\ &=\frac{\lambda_{0}(t)\exp(\beta_{1})}{\lambda_{0}(t)\exp(0)}\\ &=\frac{\exp(\beta_{1})}{1}\\ &=\exp(\beta_{1}) \end{align*}


\begin{align*} \Lambda(t|x_{1}=1)&=\int_{0}^{t}\lambda(u|x_{1}=1)du\\ &=\int_{0}^{t}\lambda_{0}(t)rdu\\ &=r\int_{0}^{t}\lambda(u|x_{1}=0)du\\ &=r\Lambda(t|x_{1}=0) \end{align*}


\begin{align*} S(t|x_{1}=1)&=\exp(-\Lambda(t|x_{1}=1))\\ &=\exp(-r\Lambda(t|x_{1}=0))\\ &=\frac{1}{r\exp(\Lambda(t|x_{1}=0))}\\ &=\left[\frac{1}{\exp(\Lambda(t|x_{1}=0))}\right]^{r}\\ &=\left[\exp(-\Lambda(t|x_{1}=0))\right]^{r}\\ &=\left[S(t|x_{1}=0)\right]^{r}\\ \end{align*}

So yes $r=HR$. The deriavation of $S(t|x_{1}=1)=\left[S(t|x_{1}=0)\right]^{r}$ above depedned on the defintion of the HR and the model form $\lambda(t|x_{1})=\lambda_{0}(t)\exp(\beta_{1}x_{1})$. Since no time-varying covariates are in the exponential term the HR is constant over time - i.e. proportional hazards since $\lambda(t|x_{1}=1)=r\lambda(t|x_{1}=0)$ shows hazard of $\lambda(t|x_{1}=1)$ is proportional to hazard of $\lambda(t|x_{1}=0)$ with time constant multiplicative factor $r=\exp(\beta_{1})$. Finally noting that $Pr[T>t|x_{1}]=S(t|x_{1})$

\begin{align*} Odds(x_{1}=1)&=\frac{Pr[T>t|x_{1}=1]}{1-Pr[T>t|x_{1}=0]}\\ &=\frac{S(t|x_{1}=1)}{1-S(t|x_{1}=1)}\\ &=\frac{\exp(-r\Lambda(t|x_{1}=0))}{1-\exp(-r\Lambda(t|x_{1}=0))}\\ &=\frac{1}{\exp(r\Lambda(t|x_{1}=0))-1}\\ &=\frac{2}{\exp(r\Lambda(t|x_{1}=0))} \end{align*}


\begin{align*} Odds(x_{1}=0)&=\frac{1}{\exp(\Lambda(t|x_{1}=0))-1}\\ &=\frac{2}{\exp(\Lambda(t|x_{1}=0))} \end{align*}


\begin{align*} \frac{Odds(x_{1}=1)}{Odds(x_{1}=0)}&=\frac{\exp(\Lambda(t|x_{1}=0))}{\exp(r\Lambda(t|x_{1}=0))}\\ &=\exp[\Lambda(t|x_{1}=0)(1-r)]\\ &=\exp[-\Lambda(t|x_{1}=0)(r-1)] \end{align*}

This implies

\begin{align*} r=\frac{\Lambda(t|x_{1}=0)-\log(OR)}{\Lambda(t|x_{1}=0)} \end{align*}

Edit: I am not so sure about $r=p/1-p$ for some $p$, since if $p$ is a probability this looks like an odds rather than an odds ratio (OR). The only thing I can think of is the following: assuming in the expression $\exp[-\Lambda(t|x_{1}=0)(r-1)]$ that $\Lambda(t|x_{1}=0)(r-1)$ is "small" then using $e^{x}\approx 1-x$ then $\exp[-\Lambda(t|x_{1}=0)(r-1)]\approx 1-\Lambda(t|x_{1}=0)(r-1)$ so that

\begin{align*} OR &\approx 1-\Lambda(t|x_{1}=0)(r-1)\\ \Longleftrightarrow & r = \frac{\Lambda(t|x_{1}=0)+1-OR}{\Lambda(t|x_{1}=0)} \end{align*}

We see the above is equal to $p/1-p$ for $p=\Lambda(t|x_{1}=0)+1$ if $OR=1$. Thus if $\Lambda(t|x_{1}=0)(r-1)$ is "small" and OR=1 then the HR is just the odds of an event for group 0.

  • $\begingroup$ Thank you so much! One small follow up - is there an easy way to calculate the cumulative hazard at $x_1=0$ $\endgroup$
    – Edv Beq
    Feb 15, 2019 at 17:04
  • $\begingroup$ The cumulative hazard at $x_{1}=0$ is $\Lambda(t|x_{1}=0)=\int_{0}^{t}\lambda_{0}(u)du$. Is this what you meant? $\endgroup$
    – dandar
    Feb 15, 2019 at 20:12
  • $\begingroup$ Yes - $\lambda_0$ is unknown isn't it? Is there a way to calculate that with odds ratios, or bayes rule, etc? $\endgroup$
    – Edv Beq
    Feb 15, 2019 at 20:15
  • $\begingroup$ The model used above is a Cox proportional Hazards model and uses partial likelihood (PL) to estimate the $\beta$ parameter, which essentially ignores the $\lambda_{0}(t)$ function since it does not affect inference about $\beta$. However I understand that the PL estimate $\hat{\beta}$ of $\beta$ is then used by "plugging " it in to $\lambda(t|x_{1})$ - i.e. $\hat{\lambda}(t|x_{1})=\lambda_{0}(t)\exp(\hat{\beta}_{1}x_{1})$ and in turn using $\hat{\lambda}(t|x_{1})$ to estimate $S(t|x_{1})$. Essentially I think this is a post-modelling estimation problem - i.e. you need not conduct this step. $\endgroup$
    – dandar
    Feb 16, 2019 at 0:48
  • $\begingroup$ The above is called model-based estimate of the baseline hazard function - non-model based estimators include the Breslow and Nelson-Aalen estimators. So for example non-model based estimators can construct estimated survival curves without fitting a Cox PH model - i.e. KM survival method. The model fitting should permit easy adjustment for covariates, just as in regression it is easier to adjust for covariates than non-regression methods. Finally if infererence about $\beta$ is all that is required then estimating $\lambda_{0}(t)$ is not needed - however survival curves are often desired $\endgroup$
    – dandar
    Feb 16, 2019 at 0:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.