Skip to contents

Simulate a new dataset using forward sampling.

Usage

forward_sampling(fit, i, n, ...)

Arguments

fit

An object of class brmsfit or a list of brmsfit objects.

i

The index of a single posterior draw to simulate a dataset for. The index is passed to posterior_predict()'s "draw_ids" argument.

...

Potential additional arguments.

newdata

A dataframe that is passed to posterior predict.

Value

A data.frame containing n observations for each variable in the fit.