% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/covratio.R
\name{covratio.brma}
\alias{covratio.brma}
\alias{covratio}
\title{COVRATIO for brma Objects}
\usage{
\method{covratio}{brma}(model, type = "mods", ...)
}
\arguments{
\item{model}{a fitted brma object.}

\item{type}{type of parameters to be summarized. Defaults to \code{"mods"}
(for the effect size and meta-regression coefficients). Use \code{"scale"}
for heterogeneity and scale-regression coefficients.}

\item{...}{additional arguments. The internal \code{.weights} argument can
supply precomputed PSIS weights for callers that already extracted them.}
}
\value{
A named numeric vector of COVRATIO values, one for each observation.
}
\description{
Computes COVRATIO for a fitted brma object. COVRATIO measures
the change in the determinant of the covariance matrix of the estimates
when observation \eqn{i} is removed.
}
\details{
COVRATIO is computed using importance sampling weights to approximate the
leave-one-out covariance matrices without refitting the model.
Estimate-unit LOO must first be computed with
\code{model <- add_loo(model, unit = "estimate")}, unless internal weights
are supplied.

\deqn{COVRATIO_i = \frac{\det(Cov(\beta)_{-i})}{\det(Cov(\beta))}}

Values > 1 indicate that the observation improves precision (decreases
variance), while values < 1 indicate that the observation decreases precision
(increases variance).
If any included parameter has zero posterior variance, or if a full or LOO
covariance determinant is zero or non-finite, COVRATIO is undefined. In that
case, values are reported as \code{NaN} with a printed note when available.
}
\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)

  covratio(fit)
}
}

}
\seealso{
\code{\link{influence.brma}}, \code{\link{dffits.brma}}, \code{\link{cooks.distance.brma}}
}
