% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loo.R
\name{loo.brma}
\alias{loo.brma}
\alias{loo}
\title{LOO-PSIS for brma Objects}
\usage{
\method{loo}{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{c("psis_loo", "loo")} as returned by
\code{\link[loo]{loo}}.
}
\description{
Extract the LOO-PSIS object from a brma model object.
The LOO must first be computed using \code{\link{add_loo}}.
}
\details{
This function extracts the LOO object that was previously computed and
stored using \code{object <- add_loo(object, unit = unit)}. If LOO has not
been computed for the requested unit, an error is thrown.

This is the RoBMA S3 generic and \code{brma} method. Use
\code{\link[loo]{loo}} directly for raw log-likelihood arrays or matrices.
}
\examples{
\dontrun{
if (requireNamespace("metadat", quietly = TRUE)) {
  data(dat.lehmann2018, package = "metadat")
  fit <- bPET(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")
  fit <- add_loo(fit)

  loo_fit <- loo(fit)
  print(loo_fit)
}
}

}
\seealso{
\code{\link{add_loo}}, \code{\link[loo]{loo}},
\code{\link[loo]{loo_compare}}, \code{\link[loo]{pareto_k_ids}}
}
