brinla

Errata in Bayesian Regression with INLA

INLA is not strongly dependent on random number generation (unlike MCMC!) but it does sometimes use simulation as part of the calculation. You will find that if you repeat the same command, you may get slightly different output. Hence, you may find that if you repeat the same commands as seen in the book, you might not get exactly the same answer. This is usually not a serious concern bearing in mind that the last letter of INLA stands for approximation and exact answers are not to be expected.

spde <- inla.spde2.matern(mesh, alpha=alpha, constr = FALSE,
  prior.tau = tau0,
  prior.kappa = kappa0,
  theta.prior.prec = 1e5)

The value of theta.prior.prec is intentionally large to ensure prior is respected.

We must add the option control.compute=list(return.marginals.predictor=TRUE) to get the marginal distributions needed for the subsequent calculation.