This document provides supplementary material and information to the article:

Hernvann, P.Y., Gascuel, D., Kopp, D., Robert, M., et Rivot, E. (2021). EcoDiet – A hierarchical Bayesian model to combine stomach, biotracer and literature data into diet matrix estimation. Ecological Applications.

Load the EcoDiet package

You can do it from the CRAN or from GitHub

#install.packages("EcoDiet")
library("EcoDiet")

Or you can do it from GitHub

#install.packages("devtools")
devtools::install_github("pyhernvann/EcoDiet", build_vignettes = TRUE, dependencies = TRUE)
library("EcoDiet")

Load the data

The data is available on the SEANOE repository where these .html files are located:

Hernvann, P.Y., Gascuel, D., Kopp, D., Robert, M., et Rivot, E. (2021). Showcasing EcoDiet, a novel hierarchical model to combine stomach, biotracer and literature data into diet matrix estimation: simulated and in situ trophic data. SEANOE.

The Celtic Sea data is available in the Celtic_Sea_data.RData file.

all_datasets_Celtic <- get(load("Celtic_Sea_data.RData"))

The three datasets, stomach content analyses, stables isotope analyses and literature knowledge can be extracted:

SCA_data_CelticSea <- all_datasets_Celtic[["SCA_CelticSea"]]
SIA_data_CelticSea <- all_datasets_Celtic[["SIA_CelticSea"]]
Literature_data_CelticSea <- all_datasets_Celtic[["Literature_CelticSea"]]

Transform the datasets into EcoDiet data input format

This allows pre-processing the Celtic Sea data and parametrizing EcoDiet so that the model can be run.

input_CelticSea <- preprocess_data(biotracer_data = SIA_data_CelticSea,
                        trophic_discrimination_factor = c(0.8, 3.4),
                        literature_configuration = TRUE,
                        stomach_data = SCA_data_CelticSea,
                        literature_diets = Literature_data_CelticSea,
                        nb_literature = 30,
                        literature_slope = 0.5)

A quick look at the data

Stomach content and biotracer analyses:

plot_data(biotracer_data = SIA_data_CelticSea)
## Warning: Use of `biotracer_data$group` is discouraged. Use `group` instead.