Last data update: 2014.03.03

R: Convert a bugs Object to an mcmc or mcmc.list Object
as.mcmc.bugsR Documentation

Convert a bugs Object to an mcmc or mcmc.list Object

Description

Converts a bugs object to an mcmc object.

Usage

## S3 method for class 'bugs'
as.mcmc(x, ...)

Arguments

x

bugs object

...

unused

Value

If x contains multiple chains, the function returns an mcmc.list object. Otherwise, the function returns an mcmc object.

Author(s)

S. McKay Curtis

See Also

bugs in R2WinBUGS

Examples

## Not run: 
## Data object "schools.sim" generated from the examples
## in the bugs function of the R2WinBUGS package.
outmcmc <- as.mcmc(schools.sim)

## Gelman Rubin diagnostics
:gelman.diag(outmcmc)
:mcmc.plot(outmcmc)

## End(Not run)

Results