Description Usage Arguments Details Value Author(s) Examples
Uses coda::raftery.diag
(the Raftery and Lewis
diagnostic) to estimate minimum chain lengths for an MCMC estimate
for mixed stock analysis.
Runs R&L iteratively until the criteria are satisfied.
1 2 3 4 |
data |
a |
startfval |
starting value of contribution frequencies for the
chain, as in |
pilot |
Chain length to start with (length of "pilot" run) |
maxit |
Max. number of iterations of the Raftery and Lewis procedure |
verbose |
Produce lots of output? |
rseed |
Random-number seed |
debug |
produce debugging output? |
n |
number of different random-number seed chains to try |
r |
the results of a Raftery and Lewis diagnostic test |
calc.RL.00
starts by running a Gibbs-sampler chain with the length given by
pilot
, then repeatedly lengthens the chain until the length is
greater than that suggested as the total by the Raftery and Lewis
diagnostic. (The next suggested step in the procedure is to run
multiple chains of this length and see whether they pass the Gelman
and Rubin diagnostic.) calc.mult.RL
runs the Raftery and Lewis calculation multiple times, starting
each chain from a large contribution from each source in turn,
to see if some starting configurations are slower to converge
or if there is a lot of variation among chains with different random
number seeds.
RL.max
picks the expected maximum chain length given
a set of diagnostics; RL.burn
returns the predicted
burn-in required.
for calc.RL.00
:
current |
Results of the Raftery and Lewis test on the current iteration |
history |
History of the iterations: |
for calc.mult.RL
, a matrix giving the maximum expected chain
length for each random-number seed/starting point combination
Ben Bolker
1 2 | data(bolten98)
b98c <- markfreq.condense(as.mixstock.data(bolten98))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.