When submit_model() is called with a Stan model, it collects the arguments from <run>-stanargs.R and passes them to CmdStanModels $sample() (for bbi_stan_model objects) or $generate_quantities() (for bbi_stan_gq_model objects).

set_stanargs() and get_stanargs() provide an interface for specifying and inspecting the arguments attached to a model.

set_stanargs(.mod, .stanargs, .clear = FALSE)

# S3 method for bbi_stan_model
set_stanargs(.mod, .stanargs, .clear = FALSE)

# S3 method for bbi_stan_gq_model
set_stanargs(.mod, .stanargs, .clear = FALSE)

get_stanargs(.mod)

Arguments

.mod

A Stan model object.

.stanargs

args passed through to $sample() or $generate_quantities().

.clear

If FALSE, the default, add any new args and only overwrite existing args that are passed in through .stanargs. If TRUE, overwrite all attached args so that only .stanargs will be attached.