dalmatian: A Package for Fitting Double Hierarchical Linear Models in R via JAGS and nimble

Simon Bonner, Ariane Mutzel, Han Na Kim, David Westneat, Jonathan Wright, Matthew Schofield

Research output: Contribution to journalArticlepeer-review

4 Scopus citations


Traditional regression models, including generalized linear mixed models, focus on understanding the deterministic factors that affect the mean of a response variable. Many biological studies seek to understand non-deterministic patterns in the variance or dispersion of a phenotypic or ecological response variable. We describe a new R package, dalmatian, that provides methods for fitting double hierarchical generalized linear models incorporating fixed and random predictors of both the mean and variance. Models are fit via Markov chain Monte Carlo sampling implemented in either JAGS or nimble and the package provides simple functions for monitoring the sampler and summarizing the results. We illustrate these functions through an application to data on food delivery by breeding pied flycatchers (Ficedula hypoleuca). Our intent is that this package makes it easier for practitioners to implement these models without having to learn the intricacies of Markov chain Monte Carlo methods.

Original languageEnglish
JournalJournal of Statistical Software
Issue number10
StatePublished - 2021

Bibliographical note

Publisher Copyright:
© 2021, American Statistical Association. All rights reserved.


  • Bayesian inference
  • Diversity patterns
  • Generalized linear models
  • Hierarchical models
  • Markov chain Monte Carlo
  • Structured residual variance
  • Variance patterns

ASJC Scopus subject areas

  • Software
  • Statistics and Probability
  • Statistics, Probability and Uncertainty


Dive into the research topics of 'dalmatian: A Package for Fitting Double Hierarchical Linear Models in R via JAGS and nimble'. Together they form a unique fingerprint.

Cite this