arXiv Science⌕ Search

arXiv subjects

Richard Inger

Publications and source records attributed to Richard Inger.

4 recordsLinked to original sources

Fitting Bayesian stable isotope mixing models in under a second with prior-data fitted networks

Bayesian mixing models, most widely through the MixSIAR software, are the standard way to estimate diet and source proportions from stable isotopes and other biotracers. MixSIAR fits each model by Markov chain Monte Carlo (MCMC), which takes minutes to hours and often fails to converge at standard run lengths. We present MixSIARPFN, which replaces MixSIAR's MCMC with prior-data fitted networks: transformer networks trained once on millions of datasets simulated from MixSIAR's own model and priors. For a new dataset, they return the posterior distribution of every diet proportion and model parameter in a single pass. The networks cover MixSIAR's model class, and an R package keeps MixSIAR's input files and function calls. On 400 simulated datasets with known diets, held out from all development, MixSIARPFN was 3% to 4% less accurate than MCMC on average for MixSIAR's usual error structures, and its 95% intervals contained the true diet as often (96% to 97% of the time). Each fit took under a second on one processor core, over 3,000 times faster than MixSIAR. When simulated data broke MixSIAR's assumptions, MixSIARPFN lost accuracy no faster than MCMC, except with heavy-tailed or skewed errors in one design (up to 13% less accurate). It matched MixSIAR closely on five of MixSIAR's nine real examples. It differed more on the geese and wolves examples, but MixSIAR's own model fits these data poorly, and changing MixSIAR's error structure moved its answer as much as switching to MixSIARPFN. A sensitivity analysis of 3,600 fits took an hour instead of about half a year. MixSIARPFN makes Bayesian mixing models practical where MCMC is not, so that users can fit every candidate model, analyse many datasets and test sensitivity to discrimination factors and priors. We recommend confirming the final model with MCMC where the data fit the model poorly or conclusions rest on small differences.

stat.AP↗

cosimmr: an R package for fast fitting of Stable Isotope Mixing Models with covariates

The study of animal diets and the proportional contribution that different foods make to their diets is an important task in ecology. Stable Isotope Mixing Models (SIMMs) are an important tool for studying an animal's diet and understanding how the animal interacts with its environment. We present cosimmr, a new R package designed to include covariates when estimating diet proportions in SIMMs, with simple functions to produce plots and summary statistics. The inclusion of covariates allows for users to perform a more in-depth analysis of their system and to gain new insights into the diets of the organisms being studied. A common problem with the previous generation of SIMMs is that they are very slow to produce a posterior distribution of dietary estimates, especially for more complex model structures, such as when covariates are included. The widely-used Markov chain Monte Carlo (MCMC) algorithm used by many traditional SIMMs often requires a very large number of iterations to reach convergence. In contrast, cosimmr uses Fixed Form Variational Bayes (FFVB), which we demonstrate gives up to an order of magnitude speed improvement with no discernible loss of accuracy. We provide a full mathematical description of the model, which includes corrections for trophic discrimination and concentration dependence, and evaluate its performance against the state of the art MixSIAR model. Whilst MCMC is guaranteed to converge to the posterior distribution in the long term, FFVB converges to an approximation of the posterior distribution, which may lead to sub-optimal performance. However we show that the package produces equivalent results in a fraction of the time for all the examples on which we test. The package is designed to be user-friendly and is based on the existing simmr framework.

stat.AP↗

simmr: A package for fitting Stable Isotope Mixing Models in R

We introduce an R package for fitting Stable Isotope Mixing Models (SIMMs) via both Markov chain Monte Carlo and Variational Bayes. The package is mainly used for estimating dietary contributions from food sources taken via measurements of stable isotope ratios from animals. It can also be used to estimate proportional contributions of a mixture from known sources, for example apportionment of river sediment, amongst many other use cases. The package contains a simple structure which allows non-expert users to interface with the package, with most of the computational complexity hidden behind the main fitting functions. In this paper we detail the background to these functions and provide case studies on how the package should be used. Further examples are available in the online package vignettes.

stat.AP↗

Bayesian Stable Isotope Mixing Models

In this paper we review recent advances in Stable Isotope Mixing Models (SIMMs) and place them into an over-arching Bayesian statistical framework which allows for several useful extensions. SIMMs are used to quantify the proportional contributions of various sources to a mixture. The most widely used application is quantifying the diet of organisms based on the food sources they have been observed to consume. At the centre of the multivariate statistical model we propose is a compositional mixture of the food sources corrected for various metabolic factors. The compositional component of our model is based on the isometric log ratio (ilr) transform of Egozcue (2003). Through this transform we can apply a range of time series and non-parametric smoothing relationships. We illustrate our models with 3 case studies based on real animal dietary behaviour.

stat.AP↗