This data frame defines the configuration of models used in the MixMustR
package. It specifies combinations of key parameters for generating and
running Stan models, which are fundamental to the functions
mixmustr_wrangle_input
and run_mixmustr_models
.
mixmustr_models
A data frame with 8 rows and 4 variables:
A logical vector, defaults to FALSE. Should the model estimate uncertainty around sampled sources signatures?
A logical vector, defaults to FALSE. Should the model estimate uncertainty around the unsampled source signatures or should it be fixed to mean across all sampled sources?
A logical vector, defaults to FALSE. Should all observations be treated as independent or should the model include a hierarchical grouping structure?
A character vector indicating the file path to the corresponding Stan model file, based on the parameter combination.
The data frame is generated in the data-raw/mixmustr_models.R
script.
The mixmustr_models
data frame is programmatically generated using all
possible combinations of the sample_tracer
, fix_unsampled
, and
hierarchical
parameters. Each combination corresponds to a specific Stan
model file, whose path is stored in the code_path
column.
This data frame is used internally by the MixMustR
package to determine
which Stan model to use for a given analysis, based on user-specified
options.
library(MixMustR)
data(mixmustr_models)
head(mixmustr_models)
#> sample_tracer fix_unsampled hierarchical
#> 1 TRUE TRUE TRUE
#> 2 FALSE TRUE TRUE
#> 3 TRUE FALSE TRUE
#> 4 FALSE FALSE TRUE
#> 5 TRUE TRUE FALSE
#> 6 FALSE TRUE FALSE
#> code_path
#> 1 stan/sample_tracer_TRUE_fix_unsampled_TRUE_hierarchical_TRUE.stan
#> 2 stan/sample_tracer_FALSE_fix_unsampled_TRUE_hierarchical_TRUE.stan
#> 3 stan/sample_tracer_TRUE_fix_unsampled_FALSE_hierarchical_TRUE.stan
#> 4 stan/sample_tracer_FALSE_fix_unsampled_FALSE_hierarchical_TRUE.stan
#> 5 stan/sample_tracer_TRUE_fix_unsampled_TRUE_hierarchical_FALSE.stan
#> 6 stan/sample_tracer_FALSE_fix_unsampled_TRUE_hierarchical_FALSE.stan
# Access the Stan model path for a specific configuration
mixmustr_models$code_path[mixmustr_models$sample_tracer & mixmustr_models$hierarchical]
#> [1] "stan/sample_tracer_TRUE_fix_unsampled_TRUE_hierarchical_TRUE.stan"
#> [2] "stan/sample_tracer_TRUE_fix_unsampled_FALSE_hierarchical_TRUE.stan"