AndrewLJackson / SIBER

ellipse and convex hull fitting package for stable isotope data
36 stars 14 forks source link

Community metrics seemingly mismatched from graphical output - which to trust? #93

Closed naalipalo closed 1 year ago

naalipalo commented 1 year ago

Ive been looking at the community metrics from my data and they seem to be swapped? But maybe I am missing something?

These are the calculated output:

             East                   West
dY_range     0.08227            0.162735
dX_range         0.473378           0.471176
TA           0.002754           0.030579
CD           0.204471           0.198819
MNND             0.174225           0.243298
SDNND            0.230331           0.113349

According to the interpretation of these Layman metric's Y range (or nitrogen range) is smaller for East than West, where as the Carbon range is nearly identical. The Mean Nearest Neighbor Distance is smaller for East than West. The total area of these communities would seem that the East covers less of the plotted area, like significantly smaller than the West. However, I plotted the information and visually, this does not add up at all. Visually, the East is 2x the size of the West and the West has more clustered data.

Graph of the EAST data image

Graph of the WEST data image

Am I not understanding the underlying math? Am I missing something visually? Am I misinterpreting the Layman paper describing these statistics? a larger range in d15N among consumers suggests more trophic levels and thus a greater degree of trophic diversity. Clearly from the graphical output, the West has a much smaller range than the East. Yet, the calculations produced by SIBER say that the East has the smaller range? What is happening? From the graphical output the West looks to have more clusters than the East, thus should have the smaller MNND...

I am running all of this through the same scripts I have used for other projects on other data. I don't see how the scripts could be swapping the labels but its possible??? maybe? Is there any possible way that I am interpreting things incorrectly or SIBER is swapping those labels for the community metrics?

AndrewLJackson commented 1 year ago

the community metrics are derived from the mean of each of the communities and is not based on the distribution of the actual data points. This is discussed in the original paper and in the vignette Introduction-to-SIBER