checkIsConverged: checkConvergence - Check the convergence of a mcmc.list...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/checkIsConverged.r

Description

Run various diagnostic procedures in the coda package to check convergence of a set of mcmc chains.

Usage

1
checkIsConverged(obj, criterion = 1.1, quiet = FALSE)

Arguments

obj

An mcmc.list object from the rjags package. These are output by the coda.samples function. This mcmc.list must contain 2 or more chains.

quiet

Whether to print any output on screen.

Details

This routine runs the Gelman and Rubin (1992) diagnostic for a set of MCMC chains by calling gelman.diag in the coda package.

Value

A list with the following components

Author(s)

Trent McDonald

References

Gelman, A and Rubin, DB (1992) Inference from iterative simulation using multiple sequences, Statistical Science, 7, 457-511.

See Also

gelman.diag, checkIsConverged

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
jags = jags.model(file="someJAGSFile.txt",
   data=someJAGS.data, inits=someJAGS.inits,
   n.chains=3,n.adapt=100)
update(jags, n.iter=1000)
out = coda.samples(jags,
   variable.names=c("someParameter"),
   n.iter=1000,
   thin=2)

conf <- chechIsConverged(out)

## End(Not run)

tmcd82070/evoab documentation built on May 13, 2020, 11:25 p.m.