% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/batch_surv.R
\name{batch_surv}
\alias{batch_surv}
\title{Batch Survival Analysis}
\usage{
batch_surv(
  pdata,
  variable,
  time = "time",
  status = "status",
  best_cutoff = FALSE
)
}
\arguments{
\item{pdata}{Data frame containing survival time, event status, and predictor variables.}

\item{variable}{Character vector specifying the names of predictor variables to analyze.}

\item{time}{Character string specifying the column name containing follow-up time.
Default is `"time"`.}

\item{status}{Character string specifying the column name containing event status
(1 = event occurred, 0 = censored). Default is `"status"`.}

\item{best_cutoff}{Logical indicating whether to compute optimal cutoffs for
continuous variables and analyze dichotomized versions. Default is `FALSE`.}
}
\value{
Data frame containing hazard ratios (HR), 95% confidence intervals (CI),
  and p-values for each variable, sorted by p-value.
}
\description{
Performs Cox proportional hazards regression analysis on multiple variables.
Optionally determines optimal cutoffs to dichotomize continuous predictors before
modeling. Returns hazard ratios, confidence intervals, and p-values for each variable.
}
\examples{
# Create small example data
set.seed(123)
test_data <- data.frame(
  OS_time = runif(100, 0, 100),
  OS_status = sample(c(0, 1), 100, replace = TRUE),
  Signature1 = rnorm(100),
  Signature2 = rnorm(100)
)
batch_surv(
  pdata = test_data,
  variable = c("Signature1", "Signature2"),
  time = "OS_time",
  status = "OS_status"
)
}
\author{
Dongqiang Zeng
}
