Definition 1: The ratio of the observed number of failures (“deaths”) divided by the expected number of failures d/e (using the terminology from Log-Rank Test) is called the failure rate. For two survival distributions, the ratio of the failure rates is called the hazard ratio (aka the relative risk or risk ratio), i.e.
For Example 1 of Log-Rank Test, the failure rates of trials A and B are 12/9.828 = 1.221 and 8/10.172 = .786. Thus the hazard ratio h (of A to B) is 1.55. Since h > 1, the drug in trial B has a more favorable survival rate than the drug in trial A (in fact 55% more favorable).
A confidence interval for h can be calculated based on the fact that ln h is approximately normally distributed with standard error
This approximation is fairly good for values of h between 1/3 and 3.
For Example 1 of Log-Rank Test
Thus, we see that the 95% confidence interval for the hazard ratio in Example 1 of Log-Rank Test is (.646, 3.730), as shown in Figure 1 (with references to the cells in Figure 3 of Log-Rank Test).
Figure 1 – Confidence interval for hazard ratio
Hi Charles, Thank you for the amazing work you have done on the website. I was wondering if you could help me with a doubt about hazard ratios (HR). I have access to a publication reporting HR of death given exposure A obtained from Cox regression. These are reported by sex (males and females) and by age categories. What I would like to have is age and gender-specific HRs. Can the HR simply be multiplied to obtain the desired hazards?
Hi Rui,
I am not sure which HR’s you want to multiply, but the formula for HR is the first formula shown on this webpage. As long as what you want to do is consistent with this formula, you should be ok.
Charles
Hi Charles,
Thank you for your hard work with all these interesting topics. I have a question regarding the HR estimation. It turns out that the estimated HR from Logrank test is approximate, but not equal to the HR estimated directly from the Cox proportional hazards model, when only one covariate (the variable group) is included. I guess this is because the methodology for the HR estimation is different when comparing Logrank test and Cox model.
My question is how the standard errors of HR are calculated in the Cox model, and whether there is any advantage of calculating the HR from the Logrank test rather than obtaining this estimation directly from the Cox model.
Kind regards,
Wilson
Hello Wilson,
See the following webpage for how to calculate the standard errors of HR for the Cox model.
https://www.real-statistics.com/survival-analysis/cox-regression/cox-regression-using-newtons-method/
I don’t have anything to say about any advantage of calculating HR from the Logrank test instead of the Cox model.
Charles
Awesome! Thank you for your quick reply.
Best,
Wilson
Hi,
Could you maybe show me the entire excel document so I can calculate the HR myself?
Thank you!
See https://www.real-statistics.com/free-download/real-statistics-examples-workbook/
Charles
which one?
Sorry, but I don’t know what you are referring to.
Charles
that link contains a lot of examples. which one contains the example that this post covers?
Hello Tanvir,
Can you refresh my memory and point me in the right direction? What sort of information are you looking for?
Charles
The example 1 of log-rank test
https://www.real-statistics.com/survival-analysis/kaplan-meier-procedure/log-rank-test/
the figure 1,2,3 from that link and the figure 1 from this post are coming from the same excelsheet. What I am asking is that is this excel sheet available in any of your example excelsheets that you made available in the example workbooks in the download sections. Sorry for causing any confusion
Hello Tanvir,
You can find all these Excel sheets on the Regression 2 examples workbook (see Log-Rank and Log-Rank 1 tabs).
You can download the Regression 2 examples workbook from
https://www.real-statistics.com/free-download/real-statistics-examples-workbook/
Charles
Thanks Charles
Hi Charles,
Thank you for this excellent piece of work you have made.
I wanted to calculate Hazard Ratio for a clinical trial, which provides the total number of deaths in each arm and overall survival rate and p-value. Can you please help me.
Suhail
Hi Suhail,
Do you have a specific question? Is there some concept from the webpage that is not clear?
Charles
Like Joost and Edwin said, hazard ratio and relative risk are not exactly the same even though they are commonly used interchangeably. Hazard ratio is an instantaneous risk meaning the risk of failure at time t given that the subject has survived up to the beginning of the the time interval (or up to t-1) while relative risk is usually a cumulative risk during the entire follow-up time. Hazard ratio is similar to incidence density ratio (incidence rate ratio) in which the denominator for incidence density is person-time.
See additional notes here: https://en.wikipedia.org/wiki/Hazard_ratio
Daniel,
Thanks for your comment. I expect to update the survival portion of the website when I will update this webpage.
Charles
Hi there – this website is so helpful! Quick question, how did you come to 68% more favorable? I assume the numbers are rounded, but I can’t for the life of me get the same percentage.
Thank you for your time!
Megan,
Sorry for the confusion. I believe that the 68% was left over from an earlier example. The value should be 55%.
Thanks for identifying the error on the webpage.
Charles
Two questions:
1. is the hazard ratio same as risk ratio?
2. how to compute the expected number of death in each group?
Please be specific, Thanks!
Shijing,
1. Yes
2. Please see the webpage https://real-statistics.com/survival-analysis/kaplan-meier-procedure/kaplan-meier-overview/
Charles
1. I’m pretty sure it isn’t: the hazard is defined as f(t)/S(t). The ratio would be the ratio of the hazard of two groups. Where the risk ratio is calculated as the ratio of the chance of an event for both groups: F(t)/F(t). f(t) is the derivate of F(t), so its not quite the same. If you would describe the difference in words the difference would be that the hazard ratio is the chance of dying at time t given that the person has survived up to time t, where the risk ratio includes the chance of dying before. So the hazard ratio is more specific for time t. Also see http://data.princeton.edu/wws509/notes/c7.pdf
Joost,
Here is a reference to my use of the term hazard ration (see page 8).
https://ncss-wpengine.netdna-ssl.com/wp-content/themes/ncss/pdf/Procedures/NCSS/Kaplan-Meier_Curves-Logrank_Tests.pdf
Charles
The hazard ratio and risk ratio are indeed not the same. The hazard ratio takes into account the chance of an event up to time t, while the risk ratio doesn’t.
Edwin,
I have seen these two terms used interchangeably in many references. E.g.
https://books.google.it/books?isbn=1930513690
Charles