# Statistical models for Stable Isotope Sourcing

I am driven by the challenge of developing new statistical methods for biology, ecology, brain imaging, and public health. Part of that work is reflected below in my interdisciplinary work developing models for stable isotope sourcing (modeling diet foodwebs).  Note that the first two publications below are the only two stable isotope statistical model papers I’m aware of published in statistical journals, thus have undergone rigorous peer review.

Bayesian analysis of diet
Erhardt, EB and EJ Bedrick (2013). “A Bayesian framework for stable isotope mixing models”. Environmental and Ecological Statistics 20 (3). pdf, pp. 377–397. issn: 1352-8505. doi: 10.1007/s10651-012-0224-1.

Frequentist analysis of diet
Erhardt, EB and EJ Bedrick (2014). “Inference for stable isotope mixing models: a study of the diet of dunlin”. Journal of the Royal Statistical Society: Series C. pdf, online, to appear. doi: 10.1111/rssc.12047. url: http://onlinelibrary.wiley.com/doi/10.1111/rssc.12047/abstract.

Underdetermined model of diet without variation (SISUS, please use this citation)
Erhardt, EB, BO Wolf, M Ben-David, and EJ Bedrick (May 2014). “Stable Isotope Sourcing using Sampling”. Open Journal of Ecology 4 (6). pdf, pp. 289–298. doi: 10.4236/oje.2014.46027.
This paper provides a mathematical description and R package for providing representative solutions of a solution polytope defined by an underconstrained linear system. That is, when there are many sources and few isotopes, what proportional combinations of sources describes a consumer’s diet? See below.

Stable isotope sourcing is used to estimate proportional contributions of sources to a mixture, such as in the analysis of animal diets, plant nutrient use, geochemistry, pollution, and forensics. We describe an algorithm implemented as SISUS software for providing a user-speci ed number of probabilistic exact solutions quickly from the basic mixing model. Our method outperforms IsoSource (Phillips and Gregg, 2003), a deterministic algorithm for providing approximate solutions to represent the solution polytope. Our method is an approximate Bayesian large sample procedure. SISUS software is freely available as an R package.

# SISUS R package

Notice: As of Nov 2014 I will no longer be hosting the web submission version of SISUS.  Please see the Getting Started manual for detailed instructions on how to install and run SISUS using R on your computer.  It is faster and nearly just as easy.

## Installation

1. Download sisus_3.9-14.tar.gz file to C:\ (or other easy-to-find location).
2. In R, run: install.packages(“/path/to/file/sisus_3.9-14.tar.gz”), these should be forward-slashes for the path.
3. It should now be installed.

If the steps above don’t install SISUS, then follow the remaining directions:

• Determine your R program path, something like: “C:\Program Files\R\R-3.2.2\bin\x64\R”
• Open up a command window (start menu, type “cmd” into “search programs and files” text box, run the command prompt).
• Substitute your R program path in the following command: “C:\Program Files\R\R-3.1.2\bin\x64\R” CMD INSTALL C:\sisus_3.9-14.tar.gz
• This will install the current version of SISUS to fix your problems.
• Close the command prompt.
• Run R and try sisus again with your files.
• Finally, delete the C:\sisus_3.9-14.tar.gz file.

## Visual distinction between IsoSource and SISUS

Bear example, brown bear hair as a mixture of S = 3 sources, salmon, meat, and fruit, using I = 2 isotopes of carbon (i = 1) and nitrogen (i = 2), reused from Koch and Phillips (2002, Table 1). Concentration for carbon is the proportion of carbon in dry matter, and concentration for nitrogen is the proportion crude protein in dry matter times the proportion nitrogen in protein. Assimilation for carbon is the digestible proportion of dry matter, and assimilation for nitrogen is the digestible proportion of dry matter times the protein digestibility proportion. The product of our these concentration and assimilation values are what Koch and Phillips (2002) report as Digest C and Digest N. Our results differ from theirs because they use Digest [C] and Digest [N] in their calculations, which is the Digest X divided by the proportion digestible dry matter.

```                  Isotope Ratios  Discrim       Concent  Assim.Effic.
dC   dN    DC  DN    [C]   [N]     c     n
Mixture Brown Bear    -20.3 10.9
Source  Salmon        -20.5 13.2  1.2 2.3   0.548 0.118   1.00  1.00
Source  Meat          -21.5  3.9  4.9 4.0   0.515 0.141   1.00  1.00
Source  Fruit         -26.6 -0.9  3.3 4.1   0.45  0.0126  0.634 0.571```

We analyze the bear example for the carbon isotope only, that is, excluding the nitrogen information, using the assimilation model (AECDMM) of (Martinez del Rio, Carlos and Wolf, Blair. O Starck, J Matthias and Wang, Tobias and Wang, Tobias (ed.) Mass-Balance models for animal isotopic ecology, chapter 6. Science Publishers, Inc., Enfield, NH, USA, 2005, 141-174). For the AECDMM using carbon only, the matrix needed for IsoSource is

```Mixture = 0
Sources = 0.548 1.906 -0.856```

The images below show the simplex and carbon hyperplanes and their intersection solution polytope as a line. Image (a) shows an example of the IsoSource deterministic sampling strategy, with a grid increment of 0.02 and tolerance of 0.1 where 117 of the 1326 points evaluated are determined approximate solutions. Image (b) shows one realization of R = 117 exact probabilistic solutions from SISUS which are qualitatively similar to deterministic approximate solutions of IsoSource, yet algorithmic advantages are clear. In practice, sample sizes of R = 1000 or R = 10000 might be used for an accurate representation of the solution polytope.

 (a) IsoSource evaluates points on the lattice over the simplex, returning 117 approximate solutions of the 1326 evaluated points. Notice that the points evaluated are uniform over the simplex, but the approximate solutions provided are only roughly uniform near the solution polytope. (b) SISUS samples exact solutions uniformly over the solution polytope. Here R=117 solutions are requested to match IsoSource and to illustrate that the solutions are from a uniform distribution at random; samples converge quickly to a uniform distribution over the entire solution polytope.

## Requirements

Microsoft Excel or other software (such as OpenOffice.org for Mac OS X, Linux, Windows, etc.) to read, modify, and write the input workbook in xls format, and perl.

When using OpenOffice.org, if an error occurs, first try setting the cell format of all numeric fields to Numeric.