Description Usage Arguments Details Value Author(s) See Also Examples
Determines an appropriate chain length for MCMC estimation of source contributions to a mixed stock by running Raftery and Lewis and Gelman & Rubin diagnostics repeatedly until convergence criteria are met
1 2 | mcmc.chainlength.est(x, mult=1, inflate=sqrt(2), GR.crit=1.2,
nchains=x$R, verbose=FALSE)
|
x |
Mixed stock analysis data (a |
mult |
How many different times to run tests |
inflate |
How much to increase chain length at every failed iteration of Gelman and Rubin |
GR.crit |
Maximum value for Gelman and Rubin 97.5% quantile in order to declare convergence |
nchains |
number of separate MCMC chains to run |
verbose |
print lots of detail while running? |
If mult
is 1, runs Raftery and Lewis diagnostics on a chain
starting from equal contributions; if mult
is greater than 1,
runs them on as many chains as there are sourcees, each starting from
a 95% contribution from that source. Iteratively increases each chain
length to that suggested by the R&L diagnostic, until all chains
pass. Then runs Gelman and Rubin on a set of chains starting from
each source. If mult
is greater than 1, it does each step on
mult
different chains and takes the maximum.
The maximum chainlength needed to get convergence in all tests
Ben Bolker
gibbsC
1 2 | data(simex)
mcmc.chainlength.est(simex,verbose=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.