This command opens a non-modal dialog for analysing stored samples of variables produced by the MCMC simulation.

It is incorrect to make statistical inference about the model when the simulation is in an adaptive phase. For this reason some of the buttons in the samples dialog will be grayed out during any adaptive phase.

The dialog fields are:

Rather than calculating a single value of R, we can examine the behaviour of R over iteration-time by performing the above procedure repeatedly for an increasingly large fraction of the total iteration range, ending with all of the final T iterations contributing to the calculation as described above. Suppose, for example, that we have run 1000 iterations (T = 500) and we wish to use the resulting sample to calculate 10 values of R over iteration-time, ending with the calculation involving iterations 501-1000. Calculating R over the final halves of iterations 1-100, 1-200, 1-300, ..., 1-1000, say, will give a clear picture of the convergence of R to 1 (assuming the total number of iterations is sufficiently large). If we plot against the starting iteration of each range (51, 101, 151, ..., 501), then we can immediately read off the approximate point of convergence, e.g.

BUGS automatically chooses the number of iterations between the ends of successive ranges: max(100, 2T / 100). It then plots R in red, B (pooled) in green and W (average) in blue. Note that B and W are normalised so that the maximum estimated interval width is one - this is simply so that they can be seen clearly on the same scale as R. Brooks and Gelman (1998) stress the importance of ensuring not only that R has converged to 1 but also that B and W have converged to stability. This strategy works because both the length of the chains used in the calculation and the start-iteration are always increasing. Hence we are guaranteed to eventually (with an increasing sample size) discard any burn-in iterations and include a sufficient number of stationary samples to conclude convergence.

In the above plot convergence can be seen to occur at around iteration 250. Note that the values underlying the plot can be listed to a window by right-clicking on the plot, selecting Properties, and then clicking on Data (see BUGS Graphics).

See BUGS Graphics for details of how to customize these plots.

By default, the distributions are plotted in order of the corresponding variable's index in

(The default value of the baseline shown on the plot is the global mean of the posterior means.)

There is a special "property editor" available for box plots, as indeed there is for all graphics generated via the

model fit:

Where appropriate, either or both axes can be changed to a logarithmic scale via a property editor

This non-modal dialog box is used to plot out the relationship between the simulated values of selected variables, which must have been monitored.

nodes

scatter:

matrix:

The calculations may take some time.

This non modal dialog box is used to calculate running means, standard deviations and quantiles. The commands in this dialog are less powerful and general than those in the

node:

set

stats

means

clear:

This non-modal dialog box is used to store and display the ranks of the simulated values in an array.

node

set

stats

histogram

clear

The

It is important to note that DIC assumes the posterior mean to be a good estimate of the stochastic parameters. If this is not so, say because of extreme skewness or even bimodality, then DIC may not be appropriate. There are also circumstances, such as with mixture models, in which BUGS can not calculate DIC. Please see the BUGS web-page for current restrictions:

set

clear

stats

The stats button generates the following statistics:

Dbar

Dhat

DIC

WAIC

pD

Currently there are problems with the calculation of DIC and WAIC when the MCMC simulation is distributed over multiple cores. We use a different way of calculating pD in this case as one half of the variane of the deviance. We can calculate WAIC and pW easily for each MCMC chain but have no way of calculating values of these two quantites using all chains. We therefore quote WAIC and pW for each chain.