This function produces summary statistics for a variable, pooling over the chains selected.
samplesStats(node, beg = samplesGetBeg(), end = samplesGetEnd(),
firstChain = samplesGetFirstChain(),
lastChain = samplesGetLastChain(), thin = samplesGetThin())
samples.stats
returns a data frame with columns:
means
standard deviations
Estimate of \(s/\sqrt(N)\), the Monte Carlo standard error of the mean. The batch means method outlined by Roberts (1996; p.50) is used to estimate \(s\).
0.025 quantiles
medians
0.975 quantiles
beg
+ 1
sample sizes
Character vector containing names of variables in the model.
Arguments to select a slice of monitored values corresponding to iterations beg:end
.
Arguments to select a sub group of chains to calculate summary statistics for.
to only use every thin
-th value of the stored sample for statistics.
If the variable of interest is an array, slices of the array can be selected using the notation
variable[lower0:upper0, lower1:upper1, ...]
.
A star ‘*
’ can be entered as shorthand for all the stored samples.
If the arguments are left at their defaults the whole sample for all chains will be used for calculation.
Roberts, G.O. (1996): Markov Chain Concepts Related to Sampling Algorithms. In: W.R. Gilks, S. Richardson and D.J. Spiegelhalter (Eds.): Markov Chain Monte Carlo in Practice. Chapman and Hall, London, UK.
BRugs
, help.WinBUGS