% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diagnostics.R
\name{compare_models}
\alias{compare_models}
\title{Compare fitted ML-UMR models}
\usage{
compare_models(..., criterion = c("dic", "loo", "waic"))
}
\arguments{
\item{...}{Two or more \code{mlumr_fit} objects. For DIC, \code{mlumr_dic}
objects are also accepted.}

\item{criterion}{One of \code{"dic"} (default), \code{"loo"}, or \code{"waic"}.
LOO and WAIC require the optional \code{loo} package.}
}
\value{
For \code{"loo"} / \code{"waic"}: a \code{compare.loo} table from
\code{\link[loo:loo_compare]{loo::loo_compare()}}. For \code{"dic"}: a data frame (invisibly) with
columns \code{Model}, \code{DIC}, \code{pD}, \code{Delta_DIC}.
}
\description{
Compare two or more \code{mlumr_fit} objects by DIC (default), LOO, or WAIC.
For LOO/WAIC, \code{\link[loo:loo_compare]{loo::loo_compare()}} is used under the hood; the output
is the standard \code{loo_compare} table. For DIC the return is a data
frame ordered by DIC.
}
\details{
DIC is the default for backward compatibility and because it has no
additional package dependencies. For principled Bayesian model
comparison, LOO (Vehtari, Gelman, Gabry 2017) is preferred and
requires the optional \code{loo} package.
}
