An object of class "Surv" which is used as a response in survival models.
Arguments
time
The follow-up time. For counting process data, this is the start time.
time2
The end time for counting process or interval-censored data. Optional for right-censored data.
event
The event indicator, normally 0=alive/censored, 1=dead/event occurred. Can also be a factor or logical.
type
Type of censoring. Options are "right", "left", "interval", "counting", "interval2", or "mstate".
origin
Starting point for time scale. Default is 0. Only used for type "counting".
Details
The Surv function creates an object of class "Surv", which is used to represent survival data. Depending on the arguments, the object can represent different types of censoring.
Right-censoring: one time and event indicator.
Left-censoring: similar to right-censoring but event=1 for censored.
Interval-censoring: requires both time and time2.
Counting process: both time and time2 used to specify start and stop times.
The resulting object is used as a response in survival regression models and estimation functions.
References
Therneau T (2024). A Package for Survival Analysis in R. R package version 3.7-0, https://CRAN.R-project.org/package=survival.