% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/decision.R
\name{htdv_stack}
\alias{htdv_stack}
\title{Predictive Stacking of Bayesian Models}
\usage{
htdv_stack(fits, method = c("log_score"))
}
\arguments{
\item{fits}{Named list of \code{htdv_fit} objects.}

\item{method}{Stacking objective. Only \code{"log_score"} supported in this
release.}
}
\value{
A list with \code{weights}, \code{model_names}, and
  \code{elpd_per_model}.
}
\description{
Computes stacking weights (Yao, Vehtari, Simpson, Gelman 2018) across a
list of fitted models by LOO-log-score maximization.
}
\examples{
\donttest{
if (requireNamespace("loo", quietly = TRUE)) {
  x <- rnorm(50)
  f1 <- htdv_fit(x, model = "tac", chains = 2, iter = 500,
                 refresh = 0, seed = 1)
  f2 <- htdv_fit(x, model = "wsc", chains = 2, iter = 500,
                 refresh = 0, seed = 2)
  htdv_stack(list(tac = f1, wsc = f2))$weights
}
}

}
