tteep: Common time to event end-points calculator

View source: R/tteep.R

tteepR Documentation

Common time to event end-points calculator

Description

This function calculates common oncology time to event end-points (Overall Survival, Progression Free Survival, Time to Relapse).

Usage

tteep(
  start_date = NULL,
  prog_date = NULL,
  death_date = NULL,
  last_fup = NULL,
  ep = c("os", "pfs", "ttp"),
  sequential_check = TRUE,
  sequential_strict = TRUE,
  comprisk = TRUE
)

Arguments

start_date

Date: starting follow up date

prog_date

Date: progression date

death_date

Date: death date

last_fup

Date: last follow up date

ep

character: which end points to calculate, default to c("os","pfs","ttp")

sequential_check

check that date are sequential and warn otherwise

sequential_strict

set to missing all times (and corresponding statuses) that due to not sequential dates are negative

comprisk

return data suitable for competing events analysis as well

Details

Overall survival (OS) is computed as time from start_date to death_date. Time of patients who did not experienced the event (with missing death_date) is censored at the time of last follow up (last_fup).

Progression free survival (PFS) is calculated as time from start_date to prog_date or death_date, whichever comes first. Time of patients who did not experienced any event (missing both prog_date and death_date) is censored at the time of last follow up (last_fup).

Time to progression (TTP) is computed as time from start_date to prog_date. Time of patients who did not experienced the event (missing prog_date) is censored at the time of last follow up (last_fup) or death (death_date) whichever comes first.

Value

a data.frame to be used with cbind.

References

Guidance for Industry, Clinical Trial Endpoints for the approval of cancer drugs and biologics, FDA, May 2007

Examples

## Not run: 
db <- data.frame(start_date = as.Date(c("1900-01-01", "1900-01-01", "1900-01-01", "1900-01-01",          NA, "1900-01-01", "1900-04-01", NA)),
                 prog_date  = as.Date(c("1900-03-01", "1900-03-01",           NA,           NA,          NA,           NA, "1900-02-01", NA)),
                 death_date = as.Date(c("1900-06-01",           NA, "1900-06-01",           NA,          NA,           NA, "1900-06-01", NA)),
                 last_fup   = as.Date(c("1900-06-01", "1900-12-31", "1900-06-01", "1900-12-31", "1900-12-31",          NA, "1900-06-01", NA)))
db
with(db, tteep(start_date, prog_date, death_date, last_fup))

## End(Not run) 
db2 <- data.frame(start_date = c(0,  0,  0,  0, NA,  0, NA),
                  prog_date  = c(3,  3, NA, NA, NA, NA, NA),
                  death_date = c(6, NA,  6, NA, NA, NA, NA),
                  last_fup   = c(6, 12,  6, 12, 12, NA, NA))
with(db2, tteep(start_date, prog_date, death_date, last_fup))


lbraglia/lbsurv documentation built on June 19, 2022, 11:13 p.m.