% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methylationLME_steps.R
\name{plotMethylationLMEDiagnostics}
\alias{plotMethylationLMEDiagnostics}
\title{Plot longitudinal mixed-effects model diagnostics}
\usage{
plotMethylationLMEDiagnostics(
  modelSummaries,
  preparedData,
  fdrThreshold = 0.05,
  padjmethod = "fdr",
  outputDir = NULL,
  plotWidth = 2000L,
  plotHeight = 1000L,
  plotDPI = 150L,
  display = FALSE,
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_methylationLME.txt"
)
}
\arguments{
\item{modelSummaries}{Object returned by \code{summarizeMethylationLMEModels()}.}

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

\item{fdrThreshold}{Numeric. False-discovery-rate threshold used to highlight
CpGs in the diagnostic plots.}

\item{padjmethod}{Character. P-value adjustment method passed to
\code{stats::p.adjust()}.}

\item{outputDir}{Character or \code{NULL}. Directory used for TIFF files. When
\code{NULL}, plots are returned in memory only.}

\item{plotWidth}{Integer. TIFF width in pixels when plots are written to
disk.}

\item{plotHeight}{Integer. TIFF height in pixels when plots are written to
disk.}

\item{plotDPI}{Integer. TIFF resolution in DPI when plots are written to
disk.}

\item{display}{Logical. If \code{TRUE}, draw plots on the active graphics device.}

\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_diagnostic_plots'}
containing the generated \code{ggplot2} objects, genomic inflation factors, and
any saved TIFF file paths.
}
\description{
Create Q-Q and standard-error diagnostic plots from the mixed-effects summary
tables returned by \code{summarizeMethylationLMEModels()}.
}
\examples{
ex <- dnaEPICO:::exampleMethylationLMEStateDnaEpico()
diagnostic_plots <- plotMethylationLMEDiagnostics(
    modelSummaries = ex$modelSummaries,
    preparedData = ex$preparedData,
    display = FALSE,
    verbose = FALSE,
    logs = FALSE
)
names(diagnostic_plots$plots)

}
