Skip to contents

A function to calculate the time from start of survival to time of progression, AKA progression free survival time. Progression free survival is generally defined as the the time from start of survival to progression OR death from any cause, with censoring of subjects who are lost to follow-up.

Usage

time_pfs(start, progression, stop, units = "weeks")

Arguments

start

A date vector. The start of survival time.

progression

A date vector. The date of progression with NA for those who did not progress.

stop

A date vector. The time of last follow-up (time of death or last follow-up time).

units

A character string of "seconds", "minutes", "hours", "days", "weeks", "months", "years".

Value

numeric vector

Examples

#----------------------------------------------------------------------------
# time_pfs() examples.
#----------------------------------------------------------------------------
library(bkmisc)