Fit a single model in a simulation study
fit_sim.Rd
This function fits a Bayesian model using a precompiled brms model object and calculates specified metrics on the fitted model.
Usage
fit_sim(
prefit,
dataset,
data_gen_output,
fit_conf,
seed,
debug,
result_path,
stan_pars,
...
)
Arguments
- prefit
A precompiled brms model object from
get_prefit
- dataset
A data.frame containing the data to fit the model to
- data_gen_output
Output from the data generation function containing true parameters
- fit_conf
A list or data.frame row containing model configuration (formula, family, etc.)
- seed
Random seed for reproducible model fitting
- debug
Logical; if TRUE, saves intermediate results for debugging
- result_path
Path where debug files should be saved
- stan_pars
List of Stan/brms parameters (chains, iter, warmup, etc.)
- ...
Additional arguments passed to metric calculation functions