Question

I am calculating the bayesian posterior distribution of some metrics (Layman, C.A., Arrington, D.A., Montana, C.G., & Post, D.M. (2007) Can stable isotope ratios provide for community-wide measures of trophic structure? Ecology, 88, 42-48.) with a grouping variable G so I wish to obtain the posterior distribution for each level of G

I am using the function siber.hull.metrics function from siar package,

require(siar)
data(geese2demo)

gee <-data.frame(geese2demo)

summary(gee)
unique(gee$Group)

# There are 8 groups

me <- siber.hull.metrics(gee$d13CPl,gee$d15NPl,gee$Group,R=10^3)

# I expect 8000 rows, 1000 per group

nrow(me)

siber.hull.metrics

I looked at the function's code and still don't understand what is doing with the groups, besides there is a bug: the repetitions are fixed at 10^4.

Was it helpful?

Solution

I think you are mistaking the two methods that comprise SIBER.

The "hull based" approach that calculates convex hull area, dN_range, distance to centroid etc... can only be fitted to entire communities. That is, in your case, it will estimate TA, CD etc... to all eight of your community members. You cannot use this method to calculate these metrics on the individual community members of your community.

If instead you wish to compare the 8 community members with each other, then you will need to use the siber.ellipses() function instead.

This is a common source of confusion. I have two podcasts explaining this, along with some example data files here: http://www.tcd.ie/Zoology/research/research/theoretical/Rpodcasts.php#siber

thanks for fwding on to me on twitter, and thanks again for the bug tip. I have logged this as part of ongoing work to roll out a substantially updated package.

cheers

Andrew Jackson @yodacomplex

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top