% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/svaEnmix_steps.R
\name{analyzeSvaEnmix}
\alias{analyzeSvaEnmix}
\title{Analyze surrogate variables against Sentrix chip and position factors}
\usage{
analyzeSvaEnmix(
  sva,
  RGSet,
  SentrixIDColumn = "Sentrix_ID",
  SentrixPositionColumn = "Sentrix_Position",
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_analyzeSvaEnmix.txt"
)
}
\arguments{
\item{sva}{Numeric matrix of surrogate variables with samples in rows.}

\item{RGSet}{An \code{RGChannelSet} aligned with \code{sva}.}

\item{SentrixIDColumn}{Character. Name of the chip identifier column in
\code{SummarizedExperiment::colData(RGSet)}.}

\item{SentrixPositionColumn}{Character. Name of the chip position column in
\code{SummarizedExperiment::colData(RGSet)}.}

\item{verbose}{Logical. If \code{TRUE}, emit progress messages with \code{message()}.}

\item{logs}{Logical. If \code{TRUE}, write the same messages to a log file.}

\item{log_dir}{Character or \code{NULL}. Directory used for the log file when
\code{logs = TRUE}.}

\item{log_file}{Character. File name used when \code{logs = TRUE}.}
}
\value{
A list with class \code{'dnaEPICO_svaEnmix_analysis'} containing the
aligned Sentrix factors, full and reduced linear models, and ANOVA tables.
}
\description{
Fit linear models for each surrogate variable against informative Sentrix
chip and position factors, perform backward elimination with
\code{stats::drop1()}, and return the in-memory analysis objects. A constant
technical factor is omitted; if both are constant, an intercept-only model
is retained.
}
\examples{
ex <- dnaEPICO:::exampleSvaAnalysisStateDnaEpico()
analysis_data <- analyzeSvaEnmix(
    sva = ex$sva,
    RGSet = ex$RGSet,
    SentrixIDColumn = "Sentrix_ID",
    SentrixPositionColumn = "Sentrix_Position",
    verbose = FALSE,
    logs = FALSE
)
analysis_data$K

}
