Both diagnostics draw "true" parameters from prior, simulate data for
them, and drop trials whose simulation failed. The prior-width check lives
here rather than in each caller, so sbc() and tarp() get it in one
place: prior exists to be overridden (see their docs), and a prior of the
wrong width would otherwise reach sweep()/z-scoring downstream and
silently recycle against the fit's width.
Arguments
- fit
An
nsbi_npe,nsbi_nleornsbi_nrefit.- simulator
The simulator used for inference.
- prior
The prior to draw true parameters from.
- n
Number of trials to draw.
- sim_args
Named list of extra simulator arguments.
- what
Label for
drop_failed_sims()'s warning (e.g."SBC trials").
