george:makov:smith:93 discuss Bayesian analysis of hierarchical models where the conjugate prior is adopted at the first level, but for any given prior distribution of the hyperparameters, the joint posterior is not of closed form. The example they consider relates to 10 power plant pumps. The number of failures is assumed to follow a Poisson distribution

where is the failure rate for pump *i* and is the length of operation time of the pump (in 1000s of hours). The data is shown below.

A conjugate gamma prior distribution is adopted for the failure rates:

george:makov:smith:93 assume the following prior specification for the hyperparameters and

They show that this gives a posterior for which is a gamma distribution, but leads to a non-standard posterior for . Consequently, they use the Gibbs sampler to simulate the required posterior densities.

Figure 2 shows the graph corresponding to the above model, and the associated `BUGS` analysis is given below.

**Figure 2:**
Graphical model for `pump` example.

**Model specification for pump example **

model pump; const N = 10; # number of pumps var theta[N], # failure rate of each pump x[N], # number of failures per pump t[N], # length of operation time alpha,beta, # parameters of gamma prior lambda[N]; # theta[]*t[] data t, x in "pump.dat"; inits in "pump.in"; { for (i in 1:N){ theta[i] ~ dgamma(alpha,beta); lambda[i] <- theta[i]*t[i]; x[i] ~ dpois(lambda[i]); } alpha ~ dexp(1.0); beta ~ dgamma(0.1,1.0); }

**Analysis**
A `BUGS` run of 1000 iterations took 2 seconds after a 500 iteration burn-in. Posterior mean estimates for selected parameters are listed below, together with the corresponding estimates obtained by george:makov:smith:93 (denoted *GM&S* estimate).

Tue Jun 8 09:17:20 EDT 1999