survival_time: Calculate survival fraction at given timepoints

View source: R/survival_time.R

survival_timeR Documentation

Calculate survival fraction at given timepoints

Description

This function calculates x-months survival grouped by an optional stratification argument.

Usage

survival_time(data, time, status, var = NULL, times)

Arguments

data

data.frame or data.table containing survival data.

time

The time interval from start of observation until date of event (e.g. disease progression or death) or censoring.

status

Variable specifying if event occured or data has been censored. Default behaviour inherited from the surv_fit function in the survival package, with 0 indicating censored data and 1 indicating event.

var

Variable tested for Influence on outcome.

times

Time in months for which survival should be calculated.


MBender1992/emR documentation built on Feb. 18, 2025, 9:21 a.m.