Samples parameters from the posterior and pushes them back through the simulator, giving predictive data to compare against the observation. A draw whose simulation returns non-finite output is dropped, which lowers the number of predictive draws returned.
Usage
posterior_predictive(post, simulator, n = 1000L, x = NULL, sim_args = list())Arguments
- post
An
nsbi_posteriorobject.- simulator
The simulator; called once per posterior draw (see nsbi_simulator).
- n
Number of predictive draws.
- x
Observation to condition on (defaults to
x_obs).- sim_args
Named list of extra arguments passed to every simulator call; see nsbi_simulator.
