brianstock / MixSIAR

A framework for Bayesian mixing models in R:
http://brianstock.github.io/MixSIAR/
92 stars 75 forks source link

Isospace plot seems to plot incorrect values #315

Open BELB93 opened 2 years ago

BELB93 commented 2 years ago

Hello all. I am running MixSIAR with d13C and d15N data for four source items and three consumers. When I plot the data in isospace the source data has d13C values of -60, while in reality the .csv file contains values between -25 and -35. The values for d15N seem to be plotted correctly. What could be causing this? Changing the DTF of the sources doesn't appear to have an effect. WhatsApp Image 2022-06-22 at 3 44 50 PM

brianstock commented 2 years ago

Hi, sorry about that. I don't know why that is, the plot should just adjust the source means and SDs by the TDF means and SDs. Can you can post the first few lines of the source and TDF files? Do you have multiple versions of those files?

BELB93 commented 2 years ago

Hello Brian,

Thank you for getting back to me. I based my .csv files from those in the wolves example. Here are the excerpts:

DTF file: Meand13C SDd13C Meand15N SDd15N Original leaves -31.3239 0 7.567272 0 Plant detritus -30.886 0 0.849082 0 Source file (I used raw data): Source.name d13C d15N Age Category Animal detritus -28.9291 -1.22806 7 3 Animal detritus -26.7 2.7 7 3 Thank you so much for your time.

Warm regards, Brinna

On Fri, 24 Jun 2022 at 16:09, Brian Stock @.***> wrote:

Hi, sorry about that. I don't know why that is, the plot should just adjust the source means and SDs by the TDF means and SDs. Can you can post the first few lines of the source and TDF files? Do you have multiple versions of those files?

— Reply to this email directly, view it on GitHub https://github.com/brianstock/MixSIAR/issues/315#issuecomment-1165668193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZZAOKMSXFXSUZ3GL4ISMK3VQXFSBANCNFSM5ZX3ZEEA . You are receiving this because you authored the thread.Message ID: @.***>

brianstock commented 2 years ago

There's your problem - you're subtracting about 30 from the source d13C because you have -30 in the TDF file mean column.

BELB93 commented 2 years ago

Ah ok, so how should I fix this? These are the mean values for the d13C.

On Fri, 24 Jun 2022 at 18:00, Brian Stock @.***> wrote:

There's your problem - you're subtracting about 30 from the source d13C because you have -30 in the TDF file mean column.

— Reply to this email directly, view it on GitHub https://github.com/brianstock/MixSIAR/issues/315#issuecomment-1165761626, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZZAOKLLOMWXSBHPCKYQYNDVQXSRNANCNFSM5ZX3ZEEA . You are receiving this because you authored the thread.Message ID: @.***>

brianstock commented 2 years ago

TDF = tissue discrimination factor, and is an offset to account for cases where the source isotope values are modified before being expressed in the mixture. This commonly happens in consumer-prey diet analyses, especially for d15N where it is often around 3 per mille (which is why it is used to estimate trophic position). For d13C, the mean TDF should be entered in the meand13C column of the TDF file, and the SD of the TDF should be entered as SDd13C.

I don't know what your analysis is for, but -30 for a d13C TDF is quite odd.