% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internal.R
\name{.posterior_summarize}
\alias{.posterior_summarize}
\title{Summarize posterior draws (mean + quantiles)}
\usage{
.posterior_summarize(
  draws,
  probs = c(0.025, 0.5, 0.975),
  interval = "credible"
)
}
\arguments{
\item{draws}{Numeric vector, matrix, or array with draws in last dimension.}

\item{probs}{Numeric quantile probs.}

\item{interval}{Character or NULL; interval type:
\itemize{
\item \code{NULL}: no interval
\item \code{"credible"} (default): equal-tailed quantile
intervals
\item \code{"hpd"}: highest posterior density intervals
}}
}
\value{
List with estimate, lower, upper, and q.
}
\description{
Summarize posterior draws (mean + quantiles)
}
\details{
The last dimension of \code{draws} is interpreted as the posterior-draw dimension.
This helper collapses that dimension to posterior means and interval summaries,
while preserving the leading dimensions of the input object. It is used
throughout prediction and treatment-effect code to turn per-draw evaluations
into reported posterior summaries.
}
\keyword{internal}
