RM2NNT: Calculate the NNT based on the restricted mean survival times...

Description Usage Arguments Value References Examples

View source: R/NNTCalculation.R

Description

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.

Usage

1
RM2NNT(time, status, arm, tau = NULL, confint = 0.95, digits = 3)

Arguments

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 confint = 0.95.

digits

The decimal of the results. The default value is digits = 3.

Value

A matrix contains the RMST-NNT and its confidence interval.

References

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.

Examples

1
2
3
4
5
6
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)

nnt documentation built on April 22, 2020, 5:08 p.m.

Related to RM2NNT in nnt...