% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diagnostics.R
\name{htdv_diagnostics}
\alias{htdv_diagnostics}
\title{MCMC Diagnostics for htdv_fit Objects}
\usage{
htdv_diagnostics(
  fit,
  rhat_threshold = 1.01,
  ess_threshold = 400,
  bfmi_threshold = 0.3
)
}
\arguments{
\item{fit}{An \code{htdv_fit} object.}

\item{rhat_threshold}{Convergence threshold for Rhat.}

\item{ess_threshold}{Minimum effective sample size.}

\item{bfmi_threshold}{Minimum acceptable energy-BFMI.}
}
\value{
A list with \code{rhat}, \code{ess_bulk}, \code{ess_tail},
  \code{bfmi}, \code{divergences}, \code{max_treedepth},
  \code{passed} (logical), and \code{failures} (character vector).
}
\description{
Computes split-Rhat, bulk and tail ESS, E-BFMI, divergence count, and
treedepth saturation; all standard HMC diagnostics (Vehtari et al. 2021,
Betancourt 2016).
}
\examples{
\donttest{
x <- rnorm(50)
fit <- htdv_fit(x, model = "tac", chains = 2, iter = 500,
                refresh = 0, seed = 1)
htdv_diagnostics(fit)$passed
}

}
\references{
Vehtari, A., Gelman, A., Simpson, D., Carpenter, B., & Buerkner, P.-C.
(2021). Rank-normalization, folding, and localization: An improved Rhat
for assessing convergence of MCMC. Bayesian Analysis 16(2): 667-718.
Betancourt, M. (2016). Diagnosing Suboptimal Cotangent Disintegrations.
<doi:10.48550/arXiv.1604.00695>.
}
