survival.table: Survival table

Description Usage Arguments Value

View source: R/survival.table.R

Description

This function creates a table/dataset with number of events/N, 95% median (months) survival CI, 95% survival rate CI (eg. 12-month PFS rate), and 95% HR CI.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
survival.table(
  data,
  stat,
  time,
  label = "Rate",
  arm = "arm",
  ref = as.character(levels(data2$arm)[1]),
  rate_span = c(12),
  time_level = "month",
  rate_label = "PFS",
  one.sided = FALSE
)

Arguments

data

A dataset containing columns necessary for survival analysis.

stat

Survival event variable

time

Survival time variable, currently only supports months

label

Label for survival variable

arm

Arm variable

ref

Option to specify the reference arm. Must be entered how it is in the data.

rate_span

Vector of time levels desired for survival rate. Used in conjunction with time_level.

time_level

Time level desired. Currently supports "months" and "years".

rate_label

Label for survival rate in the table (eg. rate_label = "PFS" gives "12-month PFS rate).

one.sided

Logical. If TRUE returns one-sided p-values. Default is FALSE

Value

This function returns a nicely formatted table of survival analysis statistics.


sjacobson94/clinicaltrials documentation built on Oct. 27, 2020, 6:43 p.m.