An alternative, and perhaps more efficient, parameterisation is to consider the precision of the random effects as a hyperparameter. The essential changes to the previous model area as follows.
The graph is shown in Figure 13.
As introduced in Section 9.5 of the manual, we need to be careful
in deriving the full conditional sampling distribution for
. If we were to leave the construction of this distribution
to BUGS, a likelihood term would be included for each
: however, the likelihood for
is not the product
of these terms. Therefore we have to calculate algebraically the
full conditional distribution for
and put it in the
BUGS model specification: as in the sampling distributions for the
's the precedence rule in BUGS then ensures that
the
terms that now appear in the apparent prior for
are not included as likelihood terms.
One can show that the conditional autoregressive model shown above is equivalent to the improper prior
which provides the correct likelihood term for
.
The essentials of the model specification (in iceCAR.bug) are shown below.
{
for (i in 1:I) {
cases[i] ~ dpois(mu[i]);
log(mu[i]) <- log(pyr[i]) + alpha[age[i]] + beta[year[i]]
}
for (k in 1:K){
betaprec[k] <- Nneighs[k] * tau;
}
d <- 0.0001 + sum(tau.like[])/2;
r <- 0.0001 + K/2;
tau ~ dgamma(r,d);
}
Figure 13:
Graphical model for ice example, using the undirected representation
(the intrinsic prior) for the random effects and a
hyperparameter
for their precision.
A simple BUGS run of 1000 iterations (following a 500 iteration burn-in) took
17 seconds. The results for all 3 models are shown below. We note
essentially the same results coming from the autoregressive and
the hyperparameter model, whereas the intrinsic prior model with
acting in the linear predictor is substantially different. After
a further 9000 iterations, this model still gave rather different results.
We therefore do not recommend this approach, and suggest putting
the full conditional distribution for the precision parameter.
breslow:clayton:93 estimated
to be .12 (SD .06).