Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

read.coda

Read output files in CODA format


Description

read.coda reads Markov Chain Monte Carlo output in the CODA format produced by OpenBUGS and JAGS. By default, all of the data in the file is read, but the arguments start, end and thin may be used to read a subset of the data. If the arguments given to start, end or thin are incompatible with the data, they are ignored.

Usage

read.coda(output.file, index.file, start, end, thin, quiet=FALSE)
read.jags(file = "jags.out", start, end, thin, quiet=FALSE)

Arguments

output.file

The name of the file containing the monitored output

index.file

The name of the file containing the index, showing which rows of the output file correspond to which variables

file

For JAGS output, the name of the output file. The extension ".out" may be omitted. There must be a corresponding ".ind" file with the same file stem.

start

First iteration of chain

end

Last iteration of chain

thin

Thinning interval for chain

quiet

Logical flag. If true, a progress summary will be printed

Value

An object of class mcmc containing a representation of the data in the file.

Author(s)

Karen Vines, Martyn Plummer

References

Spiegelhalter DJ, Thomas A, Best NG and Gilks WR (1995). BUGS: Bayesian inference Using Gibbs Sampling, Version 0.50. MRC Biostatistics Unit, Cambridge.

See Also


coda

Output Analysis and Diagnostics for MCMC

v0.19-4
GPL (>= 2)
Authors
Martyn Plummer [aut, cre, trl], Nicky Best [aut], Kate Cowles [aut], Karen Vines [aut], Deepayan Sarkar [aut], Douglas Bates [aut], Russell Almond [aut], Arni Magnusson [aut]
Initial release
2020-09-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.