% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/batch_pcc.R
\name{batch_pcc}
\alias{batch_pcc}
\title{Batch Calculation of Partial Correlation Coefficients}
\usage{
batch_pcc(
  input,
  interferenceid,
  target,
  features,
  method = c("pearson", "spearman", "kendall")
)
}
\arguments{
\item{input}{Data frame containing feature variables, target variable, and
interference variable.}

\item{interferenceid}{Character string specifying the column name of the
interference (confounding) variable to control for.}

\item{target}{Character string specifying the column name of the target
variable.}

\item{features}{Character vector specifying the column names of feature
variables to correlate with the target.}

\item{method}{Character string specifying the correlation method. Options are
`"pearson"`, `"spearman"`, or `"kendall"`. Default is `"pearson"`.}
}
\value{
Tibble containing the following columns for each feature:
\describe{
  \item{sig_names}{Feature name}
  \item{p.value}{Raw p-value}
  \item{statistic}{Partial correlation coefficient}
  \item{p.adj}{Adjusted p-value (Benjamini-Hochberg method)}
  \item{log10pvalue}{Negative log10-transformed p-value}
  \item{stars}{Significance stars: **** p.adj<0.0001, *** p.adj<0.001,
    ** p.adj<0.01, * p.adj<0.05, + p.adj<0.5}
}
}
\description{
Computes partial correlation coefficients between multiple features and a
target variable while controlling for an interference (confounding) variable.
Adjusts p-values for multiple testing using the Benjamini-Hochberg method.
}
\examples{
# Create small example data
set.seed(123)
test_data <- data.frame(
  TumorPurity = runif(100),
  TargetVar = rnorm(100),
  Signature1 = rnorm(100),
  Signature2 = rnorm(100)
)
# Calculate partial correlations controlling for tumor purity
res <- batch_pcc(
  input = test_data,
  interferenceid = "TumorPurity",
  target = "TargetVar",
  method = "pearson",
  features = c("Signature1", "Signature2")
)
head(res)
}
\author{
Rongfang Shen
}
