% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/integration.R
\name{check_integration}
\alias{check_integration}
\title{Check integration point adequacy}
\usage{
check_integration(
  data,
  ...,
  cor = NULL,
  cor_adjust = NULL,
  check_joint = TRUE,
  verbose = TRUE
)
}
\arguments{
\item{data}{An \code{mlumr_data} object with integration points}

\item{...}{Distribution specifications (same as passed to
\code{\link[=add_integration]{add_integration()}})}

\item{cor}{Correlation matrix (same as passed to \code{\link[=add_integration]{add_integration()}})}

\item{cor_adjust}{Adjustment method (same as passed to \code{\link[=add_integration]{add_integration()}})}

\item{check_joint}{If \code{TRUE} (default), also compare pairwise correlation
matrices between the current and doubled \code{n_int}, and the maximum
per-AgD-row absolute deviation from the user-supplied \code{cor}. The
pairwise comparison catches cases where marginals converge but joint
dependence structure does not (rare in practice for QMC with sensible
\code{cor_adjust} but worth flagging when \code{n_int} is small).}

\item{verbose}{Logical; if \code{FALSE}, suppresses printed diagnostic messages.}
}
\value{
A list with components \code{marginals} (the original data frame
returned by previous versions) and, if \code{check_joint = TRUE},
\code{correlations} -- a data frame of pairwise covariate correlations at
the current and doubled \code{n_int} for each AgD row. Printed with a
pass/warn verdict.
}
\description{
Compare integration results at the current \code{n_int} against a doubled
resolution to assess numerical accuracy. Large discrepancies indicate
that \code{n_int} should be increased.
}
