Skip to contents

Computes event times and statuses from start, event, and review dates.

Usage

OR.survoutcome(
  startdate,
  eventdate,
  reviewdate,
  divisor = 365.2425/12,
  zero = FALSE
)

Arguments

startdate

Numeric vector of start dates.

eventdate

Numeric vector of event dates.

reviewdate

Numeric vector of latest follow-up dates.

divisor

Unit conversion factor for time. Default = 365.2425/12.

zero

Logical. If TRUE, survival times equal to zero are allowed. Default = FALSE.

Value

A data frame with columns:

time

Survival time.

status

Event indicator (1 = event, 0 = censored).

Cases with missing start dates, or with invalid survival times (≤ 0, or < 0 when zero = TRUE), are returned as NA in both columns.