% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ild_diagnostics_bundle.R
\name{ild_diagnostics_bundle}
\alias{ild_diagnostics_bundle}
\alias{new_ild_diagnostics_bundle}
\alias{is_ild_diagnostics_bundle}
\title{Canonical ILD diagnostics bundle}
\usage{
ild_diagnostics_bundle(
  meta = NULL,
  data = NULL,
  design = NULL,
  fit = NULL,
  residual = NULL,
  predictive = NULL,
  missingness = NULL,
  causal = NULL,
  warnings = NULL,
  guardrails = NULL,
  summary_text = character()
)

new_ild_diagnostics_bundle(
  meta = NULL,
  data = NULL,
  design = NULL,
  fit = NULL,
  residual = NULL,
  predictive = NULL,
  missingness = NULL,
  causal = NULL,
  warnings = NULL,
  guardrails = NULL,
  summary_text = character()
)

is_ild_diagnostics_bundle(x)
}
\arguments{
\item{meta, data, design, fit, residual, predictive, missingness, causal}{Optional sections
(list or structured object, or \code{NULL}).}

\item{warnings, guardrails}{Tibbles (default empty).}

\item{summary_text}{Character vector (default empty).}

\item{x}{Object to test.}
}
\value{
An object of class \code{ild_diagnostics_bundle}.

\code{is_ild_diagnostics_bundle}: logical.
}
\description{
The bundle has identical top-level \strong{slot names} for every estimation backend.
Content differs by engine; unavailable sections are \code{NULL}.
\code{warnings} and \code{guardrails} are always tibbles (possibly 0 rows).
Guardrails use the canonical schema documented in \code{\link{guardrail_registry}}:
\code{rule_id}, \code{section}, \code{severity}, \code{triggered}, \code{message},
\code{recommendation} (only triggered rules are stored as rows).
}
\details{
Several standalone functions **feed** these slots when you use \code{\link{ild_diagnose}};
see \code{\link{ild_diagnostics_utilities}} (\code{\link{ild_design_check}},
\code{\link{ild_missing_pattern}}, \code{\link{ild_missing_model}}, \code{\link{ild_ipw_weights}}).

Bundles returned by \code{\link{ild_diagnose}} also set \code{attr(bundle, "ild_fit")} and
\code{attr(bundle, "ild_data")} for \code{\link{ild_autoplot}}; re-run \code{ild_diagnose} if
these are missing (e.g. after loading a saved bundle without the fitted object).

The \code{\link{print}} method lists each slot and prints a short \strong{summary} line:
number of warning rows, number of guardrail rows, highest guardrail severity
(\code{info} < \code{warning}), and up to five triggered \code{rule_id} values.
}
\section{Slots}{

\describe{
  \item{\code{meta}}{List or \code{NULL}: run ids, engine, dimensions.}
  \item{\code{data}}{List or \code{NULL}: spacing, gaps, compliance, missingness, distributions.}
  \item{\code{design}}{List or \code{NULL}: within/between variation, time coverage, occasions, imbalance.}
  \item{\code{fit}}{List or \code{NULL}: convergence, singularity, optimizer / MCMC diagnostics.}
  \item{\code{residual}}{List or \code{NULL}: ACF, Q-Q, fitted vs observed, heteroskedasticity.}
  \item{\code{predictive}}{List or \code{NULL}: CV, PPC, forecast error.}
  \item{\code{missingness}}{List or \code{NULL}: IPW / imputation summaries when applicable.}
  \item{\code{causal}}{List or \code{NULL}: weights, positivity, causal diagnostics when applicable.}
  \item{\code{warnings}}{Tibble: structured warnings.}
  \item{\code{guardrails}}{Tibble: methodological guardrails (see \code{\link{guardrail_registry}}).}
  \item{\code{summary_text}}{Character: short narrative summary.}
}
}

\seealso{
\code{\link{ild_diagnose}}, \code{\link{guardrail_registry}},
  \code{\link{ild_diagnostics_utilities}},
  \code{\link{ild_tidy_schema}}, \code{\link{ild_augment_schema}}.
  Per-section field semantics: \code{vignette("developer-contracts", package = "tidyILD")}.
}
