Surv: Survival Objects

View source: R/Surv.R

SurvR Documentation

Survival Objects

Description

Wrapper for survival::Surv.

Usage

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

Arguments

time

see survival::Surv

time2

see survival::Surv

event

see survival::Surv

type

see survival::Surv

origin

see survival::Surv

Value

See ⁠[survival::Surv]⁠.

Surv in survival vs. in popEpi

popEpi::Surv is a wrapper for survival::Surv. Therefore you don't need to to do library("survival") when using Surv with e.g. survtab. Remember that if you do library("survival") after library("popEpi"), the Surv from survival is used instead of from popEpi (R throws a warning about this) when an expression such as Surv(my_times, my_events) is evaluated. You can avoid such conflicts by writing e.g. popEpi::Surv(my_times, my_events) instead. However, popEpi::Surv is designed in such a way that this should not become a problem and you should be able to use the two interchangeably.

See Also

Other main functions: rate(), relpois_ag(), relpois(), sirspline(), sir(), survmean(), survtab_ag(), survtab()

Other survtab functions: lines.survtab(), plot.survtab(), print.survtab(), summary.survtab(), survtab_ag(), survtab()

Other survmean functions: lines.survmean(), plot.survmean(), survmean()


popEpi documentation built on Aug. 23, 2023, 5:08 p.m.