
Bayesian analysis in practice 125
Fully observed variables:
ny
The element model$BUGSoutput contains the actual MCMC output and
can be made accessible from within the R session with the command
6
attach.bugs(model$BUGSoutput)
After this is launched, it is possible to work directly on the simulated arrays
for each variable
7
. For instance, it is easy to produce a graphical representation
of the posterior distribution of θ,bytypinghist(theta), which produces the
result shown in Figure 4.1.
Histogram of theta
theta
Frequency
0.488 0.489 0.490 0.491 0.492 0.493
0 50 100 150 200 250
FIGURE 4.1
A histogram from the posterior distribution of the probability of a female ...