% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loo.R
\name{compare_ic}
\alias{compare_ic}
\title{Compare Information Criteria of Different Models}
\usage{
compare_ic(..., x = NULL, ic = c("loo", "waic", "kfold"))
}
\arguments{
\item{...}{At least two objects returned by
\code{\link{waic}} or \code{\link{loo}}.
Alternatively, \code{brmsfit} objects with information
criteria precomputed via \code{\link{add_ic}}
may be passed, as well.}

\item{x}{A \code{list} containing the same types of objects as
can be passed via \code{...}.}

\item{ic}{The name of the information criterion to be extracted
from \code{brmsfit} objects. Ignored if information
criterion objects are only passed directly.}
}
\value{
An object of class \code{iclist}.
}
\description{
Compare information criteria of different models fitted
with \code{\link{waic}} or \code{\link{loo}}.
Deprecated and will be removed in the future. Please use
\code{\link{loo_compare}} instead.
}
\details{
See \code{\link{loo_compare}} for the recommended way
  of comparing models with the \pkg{loo} package.
}
\examples{
\dontrun{
# model with population-level effects only
fit1 <- brm(rating ~ treat + period + carry,
            data = inhaler)
waic1 <- waic(fit1)

# model with an additional varying intercept for subjects
fit2 <- brm(rating ~ treat + period + carry + (1|subject),
            data = inhaler)
waic2 <- waic(fit2)

# compare both models
compare_ic(waic1, waic2)
}

}
\seealso{
\code{\link{loo}},
  \code{\link{loo_compare}}
  \code{\link{add_criterion}}
}
