Description Usage Arguments Details Value Author(s)
View source: R/mixsiar_fitsims.R
Useful for obtaining fits from a sequence of randomly simulated datasets. For instance, you could use this function to perform a sort of broad-sense power analysis to ask how many samples are required to obtain a specific confidence about an animal's diet.
1 2 3 | mixsiar_fitsims(n, tracer_means, tracer_sds, snames, modelfile, mixsiardat,
sdmult = 1, seed = 42, mcmc.control = list(iter = 50000, burn = 10000,
thin = 10, n.chain = 4), prior.control = NULL)
|
n |
A |
tracer_means |
A |
tracer_sds |
A |
snames |
A |
modelfile |
A |
mixsiardat |
A |
sdmult |
A |
mcmc.control |
A list giving parameters for the MCMC chains. |
priorcontrol |
A list with the means and standard deviations of the priors. |
The mixes and sampled randomly from normal distributions. Fixing the seed is useful if you want to compare runs across different SDs, because the random samples will have the same pattern deviations.
A list where the first object gives the simulated data and the
second object is a rjags
object giving the model fit.
Christopher J. Brown
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.