KM2NNT: Calculate the NNT based on the Kaplan-Meier estimated...

Description Usage Arguments Value References Examples

View source: R/NNTCalculation.R

Description

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.

Usage

1
KM2NNT(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 KM-NNT and its confidence interval.

References

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

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
KM2NNT(time, status, arm, tau = NULL, confint = 0.95, digits = 3)

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

Related to KM2NNT in nnt...