Adaptations of colMeans and sweep for working with mcmc.list objects. The function mcmc.list is used to represent parallel runs of the same chain, with different starting values and random seeds.
colMeans.mcmc.list(x, ...)sweep.mcmc.list(x, STATS, FUN = "-", check.margin = TRUE, ...)
a mcmc.list object
the summary statistic which is to be swept out
the function to be used to carry out the sweep (default is '-', subtraction)
logical. If TRUE (the default), warn if the length or dimensions of STATS do not match the specified dimensions of x. Set to FALSE for a small speed gain when you know that dimensions match.
colMeans.mcmc returns a vector with length equal to the number of mcmc chains in x with the mean value for each chain.
sweep.mcmc.lists returns an appropriately modified version of x
colMeans.mcmc.list converts the mcmc list into a matrix and then runs colMeans on it
sweep.mcmc.lists modifies the values of the chains by computing some aggregate summary statistic function (STATS) on the entire chain and applying it to each value via FUN (default is subtraction). See sweep for additional examples.