diff --git a/aj-content/practicals/siber-comparing-populations.Rmd b/aj-content/practicals/siber-comparing-populations.Rmd
index 92bfbbe..154b97b 100644
--- a/aj-content/practicals/siber-comparing-populations.Rmd
+++ b/aj-content/practicals/siber-comparing-populations.Rmd
@@ -267,7 +267,23 @@ bayes.overlap.G2.G3 <- bayesianOverlap("1.3", "1.4", ellipses.posterior,
n = 360)
print(bayes.overlap.G2.G3)
+
+```
+
+And summarise the credible intervals of the Bayesian overlap output. Note that this code does not work well on the small number of posterior draws we are using for this basic example - for one it returns negative values which is not possible, but is arising as the smoother has not got enough information to stay close to or within the positive number range.
+
+```{r}
+# and we can calculate the corresponding credible intervals using
+# our code from above again
+# call to hdrcde:hdr using lapply()
+overlap.credibles <- lapply(
+ as.data.frame(bayes.overlap.G2.G3),
+ function(x,...){tmp<-hdrcde::hdr(x)$hdr},
+ prob = cr.p)
+
+print(overlap.credibles)
```
+
diff --git a/aj-content/practicals/siber-comparing-populations.nb.html b/aj-content/practicals/siber-comparing-populations.nb.html
index e5ad09c..769c25f 100644
--- a/aj-content/practicals/siber-comparing-populations.nb.html
+++ b/aj-content/practicals/siber-comparing-populations.nb.html
@@ -14,1549 +14,40 @@
Comparing populations in isotope-space
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+ code{white-space: pre-wrap;}
+ span.smallcaps{font-variant: small-caps;}
+ span.underline{text-decoration: underline;}
+ div.column{display: inline-block; vertical-align: top; width: 50%;}
+ div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+ ul.task-list{list-style: none;}
+
+
+
+
+
+
+NA
+
+
+
+And summarise the credible intervals of the Bayesian overlap output. Note that this code does not work well on the small number of posterior draws we are using for this basic example - for one it returns negative values which is not possible, but is arising as the smoother has not got enough information to stay close to or within the positive number range.
+
+
+
+# and we can calculate the corresponding credible intervals using
+# our code from above again
+# call to hdrcde:hdr using lapply()
+overlap.credibles <- lapply(
+ as.data.frame(bayes.overlap.G2.G3),
+ function(x,...){tmp<-hdrcde::hdr(x)$hdr},
+ prob = cr.p)
+
+print(overlap.credibles)
+
+$area1
+ [,1] [,2]
+99% 79.16268 311.1822
+95% 106.50917 268.3878
+50% 164.79977 205.5054
+
+$area2
+ [,1] [,2]
+99% 56.25541 124.6480
+95% 57.20355 123.1461
+50% 76.40570 96.1009
+
+$overlap
+ [,1] [,2]
+99% -5.322731 50.81477
+95% -1.382026 46.61919
+50% 11.919114 32.73379
+
-LS0tCnRpdGxlOiAiQ29tcGFyaW5nIHBvcHVsYXRpb25zIGluIGlzb3RvcGUtc3BhY2UiCmF1dGhvcjogIkFuZHJldyBMIEphY2tzb24iCmRhdGU6ICJgciBmb3JtYXQoU3lzLnRpbWUoKSwgJyVkICVCLCAlWScpYCIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKYGBge3IsIGVjaG89RkFMU0UsIG1lc3NhZ2UgPSBGQUxTRSwgZmlnLndpZHRoID0gNywgZmlnLmhlaWdodCA9IDd9CgpsaWJyYXJ5KFNJQkVSLCBxdWlldGx5ID0gVFJVRSwKICAgICAgICB2ZXJib3NlID0gRkFMU0UsCiAgICAgICAgbG9naWNhbC5yZXR1cm4gPSBGQUxTRSkKCmxpYnJhcnkodmlyaWRpcykKcGFsZXR0ZSh2aXJpZGlzKDQpKQoKIyByZWFkIGluIHRoZSBkYXRhCm15ZGF0YSA8LSByZWFkLmNzdigiLi4vZGF0YS9leGFtcGxlX2xheW1hbl9kYXRhX2FsbC5jc3YiLAogICAgICAgICAgICAgICAgICAgaGVhZGVyPVRSVUUpCgojIGNyZWF0ZSB0aGUgc2liZXIgb2JqZWN0CnNpYmVyLmV4YW1wbGUgPC0gY3JlYXRlU2liZXJPYmplY3QobXlkYXRhKQoKIyBDcmVhdGUgbGlzdHMgb2YgcGxvdHRpbmcgYXJndW1lbnRzIHRvIGJlIHBhc3NlZCBvbndhcmRzIHRvIGVhY2ggCiMgb2YgdGhlIHRocmVlIHBsb3R0aW5nIGZ1bmN0aW9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3cyA9IDEwLCBwLmludGVydmFsID0gMC45NSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbiA9IDM2MCkKcHJpbnQoYmF5ZXMub3ZlcmxhcC5HMi5HMykKCgpgYGAKCkFuZCBzdW1tYXJpc2UgdGhlIGNyZWRpYmxlIGludGVydmFscyBvZiB0aGUgQmF5ZXNpYW4gb3ZlcmxhcCBvdXRwdXQuIE5vdGUgdGhhdCB0aGlzIGNvZGUgZG9lcyBub3Qgd29yayB3ZWxsIG9uIHRoZSBzbWFsbCBudW1iZXIgb2YgcG9zdGVyaW9yIGRyYXdzIHdlIGFyZSB1c2luZyBmb3IgdGhpcyBiYXNpYyBleGFtcGxlIC0gZm9yIG9uZSBpdCByZXR1cm5zIG5lZ2F0aXZlIHZhbHVlcyB3aGljaCBpcyBub3QgcG9zc2libGUsIGJ1dCBpcyBhcmlzaW5nIGFzIHRoZSBzbW9vdGhlciBoYXMgbm90IGdvdCBlbm91Z2ggaW5mb3JtYXRpb24gdG8gc3RheSBjbG9zZSB0byBvciB3aXRoaW4gdGhlIHBvc2l0aXZlIG51bWJlciByYW5nZS4KCmBgYHtyfQojIGFuZCB3ZSBjYW4gY2FsY3VsYXRlIHRoZSBjb3JyZXNwb25kaW5nIGNyZWRpYmxlIGludGVydmFscyB1c2luZwojIG91ciBjb2RlIGZyb20gYWJvdmUgYWdhaW4KIyBjYWxsIHRvIGhkcmNkZTpoZHIgdXNpbmcgbGFwcGx5KCkKb3ZlcmxhcC5jcmVkaWJsZXMgPC0gbGFwcGx5KAogIGFzLmRhdGEuZnJhbWUoYmF5ZXMub3ZlcmxhcC5HMi5HMyksIAogIGZ1bmN0aW9uKHgsLi4uKXt0bXA8LWhkcmNkZTo6aGRyKHgpJGhkcn0sCiAgcHJvYiA9IGNyLnApCgpwcmludChvdmVybGFwLmNyZWRpYmxlcykKYGBgCgoKCgo=
@@ -3015,7 +1550,7 @@ Overlap Between Ellipses
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
- $('tr.header').parent('thead').parent('table').addClass('table table-condensed');
+ $('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
@@ -3044,7 +1579,7 @@ Overlap Between Ellipses
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
- $(this).parent().toggleClass('nav-tabs-open')
+ $(this).parent().toggleClass('nav-tabs-open');
});
});
diff --git a/aj-content/practicals/source-aggregation.Rmd b/aj-content/practicals/source-aggregation.Rmd
index bb166e6..8dcff23 100644
--- a/aj-content/practicals/source-aggregation.Rmd
+++ b/aj-content/practicals/source-aggregation.Rmd
@@ -10,9 +10,9 @@ knitr::opts_chunk$set(echo = TRUE)
```
## Create some simulated data for us to work with
-This is essentially the example used in Fry, B. 2013. Alternative approaches for solving underdetermined isotope mixing problems. *MEPS*.
+This is essentially the example used in Fry, B. 2013. Alternative approaches for solving under-determined isotope mixing problems. *MEPS*.
-Here we use the package simmr to explore the two alternatives to aggregating sources in mixing models.
+Here we use the package `simmr` to explore the two alternatives to aggregating sources in mixing models.
```{r simulate-data}
library(simmr, quietly = TRUE)
@@ -38,8 +38,8 @@ S_sds = cbind(c(1,1,1,1), c(1,1,1,1))
# speficy the consumer data at the origin
# Ten consumers for this example around 0 with small sd of error.
-consumers <- cbind(dC = rnorm(10, 0, 0.1),
- dN = rnorm(10, 0, 0.1) )
+consumers <- cbind(dC = rnorm(n = 10, mean = 0, sd = 0.1),
+ dN = rnorm(n = 10, mean = 0, sd = 0.1) )
# and create the simmr object
# here we have no TDFs or concentration values
diff --git a/aj-content/practicals/source-aggregation.nb.html b/aj-content/practicals/source-aggregation.nb.html
index 870201a..4fbd171 100644
--- a/aj-content/practicals/source-aggregation.nb.html
+++ b/aj-content/practicals/source-aggregation.nb.html
@@ -14,1549 +14,40 @@
Source Aggregation
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+ code{white-space: pre-wrap;}
+ span.smallcaps{font-variant: small-caps;}
+ span.underline{text-decoration: underline;}
+ div.column{display: inline-block; vertical-align: top; width: 50%;}
+ div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+ ul.task-list{list-style: none;}
+
+
+
diff --git a/aj-content/siar-dos-and-donts.Rmd b/aj-content/siar-dos-and-donts.Rmd
index 9ef5ebe..ce17e68 100644
--- a/aj-content/siar-dos-and-donts.Rmd
+++ b/aj-content/siar-dos-and-donts.Rmd
@@ -88,6 +88,7 @@ p <- c(0.2, 0.4, 0.4)
consumer <- p %*% sources
+
plot(sources[,1], sources[,2], pch = c(15,15,15), col = c(1,6,4),
xlab = "", ylab = "", bty="L", cex = 3, xlim = c(-12,6),
ylim = c(-5, 10))