% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dffits.R
\name{dffits.brma}
\alias{dffits.brma}
\alias{dffits}
\title{DFFITS for brma Objects}
\usage{
\method{dffits}{brma}(model, ...)
}
\arguments{
\item{model}{a fitted normal-outcome \code{brma} object without a
weightfunction component.}

\item{...}{additional arguments (currently ignored).}
}
\value{
A named numeric vector of DFFITS values, one for each observation.
}
\description{
Computes DFFITS (Difference in FITS, standardized) for a
fitted brma object. DFFITS measures how much the fitted value for observation
\eqn{i} changes if observation \eqn{i} is removed, standardized by the
estimated standard error of the fit.
}
\details{
DFFITS values are computed as a PSIS leave-one-out deletion diagnostic. For
each observation \eqn{i}, the leave-one-out posterior mean fitted value at
that observation is estimated with normalized PSIS weights and compared to
the full-posterior fitted value:
\deqn{DFFITS_i =
  \frac{\hat{\mu}_i - \hat{\mu}_{i(-i)}}{SD_{(-i)}(\mu_i)}}

This targets deletion influence on fitted values directly. It does not use
LOO-PIT residuals, which are predictive outlier diagnostics rather than
fitted-value deletion diagnostics.

Estimate-unit LOO must first be computed with
\code{model <- add_loo(model, unit = "estimate")}. If the leave-one-out
posterior SD of a fitted value is near zero, the corresponding DFFITS value
is returned as \code{NA}.
}
\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)

  dffits(fit)
}
}

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