processSurvData {psichomics} | R Documentation

## Process survival data to calculate survival curves

### Description

Process survival data to calculate survival curves

### Usage

    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 patient
`clinical` | Data frame: clinical data
`survTime` | `survTime` object: Times to follow up, time start, time stop and event (optional)

### Details

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

If `survTime` is NULL, the survival times will be fetch from the clinical dataset according to the names given in `timeStart`, `timeStop`, `event` and `followup`. This can became quite slow when using the function in a for loop. If these variables are constant, consider running the function `getAttributesTime` to retrieve the time of such columns once and hand the result to the `survTime` argument of this function.

### Value

Data frame with terms needed to calculate survival curves

[Package psichomics version 1.8.2 Index]