mcmcMean returns the sample mean of a vector containing the output
of an MCMC sampler, together with an estimated standard error. If the input
is a matrix, means and standard errors are computed for each column.
mcmcSD returns an estimate of the standard deviation of the mean for
the output of an MCMC sampler.
ergMean returns a vector of running ergodic means.
Arguments
x
vector or matrix containing the output of a Markov chain
Monte Carlo simulation.
sd
logical: should an estimate of the Monte Carlo standard
deviation be reported?
The argument x is typically the output from a simulation. If a
matrix, rows are considered consecutive simulations of a target
vector. In this case means, standard deviations, and ergodic means
are returned for each column. The standard deviation of the mean is
estimated using Sokal's method (see the reference). mcmcMeans
is an alias for mcmcMean.
References
P. Green (2001). A Primer on Markov Chain Monte Carlo. In
Complex Stochastic Systems, (Barndorff-Nielsen, Cox and
Kl\"uppelberg, eds.). Chapman and Hall/CRC.