Builds underlying Stan code for MixMustR model of choice
build_stancode(
sample_tracer = FALSE,
fix_unsampled = FALSE,
hierarchical = FALSE,
code_path
)
A logical vector, defaults to FALSE.
A logical vector, defaults to FALSE.
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
Nothing.
MixMustR
currently allows for eight model variants
which result from three user-driven binary choices: 1) should the model only
ingest the mean sampled-source tracer signatures (equivalent to
"residual-only error" structure of MixSIAR; Stock et al. 2018) or should it
incorporate their uncertainty based on user-provided mean, variance and
sample size information (equivalent to "process error" structure of MixSIAR);
2) should the unsampled-source tracer signatures be fixed at the mean across
all sampled sources, or should they rather be estimated based on a prior
informed by the mean and variance across the sampled tracer signatures? and
3) should all observations be treated as independent or should the model
include a hierarchical grouping structure?
Given these three choices, build_stancode
saves a stan code
to an output directory of the users' choosing. Nothing is returned.
Stock BC, Jackson AL, Ward EJ, Parnell AC, Phillips DL, Semmens BX (2018) Analyzing mixing systems using a new generation of Bayesian tracer mixing models. PeerJ, 6:e5096. doi:10.7717/peerj.5096.