batch_surv: batch_surv - Batch Survival Analysis Function

View source: R/batch_surv.R

batch_survR Documentation

batch_surv - Batch Survival Analysis Function

Description

This function is used to perform batch survival analysis. It calculates hazard ratios and confidence intervals for the specified variables based on the given data containing time-related information.

Usage

batch_surv(
  pdata,
  variable,
  time = "time",
  status = "status",
  best_cutoff = FALSE
)

Arguments

pdata

The data frame containing the data.

variable

The variables to perform survival analysis on.

time

The column name representing time. Default is "time".

status

The column name representing status. Default is "status".

best_cutoff

Whether to use the best cutoff for survival analysis. Default is FALSE. If set to TRUE, the function will calculate hazard ratios and confidence intervals for the binary version of the variables using the best cutoff method.

Value

A data frame containing hazard ratios and confidence intervals.

Author(s)

Dongqiang Zeng

Examples


# Loading TCGA-STAD microenvironment signature data
data("sig_stad", package = "IOBR")
# Identifying signatures associated with gastric cancer patient survival
batch_surv(pdata = sig_stad, variable = colnames(sig_stad)[69:ncol(sig_stad)], time = "OS_time", status = "OS_status")

IOBR/IOBR documentation built on April 4, 2024, 1:07 a.m.