% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diagnostics.R
\name{calculate_dic}
\alias{calculate_dic}
\title{Calculate DIC for model comparison}
\usage{
calculate_dic(object)
}
\arguments{
\item{object}{An \code{mlumr_fit} object}
}
\value{
A list of class \code{mlumr_dic} with components \code{DIC}, \code{pD}, \code{D_bar}
}
\description{
Computes the Deviance Information Criterion using the variance-based
effective-parameters formula from Gelman et al. (2004): \code{pD = 0.5 * Var(D)}.
This is more stable than the plug-in alternative for multimodal posteriors.
}
\details{
DIC is retained for backward compatibility and rough comparison. For
principled Bayesian model comparison, prefer \code{\link[=calculate_loo]{calculate_loo()}} or
\code{\link[=calculate_waic]{calculate_waic()}} (Vehtari, Gelman, Gabry 2017).
}
\examples{
\dontrun{
dic_spfa <- calculate_dic(fit_spfa)
dic_relaxed <- calculate_dic(fit_relaxed)
}
}
