| mcarray.object | R Documentation |
An mcarray object is used by the jags.samples function
to represent monitored output from a JAGS model. It is a tagged array with
tags "value", "iteration" and "chain".
## S3 method for class 'mcarray'
summary(object, FUN, ...)
## S3 method for class 'mcarray'
print(x, ...)
## S3 method for class 'mcarray'
as.mcmc.list(x, na.rm=TRUE, ...)
object, x |
an |
FUN |
a function to be used to generate summary statistics |
na.rm |
indicates whether elements with missing values should be removed |
... |
additional arguments to the call |
The coda package defines mcmc objects for representing
output from an MCMC sampler, and mcmc.list for representing
output from multiple parallel chains. These objects emphasize the
time-series aspect of the MCMC output, but lose the original array
structure of the variables they represent. The mcarray class
attempts to rectify this by preserving the dimensions of the original
node array defined in the JAGS model.
Objects of class mcarray are tagged arrays with a limited
set of supported tags:
dimensions corresponding to the dimension of the object in the JAGS model
dimension corresponding to the evolution of the Markov chain over iterations
dimension corresponding to replication of the Markov chain over parallel chains
There can be multiple dimensions with tag "value" but at most one with tag "iteration" and at most one with tag "chain".
The summary method for mcarray objects collapses
the object over "chain" and "iteration" dimensions leaving "value"
dimensions.
The print method prints the mean, collapsing over
"chain" and "iteration" dimensions. It also includes information
about the "stat" and "summary" of the JAGS monitor and the size
of the collapsed dimensions.
The as.mcmc.list method coerces an mcarray to an
mcmc.list object so that the diagnostics provided by the
coda package can be applied to the MCMC output it represents.
Martyn Plummer
collapse
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.