brms_sampler: Sample from a Bayesian Regression Model

View source: R/estimators.R

brms_samplerR Documentation

Sample from a Bayesian Regression Model

Description

This samples from the posterior predictive for each component in a multiresponse Bayesian Regression model.

Usage

brms_sampler(fits, newdata = NULL, indices = NULL, ...)

Arguments

fits

The fitted 'BRMS' model model from which to draw samples.

newdata

A data.frame containing new inputs from which to sample responses. If NULL, defaults to the data used to estimate fit.

indices

The coordinates of the response from which we want to sample.

...

Additional arguments to pass to posterior_predict in the 'brms' package.

Value

A data.frame containing a single posterior predictive sample at each of the newdata rows passed into a fitted BRMS model. Each column corresponds to one outcome variable, each row to the associated row in the newdata input..


multimedia documentation built on Sept. 30, 2024, 9:28 a.m.