% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methylationLME_steps.R
\name{collectSignificantInteractionsMethylationLME}
\alias{collectSignificantInteractionsMethylationLME}
\title{Collect significant longitudinal model terms from fitted mixed-effects models}
\usage{
collectSignificantInteractionsMethylationLME(
  modelResults,
  pvalThreshold = 0.05,
  interactionTerm = NULL,
  excludeSingular = FALSE,
  excludeNonConverged = FALSE,
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_methylationLME.txt"
)
}
\arguments{
\item{modelResults}{Object returned by \code{fitMethylationLMEModels()}.}

\item{pvalThreshold}{Numeric. Threshold applied to the extracted phenotype or
interaction p-values.}

\item{interactionTerm}{Character or \code{NULL}. Optional interaction term. When
\code{NULL}, phenotype main effects are used.}

\item{excludeSingular}{Logical. If \code{TRUE}, do not collect significant CpGs
with singular lme4 fits.}

\item{excludeNonConverged}{Logical. If \code{TRUE}, do not collect significant
CpGs whose mixed model did not converge. Excluded CpG rows and reasons
remain available in diagnostic and annotated output.}

\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_significant'}
containing the retained coefficient tables for each phenotype.
}
\description{
Collect raw coefficient tables for CpGs whose phenotype main effect or
requested interaction p-value passes the chosen threshold.
}
\examples{
ex <- dnaEPICO:::exampleMethylationLMEStateDnaEpico()
significant_hits <- collectSignificantInteractionsMethylationLME(
    modelResults = ex$modelResults,
    pvalThreshold = 1,
    verbose = FALSE,
    logs = FALSE
)
names(significant_hits)

}
