Runs a set of MixMustR models in Stan
run_mixmustr_models(
model_choices,
data_streams_list,
tracer_list,
sigma_ln_rho,
...
)
A data frame specifying the model configurations to
run. Each row should represent a model, with columns indicating the values
for sample_tracer
, fix_unsampled
, hierarchical
, and code_path
.
A list containing the input
data streams for the model. It should include two
data frames named df_stream_1
anddf_stream_2
. See
details for the expected structure of these.
A named list containing 1–3 data frames of same size,
one for the mean signatures, one for their standard deviations, and another
one for sample size. The second data frame is mandatory if sample_tracer
is TRUE
, or if fix_unsampled
is FALSE
and sample_tracer
is FALSE
.
The third data frame is mandatory if sample_tracer
is TRUE
. See details
for exact structure of these data frames.
A numeric value or matrix specifying the confidence around the log mixing proportions. If a matrix, it must be of dimensions N X J, with N being the number of observations and J being the number of sources.
Additional arguments passed to stan
, such as
iter
, chains
, or control
.
A list where each element corresponds to a model configuration, containing the run time and model output.
The run_mixmustr_models
function automates the process of running
multiple MixMustR
models based on user-specified configurations. It builds
the Stan code for each model, prepares the input data, and runs the models
sequentially. The results are returned as a list, with each element
containing the run time and model output for a specific configuration. For
convenience, MixMustR
provides the user with a built-in data frame
containing all of the potential allowed models mixmustr_models
.