I have 2 populations with their survival at n years and their 95% confidence interval.

Under the assumption of exponential distribution, the hazard ratio can be expressed as:

$HR_{AB} = \frac{log(S_A)}{log(S_B)} $

However, how to infer the confidence interval of the HR (or $log(HR)$) from these data?

If there is no analytical solution, could a bootstrap procedure be an alternative?

PS: this would be a very exploratory analysis, hence assumption on the distribution is not highly significant.

EDIT - Let's consider these notations:

  • $p_A [95\%CI :p_{A_{inf}} ; p_{A_{sup}}]$ and $p_B [95\%CI :p_{B_{inf}} ; p_{B_{sup}}]$at time $t$
  • measured on respectively $n_A$ and $n_B$ individuals
  • with $\Delta_A = p_{A_{sup}}-p_{A_{inf}}$ and $\Delta_B = p_{B_{sup}}-p_{B_{inf}}$

1 Answer 1


With an exponential distribution, $\log S_A(t)= -\lambda_A t$ and $\log S_B(t)=-\lambda_B t$. The hazard ratio ($\text{HR}$) you request is:

$$ \frac{\log S_A}{\log S_B} = \frac{\lambda_A}{\lambda_B},$$

and the $\log \text{HR}$ is:

$$ \log \text{HR} = \log \lambda_A - \log \lambda_B.$$

The confidence interval (CI) for the $\text{HR}$ is related to the variance of the its estimate. The formula for the variance of a difference gives:

$$\text{Var} (\log \text{HR }) = \text{Var}(\log \lambda_A) +\text{Var} (\log \lambda_B) - 2 \text{ Cov}(\log \lambda_A,\log \lambda_B). $$

If the estimates of $\lambda_A$ and $\lambda_B$ were obtained independently, then the last covariance term is zero so all you need are the variances of the individual $\lambda$ estimates.

What you have are survival probabilities $p_A$ and $p_B$ and their 95% CI at some time $t$. A survival probability $p$ is reached at $t= -\frac{\log p}{\lambda}$, $\lambda = - \frac{\log p}{t}$ or $$\log \lambda = \log(-\log p) - \log t.$$

Thus $\text{Var}(\log \lambda) = \text{Var}(\log(-\log p))$.

That result suggests converting the CI on the survival probabilities $p$ to CI on $\log(-\log p)$ to get estimates for the CI of the individual $\lambda$ estimates. If those latter CI estimates are sufficiently symmetrical about the point estimates, you can then use a normal approximation, dividing the half-widths of the 95% CI by 1.96 to estimate the standard deviations of the $\lambda$ estimates and then squaring to get their estimated variances. Adding those variances, taking the square root, and multiplying by 1.96 then give estimated CI half-widths for $\log \text{HR}$.

  • $\begingroup$ great, perfect answer as usual! $\endgroup$ Commented May 29, 2021 at 18:39
  • $\begingroup$ Just a little question: when you say "dividing the half-widths of the 95% CI by 1.96", are your referring to $p_{A_{inf}}$ or to $log(-log(p_{A_{inf}}))$? $\endgroup$ Commented May 31, 2021 at 9:41
  • $\begingroup$ Also, shouldn't the formula take $n_A$ and $n_B$ into account? $\endgroup$ Commented May 31, 2021 at 15:49
  • $\begingroup$ @DanChaltiel $n_a$ and $n_b$ are implicitly taken into account in the original CI. More cases, narrower CI. The way I formulated the answer, I was referring to half-widths on the $\log (-\log p)$ scale, as the variance on that scale is what's most directly related to the variance of $\log \text{HR}$. $\endgroup$
    – EdM
    Commented May 31, 2021 at 16:00

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.