processSurvData: Process survival data to calculate survival curves

Description Usage Arguments Details Value

View source: R/analysis.R

Description

Process survival data to calculate survival curves

Usage

1
2
3
4
5
6
7
8
9
processSurvData(
  event,
  timeStart,
  timeStop,
  followup,
  group,
  clinical,
  survTime = NULL
)

Arguments

event

Character: name of column containing time of the event of interest

timeStart

Character: name of column containing starting time of the interval or follow up time

timeStop

Character: name of column containing ending time of the interval (only relevant for interval censoring)

followup

Character: name of column containing follow up time

group

Character: group relative to each subject

clinical

Data frame: clinical data

survTime

survTime object: Times to follow up, time start, time stop and event (optional)

Details

The event time is only used to determine whether the event has occurred (1) or not (0) in case of missing values.

If survTime = NULL, survival times are obtained from the clinical dataset according to the names given in timeStart, timeStop, event and followup. This may become quite slow when used in a loop. If the aforementioned variables are constant, consider running getAttributesTime() outside the loop and using its output via the survTime argument of this function (see Examples).

Value

Data frame with terms needed to calculate survival curves


psichomics documentation built on Nov. 8, 2020, 5:44 p.m.