Surv {bayesCureRateModel}R Documentation

Create a Survival Object

Description

Create a survival object for use in survival analysis, as imported from the survival package.

Usage

Surv(time, time2, event, type = c("right", "left", "interval", 
	"counting", "interval2", "mstate"), origin = 0)

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.

The resulting object is used as a response in survival regression models and estimation functions.

Value

An object of class "Surv" which is used as a response in survival models.

Note

The implementation in the bayesCureRateModel package only supports right-censored data. The binary censoring indicators are interpreted as a time-to-event (1) or as a censoring time (0).

References

Therneau T (2024). A Package for Survival Analysis in R. R package version 3.7-0, https://CRAN.R-project.org/package=survival.

See Also

cure_rate_MC3

Examples

# Right-censored survival data
Surv(5, 1)
Surv(c(5, 10), c(1, 0))

[Package bayesCureRateModel version 1.4 Index]