PC priors for residual correlation parameters in one-factor mixed models

  • Massimo VentrucciEmail author
  • Daniela Cocchi
  • Gemma Burgazzi
  • Alex Laini
Original Paper


Lack of independence in the residuals from linear regression motivates the use of random effect models in many applied fields. We start from the one-way anova model and extend it to a general class of one-factor Bayesian mixed models, discussing several correlation structures for the within group residuals. All the considered group models are parametrized in terms of a single correlation (hyper-)parameter, controlling the shrinkage towards the case of independent residuals (iid). We derive a penalized complexity (PC) prior for the correlation parameter of a generic group model. This prior has desirable properties from a practical point of view: (i) it ensures appropriate shrinkage to the iid case; (ii) it depends on a scaling parameter whose choice only requires a prior guess on the proportion of total variance explained by the grouping factor; (iii) it is defined on a distance scale common to all group models, thus the scaling parameter can be chosen in the same manner regardless the adopted group model. We show the benefit of using these PC priors in a case study in community ecology where different group models are compared.


Bayesian mixed models Group model One-way anova INLA Intra-class correlation Within group residuals 



Massimo Ventrucci and Daniela Cocchi are supported by the PRIN 2015 Grant Project No. 20154X8K23 (EPHASTAT) founded by the Italian Ministry for Education, University and Research. Gemma Burgazzi is supported by the Project PRIN NOACQUA—responses of communities and ecosystem processes in intermittent rivers a National Relevant Project funded by the Italian Ministry of Education and University (PRIN 2015, Prot. 201572HW8F). The authors thank Maria Franco Villoria and Hȧvard Rue for the stimulating comments received about this work.

Supplementary material

