survival_preprocess: Pre-process event data for survival analysis

View source: R/survival_analysis.R

survival_preprocessR Documentation

Pre-process event data for survival analysis

Description

Use when survival data is not in time and event format e.g., TCGA clinical data.

Usage

survival_preprocess(
  event_data,
  event_time_name = "days_to_death",
  follow_up_time_name = "days_to_last_followup",
  event_field_name = "vital_status",
  event_name = "Dead",
  event_time_cutoff = Inf,
  event_time_lower_cutoff = 0
)

Arguments

event_data

A data.frame that contains survival times, event data and covariates.

event_time_name

Name of the column that contains time to event.

follow_up_time_name

Name of the column that contains time to end of followup for a censored data point.

event_field_name

Name of the column that contains event indicators.

event_name

Event column value that corresponds to the event of interest.

event_time_cutoff

Upper cutoff value for time.

event_time_lower_cutoff

Lower cutoff value for time.

Value

data.frame with "time" and "event" columns added to input


vittoriofortino84/COPS documentation built on Jan. 28, 2025, 3:16 p.m.