forward_sampling: Simulate a new dataset using forward sampling.

View source: R/inverse_forward_sampling.R

forward_samplingR Documentation

Simulate a new dataset using forward sampling.

Description

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.


sims1253/bayesim documentation built on Aug. 13, 2024, 5:59 p.m.