% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sig_roc.R
\name{sig_roc}
\alias{sig_roc}
\title{Plot ROC Curves and Compare Them}
\usage{
sig_roc(
  data,
  response,
  variables,
  fig.path = NULL,
  main = NULL,
  file.name = NULL,
  palette = "jama",
  cols = NULL,
  alpha = 1,
  compare = FALSE,
  smooth = TRUE,
  compare_method = "bootstrap",
  boot.n = 100
)
}
\arguments{
\item{data}{Data frame containing the predictor variables and binary outcome.}

\item{response}{Character. Name of the binary outcome variable in `data`.}

\item{variables}{Character vector. Names of predictor variables for ROC curves.}

\item{fig.path}{Character or `NULL`. Directory path to save output PDF.
Default is `NULL`.}

\item{main}{Character or `NULL`. Main title for the ROC plot. Default is `NULL`.}

\item{file.name}{Character or `NULL`. Output PDF filename without extension.
Default is `"0-ROC of multiple variables"`.}

\item{palette}{Character. Color palette for ROC curves. Default is `"jama"`.}

\item{cols}{Character vector or `NULL`. Custom colors for ROC curves.
Default is `NULL`.}

\item{alpha}{Numeric. Transparency level (1 = opaque, 0 = transparent).
Default is `1`.}

\item{compare}{Logical. Whether to perform statistical comparison of AUCs.
Default is `FALSE`.}

\item{smooth}{Logical. Whether to smooth ROC curves. Default is `TRUE`.}

\item{compare_method}{Character. Method for comparing ROC curves.
Default is `"bootstrap"`.}

\item{boot.n}{Integer. Number of bootstrap replications. Default is `100`.}
}
\value{
A list containing:
\describe{
  \item{auc.out}{Data frame with AUC values and confidence intervals}
  \item{legend.name}{Vector of legend entries for the plot}
  \item{p.out}{If `compare = TRUE`, data frame with p-values from comparisons}
}
}
\description{
Generates Receiver Operating Characteristic (ROC) curves for multiple
predictors and optionally performs statistical comparisons between them.
}
\examples{
set.seed(123)
test_data <- data.frame(
  OS_status = sample(c(0, 1), 20, replace = TRUE),
  Marker1 = rnorm(20),
  Marker2 = rnorm(20)
)
result <- sig_roc(data = test_data, response = "OS_status",
                  variables = c("Marker1", "Marker2"),
                  smooth = FALSE)
if (!is.null(result)) print(result$auc.out)
}
\author{
Dongqiang Zeng
}
