Skip to contents

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..