Learn R Programming

rbugs (version 0.5-9.1)

getBugsOutput: Collect the MCMC samples from BUGS

Description

Collect the MCMC samples from BUGS.

Usage

getBugsOutput(n.chains, workingDir, OpenBugs = TRUE)

Arguments

n.chains

The number of chains BUGS had run.

workingDir

A character string specifying the name of the directory where the output files are saved.

OpenBugs

If TRUE, OpenBugs is used.

Value

A list of matrix whose columns and rows contain the monitored parameters and the MCMC iterations, respectively.

Details

This function assumes that under workingDir, there is a coda index file codaIndex.txt, and the coda output for n.chains chains are named as coda1.txt, coda2.txt, ...