% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loo.R
\name{waic.brma}
\alias{waic.brma}
\alias{waic}
\title{WAIC for brma Objects}
\usage{
\method{waic}{brma}(x, unit = "estimate", ...)
}
\arguments{
\item{x}{a brma model object.}

\item{unit}{output/deletion unit. See \code{\link{add_loo}}.}

\item{...}{additional arguments (currently unused).}
}
\value{
An object of class \code{"waic"} as returned by
\code{\link[loo]{waic}}.
}
\description{
Extract the WAIC object from a brma model object.
The WAIC must first be computed using \code{\link{add_waic}}.
}
\details{
This function extracts the WAIC object that was previously computed and
stored using \code{object <- add_waic(object, unit = unit)}. If WAIC has not
been computed for the requested unit, an error is thrown.

This is the RoBMA S3 generic and \code{brma} method. The method is also
registered for \code{\link[loo]{waic}}, so \code{loo::waic(fit)} extracts
the cached WAIC object for \code{brma} fits. Use \code{\link[loo]{waic}}
directly for raw log-likelihood arrays or matrices.

In most cases, LOO-PSIS (via \code{\link{loo.brma}}) is preferred over WAIC
because it provides better estimates and includes diagnostics (Pareto k
values) that indicate when the approximation may be unreliable.
}
\seealso{
\code{\link{add_waic}}, \code{\link{loo.brma}}, \code{\link[loo]{waic}}
}
