% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methylationLME_steps.R
\name{summarizeMethylationLMEModels}
\alias{summarizeMethylationLMEModels}
\title{Summarize CpG-wise mixed-effects model fits for longitudinal analyses}
\usage{
summarizeMethylationLMEModels(
  modelResults,
  preparedData,
  summaryPval = NA,
  excludeSingular = FALSE,
  excludeNonConverged = FALSE,
  nCores = 1L,
  chunkSize = NULL,
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_methylationLME.txt"
)
}
\arguments{
\item{modelResults}{Object returned by \code{fitMethylationLMEModels()}.}

\item{preparedData}{Object returned by \code{prepareMethylationLMEData()}.}

\item{summaryPval}{Numeric or \code{NA}. Optional p-value filter applied to the
returned summary tables. \code{NA} keeps all rows.}

\item{excludeSingular}{Logical. If \code{TRUE}, retain singular CpG rows and
reasons but set their inferential p-values to \code{NA}.}

\item{excludeNonConverged}{Logical. If \code{TRUE}, retain non-converged CpG rows
and reasons but set their inferential p-values to \code{NA}.}

\item{nCores}{Integer. Number of worker processes to use while extracting
summary rows.}

\item{chunkSize}{Integer or \code{NULL}. Number of CpGs processed per parallel
chunk. \code{NULL} chooses a value automatically.}

\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_methylationLME_summaries'}
containing the optionally filtered summary tables in \code{summaries} and the
complete CpG-level tables in \code{diagnosticSummaries}. Diagnostics,
annotation, and report output use the complete tables so \code{summaryPval}
does not remove CpGs from those outputs. \code{fitDiagnostics} retains the
phenotype-specific fit status, lme4 singular-fit flag, and warning text for
every attempted CpG.
}
\description{
Extract phenotype-specific fixed-effect tables from the fitted mixed-effects
model object returned by \code{fitMethylationLMEModels()}.
}
\examples{
ex <- dnaEPICO:::exampleMethylationLMEStateDnaEpico()
summary_results <- summarizeMethylationLMEModels(
    modelResults = ex$modelResults,
    preparedData = ex$preparedData,
    summaryPval = NA,
    nCores = 1,
    verbose = FALSE,
    logs = FALSE
)
names(summary_results$summaries)

}
