kmEventTables: Creates a event table from a survival model. Return a table...

Description Usage Arguments Value Examples

View source: R/tte_tables.R

Description

Creates a event table from a survival model. Return a table with cumulative number of events, the number at risk, and the survival probability with confidence interval.

Usage

1
2
3
4
kmEventTables(
  fit,
  times = round(seq(min(fit$time), ceiling(max(fit$time)), length.out = 10))
)

Arguments

fit

output from survival::survfit

times

Optional vector of times to show in the table. By default will include equally spaced times from the minimum event time to the maximum event time with 10 time points.

Value

kable output of the KM event table from survfit fit at time points times

Examples

1
2
3
library(survival)
fit <- survfit(Surv(time, status) ~ sex, data=survival::lung)
subpat::kmEventTables(fit)

Novartis/subpat documentation built on April 11, 2020, 3:11 p.m.