Fits each component's data with its own model through fit_cached(), so
a second call reuses the saved fits while nothing that determines them
has changed.
Arguments
- sim_set
A
bmmtools_simulation_setfromsimulate_components().- dir
The directory the fits are saved in, one file per component, named after it (
<dir>/<name>.rds, with its cache key next to it).- prior
NULL, or a named list with a prior for some of the components, such aslist(sdm = <brmsprior>). A component not named is fitted with bmm's default priors.- ...
Passed to
fit_cached()and on to the fitter, for every component:refit, and sampler arguments such aschains,iterorbackend. When the set was simulated with a seed and...has noseed, the set's seed is passed asseed, the same for every component.- .fitter
The fitting function,
bmm::bmm()by default; seefit_cached().
Value
A named list of fits, one per component, of class
bmmtools_fit_set, which extract_correlations(),
recover_correlations() and subject_table() read as one set.
Details
A component fitted without a formula uses recovery_formula(), with
the task column when the component has tasks.
