1.2 Fitting the model

The models are fit the statistical software R version 3.6.1 (R Core Team 2019) using the INLA package version 18.07.12 (Rue et al. 2017). It fits Bayesian models using Integrated Nested Laplace Approximation (INLA). Fitting Bayesian models imply select prior distributions for a number of parameters.

  • \(\beta_0\), \(\beta_1\) and \(\beta_2\) use a Gaussian prior with 0 mean and variance 1000 \(\mathcal{N}(0, 1000)\)
  • \(\sigma^2_y\) uses a PC prior with \(u = 0.25\) and \(\alpha = 0.5\)
  • \(\sigma^2_s\) uses a PC prior with \(u = 0.6\) and \(\alpha = 0.5\)
  • \(\sigma^2_p\) uses a PC prior with \(u = 0.3\) and \(\alpha = 0.5\)
  • \(n\) is modelled as \(n = e^\theta\) with a \(\theta \sim \Gamma(e^{-7}, e^{-7})\)

A PC (penalised complexity) prior is defined by two parameters \(u\) and \(\alpha\). \(u\) defines a threshold value for \(\sigma\), and \(\alpha\) defines the probability that the estimated \(\sigma\) exceeds this threshold value (1.9). The density of this prior is given in (1.10).

\[\begin{align} P(\sigma > u) &= \alpha \tag{1.9} \\ \pi(\tau) &= \frac{\lambda}{2}\tau^{-3/2}exp(-\lambda\tau^{-1/2}) \tag{1.10} \\ \lambda &= -\frac{\log(\alpha)}{u} \end{align}\]

References

R Core Team. 2019. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.

Rue, Håavard, Andrea I. Riebler, Sigrunn H. Sørbye, Janine B. Illian, Daniel P. Simpson, and Finn K. Lindgren. 2017. “Bayesian Computing with INLA: A Review.” Annual Reviews of Statistics and Its Applications 4 (March): 395–421. http://arxiv.org/abs/1604.00860.