Spaghetti plot of resampled posterior fits
Arguments
- obsdata
The observational data. The data in this will typically be a named list, but could be anything, e.g. dataframe. It is the reference data that the simulation model is aiming to replicate.
- fit
A S3
abc_fitobject as output by theabc_XXXfunctions- sim_fn
a user defined function that takes a set of parameters named the same as
priors_list. It must return a simulated data set in the same format asobsdata, or that can be compared tosimdatabyscorer_fn. This function must not refer to global parameters, and will be automatically crated withcarrier.- method
one of
"auto","count", or"density", or a named vector one for each component ofobsdata.- n
the number of simulations to plot
- ...
Named arguments passed on to
posterior_resamplen_resamplesthe number of resamples for each parameter combination.
max_samplesthe maximum total number of resamples to pick.
Examples
plot_simulations(
example_obsdata(),
example_adaptive_fit(),
example_sim_fn
)