**
**The Inference Menu

Contents

General properties

Samples...

Compare...

Correlations...

Summary...

Rank...

DIC...

General properties
[top]

These menu items open dialog boxes for making inferences about parameters of the model. The commands are divided into three sections: the first three commands concern an entire set of monitored values for a variable; the next two commands are space-saving short-cuts that monitor running statistics; and the final command, DIC..., concerns evaluation of the
*Deviance Information Criterion
* proposed by
Spiegelhalter et al. (2002
__)
__
.
**Users should ensure their simulation has converged before using Summary..., Rank... or DIC...
***
*Note that if the MCMC simulation has an adaptive phase it will not be possible to make inference using values sampled before the end of this phase.

Samples...
[top]

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:

** node:
**The variable of interest must be typed in this text field. If the variable of interest is an array, slices of the array can be selected using the notation variable[lower0:upper0, lower1:upper1, ...].
The buttons at the bottom of the dialog act on this variable. A star '*' can be entered in the node text field as shorthand for all the stored samples. These buttons are arranged in two groups: the first group is associated with quantities of substantive interest while the second group gives information about how well the simulation is performing.

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.

OpenBUGS 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 OpenBUGS Graphics ).

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

Compare... [top]

Select

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

Correlations... [top]

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. Th e 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 OpenBUGS will not permit the calculation of DIC and so the menu option is grayed out. Please see the OpenBUGS web-page for current restrictions:

set

clear

stats

The stats button generates the following statistics:

Dbar

Dhat

pD

DIC

DIC = Dhat + 2 * pD