% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/epred_draws_metad.R
\name{epred_draws_metad}
\alias{epred_draws_metad}
\alias{add_epred_draws_metad}
\alias{epred_rvars_metad}
\alias{add_epred_rvars_metad}
\title{Obtain posterior draws of joint response probabilities}
\usage{
epred_draws_metad(object, newdata, ...)

add_epred_draws_metad(newdata, object, ...)

epred_rvars_metad(object, newdata, ...)

add_epred_rvars_metad(newdata, object, ...)
}
\arguments{
\item{object}{The \code{brms} model with the \code{metad} family}

\item{newdata}{A data frame from which to generate posterior predictions}

\item{...}{Additional arguments passed to \link[tidybayes:add_epred_draws]{tidybayes::add_epred_draws} or
\link[tidybayes:add_epred_rvars]{tidybayes::add_epred_rvars}}
}
\value{
a tibble containing posterior draws of model parameters with the
following columns:
\itemize{
\item \code{.row}: the row of \code{newdata}
\item \code{.chain}, \code{.iteration}, \code{.draw}: for \code{epred_draws_metad}, identifiers for the posterior sample
\item \code{stimulus}, \code{joint_response}, \code{response}, \code{confidence}: identifiers for the response type
\item \code{.epred}: probability of the type 1 and type 2 response given the stimulus, \eqn{P(R, C \;\vert\; S)}
}
}
\description{
Given a data frame and a meta-d' model, adds estimates of joint
type 1 and type 2 response probabilities. For \code{epred_draws_metad} and
\code{add_epred_draws_metad}, estimates are returned in a tidy tibble with one
row per posterior draw. For \code{epred_rvars_metad} and
\code{add_epred_rvars_metad}, parameters are returned as \link[posterior:rvar]{posterior::rvar}s,
with one row per row in \code{newdata}.
}
\examples{
\donttest{
newdata <- tidyr::tibble(.row = 1)

# obtain model predictions
# equivalent to `add_epred_draws_metad(newdata, example_model())`
epred_draws_metad(example_model(), newdata)

# obtain model predictions (`posterior::rvar`)
# equivalent to `add_epred_rvars_metad(newdata, example_model())`
epred_rvars_metad(example_model(), newdata)
}
}
\seealso{
\code{\link[tidybayes:epred_draws]{tidybayes::epred_draws()}}, \code{\link[tidybayes:epred_rvars]{tidybayes::epred_rvars()}}
}
