% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers.R
\name{fitted.brma}
\alias{fitted.brma}
\title{Fitted Values for brma Objects}
\usage{
\method{fitted}{brma}(
  object,
  unit = "estimate",
  conditioning_depth = "marginal",
  component = "location",
  bias_adjusted = FALSE,
  output_measure = NULL,
  transform = NULL,
  conditional = FALSE,
  ...
)
}
\arguments{
\item{object}{a fitted brma object.}

\item{unit}{output unit. Only \code{"estimate"} is implemented currently.}

\item{conditioning_depth}{conditioning depth for location fitted values.
\code{"marginal"} uses fixed effects only, \code{"cluster"} conditions on
cluster-level random effects, and \code{"estimate"} conditions on the full
estimate-level fitted value.}

\item{component}{fitted component to return. \code{"location"} returns
location fitted values, \code{"scale"} returns fitted heterogeneity
\eqn{\tau_i}, and \code{"all"} returns both as a named list.}

\item{bias_adjusted}{whether location fitted values should adjust for
publication bias. Defaults to \code{FALSE}.}

\item{output_measure}{effect-size measure for location/effect predictions.
Defaults to the fitted measure. Supported conversions are among \code{"SMD"},
\code{"COR"}, \code{"ZCOR"}, and \code{"OR"}; \code{"RR"}, \code{"HR"},
\code{"IRR"}, \code{"RD"}, and \code{"GEN"} can only be returned on their
fitted measure. Use \code{transform = "EXP"} for ratio-scale output from
log-scale measures.}

\item{transform}{optional display transformation. Currently \code{"EXP"}
exponentiates log-scale measures \code{"OR"}, \code{"RR"}, \code{"HR"},
and \code{"IRR"}.}

\item{conditional}{whether to return fitted values from conditional posterior
predictions for RoBMA product-space objects.}

\item{...}{additional arguments. Currently only \code{quiet} is honored.}
}
\value{
A numeric vector of fitted values, or a named list with
\code{location} and \code{scale} components when \code{component = "all"}.
}
\description{
Extract in-sample fitted values from a fitted \code{brma}
object.
}
\details{
This method is a compact adapter around \code{\link{predict.brma}}. It
summarizes posterior prediction draws by their column means and returns a
base numeric vector, matching the usual \code{\link[stats]{fitted}} contract.
Use \code{predict()} directly when posterior draws or intervals are needed.

The default \code{conditioning_depth = "marginal"} corresponds to
\code{predict(object, type = "terms")} and matches the usual fitted-value
convention for meta-regression. For normal models,
\code{conditioning_depth = "estimate"} corresponds to BLUP means for the
observed estimates.

For \code{component = "all"}, \code{conditioning_depth},
\code{output_measure}, and \code{transform} apply only to the
\code{location} component. The \code{scale} component always returns
fitted \eqn{\tau_i} values.
}
\seealso{
\code{\link[=predict.brma]{predict.brma()}}, \code{\link[=residuals.brma]{residuals.brma()}}, \code{\link[=blup.brma]{blup.brma()}}
}
