This function closely imitate cmdstanr::save_object()
but saves the
entire model output object from run_model()
which contains more details
regarding stratification etc.
Arguments
- model_output
List. Model output generated by
run_model()
.- path
Character. Optional file path to use for saved data. Defaults to the file path used for the original run
- quiet
Logical. Suppress progress messages? Default
FALSE
.
Details
Files are saved to path
, or if not provided to the original location of
the Stan model run files (provided the original files exist).
Examples
# By default, the model is saved as an RDS file during `run_model()`
# But you can also deliberately save the file (here with an example model)
save_model_run(pacific_wren_model, path = "my_model.rds")
# Clean up
unlink("my_model.rds")