Runs SBC for an EMC2 model and associated design. Returns normalized rank (between 0 and 1) and prior samples. For hierarchical models the group-level mean and the (implied) group-level (co-)variance are returned. For non-hierarchical models only the subject-level parameters rank is returned.
run_sbc(
design_in,
prior_in,
replicates = 250,
trials = 100,
n_subjects = 30,
plot_data = FALSE,
verbose = TRUE,
fileName = NULL,
...
)
The ranks and prior samples. For hierarchical models also the prior-generated subject-level parameters.
An emc design list. The design of the model to be used in SBC
An emc prior list. The prior for the design to be used in SBC
Integer. The number of samples to draw from the prior
Integer. The number of trials of the simulated data (per subject)
Integer. Only used for hierarchical models. The number of subjects to be used in data generation of each replicate
Boolean. Whether to plot the data simulated (aggregated across subjects)
Verbose. Whether to print progress related messages
Character. Highly recommended, saves temporary results to the fileName
A list of optional additional arguments that can be passed to fit
and make_emc