% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glue.R
\name{check_glue_validity}
\alias{check_glue_validity}
\title{Validate bulk+tail glue for MixGPD predictive distribution}
\usage{
check_glue_validity(
  fit,
  x = NULL,
  grid = NULL,
  n_draws = 50L,
  tol = 1e-08,
  check_continuity = TRUE,
  eps = 1e-06
)
}
\arguments{
\item{fit}{A \code{mixgpd_fit} object.}

\item{x}{Optional design matrix for conditional models. If \code{NULL}, uses training \code{X}.}

\item{grid}{Numeric evaluation grid. If \code{NULL}, defaults to a grid based on training \code{y}.}

\item{n_draws}{Number of posterior draws to check (sampled without replacement when possible).}

\item{tol}{Numerical tolerance for monotonicity/range checks.}

\item{check_continuity}{Logical; if \code{TRUE} and GPD is enabled, checks continuity at the threshold.}

\item{eps}{Small offset used for threshold continuity check.}
}
\value{
A list with per-check pass/fail flags and summaries of violations.
}
\description{
This diagnostic checks whether the implied predictive distribution behaves like
a valid distribution (monotone CDF in \eqn{[0,1]}, nonnegative density, and
sensible behavior around the threshold when a GPD tail is enabled).
}
\details{
The check is performed draw-by-draw on a user-specified grid. It is intended
for development, debugging, and CI (not for routine large-scale use).
}