10260_2019_501_MOESM1_ESM.pdf (122 kb)
Supplementary material 1 (pdf 122 KB)


  1. Dawid A, Lauritzen S (2001) Compatible prior distributions. In: Bayesian methods with applications to sciences, policy and official statistics. Proceedings of the 6th world meeting. International Society for Bayesian Analysis, Office for Official Publications of the European Communities, p 642Google Scholar
  2. Finley AO, Banerjee S, Waldmann P, Ericsson T (2009) Hierarchical spatial modeling of additive and dominance genetic variance for large spatial trial datasets. Biometrics 65(2):441–451. MathSciNetCrossRefzbMATHGoogle Scholar
  3. Frühwirth-Schnatter S, Wagner H (2010) Stochastic model specification search for Gaussian and partial non-Gaussian state space models. J Econom 154(1):85–100. MathSciNetCrossRefzbMATHGoogle Scholar
  4. Frühwirth-Schnatter S, Wagner H (2011) Bayesian variable selection for random intercept modeling of Gaussian and non-Gaussian data. In: Bernardo JM, Bayarri MJ, Berger JO, Dawid AP, Heckerman D, Smith AFM, West M (eds) Bayesian statistics, vol 9. Oxford University Press, Oxford, pp 165–200CrossRefGoogle Scholar
  5. Fuglstad GA, Simpson D, Lindgren F, Rue H (2018) Constructing priors that penalize the complexity of Gaussian random fields. J Am Stat Assoc. CrossRefzbMATHGoogle Scholar
  6. Gelman A (2006) Prior distributions for variance parameters in hierarchical models (comment on article by Browne and Draper). Bayesian Anal 1(3):515–534. MathSciNetCrossRefzbMATHGoogle Scholar
  7. Heino J (2013) Environmental heterogeneity, dispersal mode, and co-occurrence in stream macroinvertebrates. Ecol Evol 3(2):344–355CrossRefGoogle Scholar
  8. Kass RE, Raftery AE (1995) Bayes factors. J Am Stat Assoc 90(430):773–795. MathSciNetCrossRefzbMATHGoogle Scholar
  9. Klein N, Kneib T (2016) Scale-dependent priors for variance parameters in structured additive distributional regression. Bayesian Anal 11(4):1071–1106MathSciNetCrossRefGoogle Scholar
  10. Kullback S, Leibler RA (1951) On information and sufficiency. Ann Math Stat 22:79–86MathSciNetCrossRefGoogle Scholar
  11. Lamouroux N, Dolédec S, Gayraud S (2004) Biological traits of stream macroinvertebrate communities: effects of microhabitat, reach, and basin filters. J N Am Benthol Soc 23(3):449–466CrossRefGoogle Scholar
  12. Lindgren F, Rue H, Lindström J (2011) An explicit link between gaussian fields and gaussian markov random fields: the stochastic partial differential equation approach. J R Stat Soc Ser B (Stat Methodol) 73(4):423–498. MathSciNetCrossRefzbMATHGoogle Scholar
  13. Ovaskainen O, Tikhonov G, Norberg A, Guillaume Blanchet F, Duan L, Dunson D, Roslin T, Abrego N (2017) How to make more out of community data? A conceptual framework and its implementation as models and software. Ecol Lett 20(5):561–576CrossRefGoogle Scholar
  14. Riebler A, Held L, Rue H (2012) Estimation and extrapolation of time trends in registry data—borrowing strength from related populations. Ann Appl Stat 6(1):304–333. MathSciNetCrossRefzbMATHGoogle Scholar
  15. Rue H, Martino S, Chopin N (2009) Approximate Bayesian inference for latent Gaussian models using inte-grated nested Laplace approximations (with discussion). J R Stat Soc B 71(2):319–392MathSciNetCrossRefGoogle Scholar
  16. Saville BR, Herring AH (2009) Testing random effects in the linear mixed model using approximate bayes factors. Biometrics 65(2):369–376. MathSciNetCrossRefzbMATHGoogle Scholar
  17. Simpson D, Rue H, Riebler A, Martins TG, Sørbye SH (2017) Penalising model component complexity: a principled, practical approach to constructing priors. Stat Sci 32(1):1–28. MathSciNetCrossRefzbMATHGoogle Scholar
  18. Sørbye S, Rue H (2017) Penalised complexity priors for stationary autoregressive processes. J Time Ser Anal 38:923–935 arXiv:1608.08941 MathSciNetCrossRefGoogle Scholar
  19. Sørbye S, Rue H (2018) Fractional gaussian noise: prior specification and model comparison. Environmetrics 29(5–6):e2457. MathSciNetCrossRefGoogle Scholar
  20. Ventrucci M, Rue H (2016) Penalized complexity priors for degrees of freedom in bayesian \(p\)-splines. Stat Model 16(6):429–453. MathSciNetCrossRefGoogle Scholar
  21. Verbeke G, Molenberghs G (2003) The use of score tests for inference on variance components. Biometrics 59(2):254–262. MathSciNetCrossRefzbMATHGoogle Scholar
  22. Warton DI, Blanchet FG, O’Hara RB, Ovaskainen O, Taskinen S, Walker SC, Hui FKC (2015) So many variables: joint modeling in community ecology. Trends Ecol Evol 30(12):766–779. CrossRefGoogle Scholar
  23. Wisz MS, Pottier J, Kissling WD, Pellissier L, Lenoir J, Damgaard CF, Dormann CF, Forchhammer MC, Grytnes JA, Guisan A et al (2013) The role of biotic interactions in shaping distributions and realised assemblages of species: implications for species distribution modelling. Biol Rev 88(1):15–30CrossRefGoogle Scholar
  24. Zuur A, Ieno EN, Walker N, Saveiliev AA, Smith GM (2009) Mixed effects models and extensions in ecology with R. Springer, New York. ISBN: 978-0-387-87457-9Google Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Department of Statistical SciencesUniversity of BolognaBolognaItaly
  2. 2.Department of Chemistry, Life Sciences and Environmental SustainabilityUniversity of ParmaParmaItaly

Personalised recommendations