Related Experiment Video
Updated: Feb 8, 2026

Establishing a Competing Risk Regression Nomogram Model for Survival Data
Published on: October 23, 2020
Estimate risk difference and number needed to treat in survival analysis
Zhongheng Zhang1, Federico Ambrogi2, Alex F Bokov3
1Department of Emergency Medicine, Sir Run-Run Shaw Hospital, Zhejiang University School of Medicine, Hangzhou 310016, China.
Abstract:
The hazard ratio (HR) is a measure of instantaneous relative risk of an increase in one unit of the covariate of interest, which is widely reported in clinical researches involving time-to-event data. However, the measure fails to capture absolute risk reduction. Other measures such as number needed to treat (NNT) and risk difference (RD) provide another perspective on the effectiveness of an intervention, and can facilitate clinical decision making. The article aims to provide a step-by-step tutorial on how to compute RD and NNT in survival analysis with R. For simplicity, only one measure (RD or NNT) needs to be illustrated, because the other measure is a reverse of the illustrated one (NNT=1/RD). An artificial dataset is composed by using the survsim package. RD and NNT are estimated with Austin method after fitting a Cox-proportional hazard regression model. The confidence intervals can be estimated using bootstrap method. Alternatively, if the standard errors (SEs) of the survival probabilities of the treated and control group are given, confidence intervals can be estimated using algebraic calculations. The pseudo-value model provides another method to estimate RD and NNT. Details of R code and its output are shown and explained in the main text.
Related Concept Videos
Introduction To Survival Analysis
The primary goal of survival analysis is to estimate survival time—the time...
Comparing the Survival Analysis of Two or More Groups
Truncation in Survival Analysis
Left truncation occurs when individuals who experienced the event of interest before a certain time are not included in the study. This is often due to a "delayed entry" into the study where only those who survive until a certain entry point are...
Assumptions of Survival Analysis
Cancer Survival Analysis
Parametric Survival Analysis: Weibull and Exponential Methods
Weibull Distribution
The Weibull distribution is a flexible model used in parametric survival analysis. It can handle both increasing and decreasing hazard rates, depending on its shape parameter...

