Title: | The Number Needed to Treat (NNT) for Survival Endpoint |
---|---|
Description: | Estimate the NNT using the proposed method in Yang and Yin's paper (2019) <doi:10.1371/journal.pone.0223301>, in which the NNT-RMST (number needed to treat based on the restricted mean survival time) is defined as the RMST (restricted mean survival time) in the control group divided by the difference in RMSTs between the treatment and control groups up to a chosen time t. |
Authors: | Zhao Yang |
Maintainer: | Zhao Yang <[email protected]> |
License: | GPL-3 |
Version: | 0.1.4 |
Built: | 2024-10-25 03:15:39 UTC |
Source: | https://github.com/cran/nnt |
For survival endpoints, the NNT-KM is computed as the reciprocal of the absolute risk reduction (ARR), which is the difference in Kaplan-Meier estimated survival rates or the difference in cumulative incidences at a time point of clinical interest between the treatment and control groups.
KM2NNT(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
KM2NNT(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
time |
The time to event or censor. |
status |
The indicator of the event or censor at the end of the follow-up. |
arm |
The variable indicates the treatment (arm = 1) and control (arm = 0) groups. |
tau |
The chosen time point of clinical interest. |
confint |
The percentile of confidence interval. The default value is
|
digits |
The decimal of the results. The default value is |
A matrix contains the KM-NNT and its confidence interval.
1. Altman DG, Andersen PK: Calculating the number needed to treat for trials where the outcome is time to an event. BMJ 319:1492-5, 1999
2. Altman DG: Confidence intervals for the number needed to treat. BMJ 317:1309-12, 1998
library(survival) dat <- pbc[!is.na(pbc$trt),] time <- dat$time/365.25 status <- (dat$status == 2) + 0 arm <- (dat$trt == 2) + 0 KM2NNT(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
library(survival) dat <- pbc[!is.na(pbc$trt),] time <- dat$time/365.25 status <- (dat$status == 2) + 0 arm <- (dat$trt == 2) + 0 KM2NNT(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
For survival endpoints, the NNT-RMST is defined as the RMST in
the control group divided by the difference in RMSTs between the treatment
and control groups up to a chosen time t
.
RM2NNT(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
RM2NNT(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
time |
The time to event or censor. |
status |
The indicator of the event or censor at the end of the follow-up. |
arm |
The variable indicates the treatment (arm = 1) and control (arm = 0) groups. |
tau |
The chosen time point of clinical interest. |
confint |
The percentile of confidence interval. The default value is
|
digits |
The decimal of the results. The default value is |
A matrix contains the RMST-NNT and its confidence interval.
1. An alternative approach for estimating the number needed to treat for survival endpoints. PLoS One. 2019 Oct 18;14(10):e0223301. doi: 10.1371/journal.pone.0223301.
library(survival) dat <- pbc[!is.na(pbc$trt),] time <- dat$time/365.25 status <- (dat$status == 2) + 0 arm <- (dat$trt == 2) + 0 RM2NNT(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
library(survival) dat <- pbc[!is.na(pbc$trt),] time <- dat$time/365.25 status <- (dat$status == 2) + 0 arm <- (dat$trt == 2) + 0 RM2NNT(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
For the NNT-RMST, the average life gain per patient is the area between the survival curves, which is the instrinsic treatment benefit in survival time during the t-period follow-up. For the NNT-KM, the average life gain per patient is defined as the ratio between the average survival time of one death in patients and the NNT-KM up to t.
RMvsKM(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
RMvsKM(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
time |
The time to event or censor. |
status |
The indicator of the event or censor at the end of the follow-up. |
arm |
The variable indicates the treatment (arm = 1) and control (arm = 0) groups. |
tau |
The chosen time point of clinical interest. |
confint |
The percentile of confidence interval. The default value is
|
digits |
The decimal of the results. The default value is |
A list contains:
RMSTNNT |
The RMST-NNT and its confidence interval. |
KMNNT |
The KM-NNT and its confidence interval. |
LifeGain |
The average life gain per patient based on the RMST-NNT and KM-NNT. |
1. An alternative approach for estimating the number needed to treat for survival endpoints. PLoS One. 2019 Oct 18;14(10):e0223301. doi: 10.1371/journal.pone.0223301.
library(survival) dat <- pbc[!is.na(pbc$trt),] time <- dat$time/365.25 status <- (dat$status == 2) + 0 arm <- (dat$trt == 2) + 0 RMvsKM(time, status, arm, tau = NULL, confint = 0.95, digits = 3)
library(survival) dat <- pbc[!is.na(pbc$trt),] time <- dat$time/365.25 status <- (dat$status == 2) + 0 arm <- (dat$trt == 2) + 0 RMvsKM(time, status, arm, tau = NULL, confint = 0.95, digits = 3)