% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/use_weights.R
\name{summarise.adjustr_weighted}
\alias{summarise.adjustr_weighted}
\alias{summarize.adjustr_weighted}
\title{Summarize Posterior Distributions Under Alternative Model Specifications}
\usage{
\method{summarise}{adjustr_weighted}(.data, ..., .resampling = FALSE, .model_data = NULL)

\method{summarize}{adjustr_weighted}(.data, ..., .resampling = FALSE, .model_data = NULL)
}
\arguments{
\item{.data}{An \code{adjustr_weighted} object.}

\item{...}{Name-value pairs of expressions. The name of each argument will be
  the name of a new variable, and the value will be computed for the
  posterior distribution of eight alternative specification. For example,
  a value of \code{mean(theta)} will compute the posterior mean of
  \code{theta} for each alternative specification.

  Also supported is the custom function \code{wasserstein}, which computes
  the Wasserstein-p distance between the posterior distribution of the
  provided expression under the new model and under the original model, with
  \code{p=1} the default. Lower the \code{spacing} parameter from the
  default of 0.005 to compute a finer (but slower) approximation.

  The arguments in \code{...} are automatically quoted and evaluated in the
  context of \code{.data}. They support unquoting and splicing.}

\item{.resampling}{Whether to compute summary statistics by first resampling
the data according to the weights. Defaults to \code{FALSE}, but will be
used for any summary statistic that is not \code{mean}, \code{var} or
\code{sd}.}

\item{.model_data}{Stan model data, if not provided in the earlier call to
\code{\link{adjust_weights}}.}
}
\value{
An \code{adjustr_weighted} object, with the new columns specified in
\code{...} added.
}
\description{
Uses weights computed in \code{\link{adjust_weights}} to compute posterior
summary statistics. These statistics can be compared against their reference
values to quantify the sensitivity of the model to aspects of its
specification.
}
\examples{
spec = make_spec(eta ~ student_t(df, 0, 1), df=4:10)
adjusted = adjust_weights(spec, eightschools_m, keep_bad=TRUE)

summarize(adjusted, mean(mu), var(mu))

}
\seealso{
\code{\link{adjust_weights}}, \code{\link{spec_plot}}
}
