MixSIAR icon indicating copy to clipboard operation
MixSIAR copied to clipboard

Question about Individual Dietary Sources & Resid_erro

Open iso-spot opened this issue 3 years ago • 1 comments

Hello,

I had two separate questions I was hoping that somebody could help with:

First, when I am modeling a continuous variable with multiple dietary source groups, is it possible to extract each of those sources individually after the model is constructed - both to collect any relevant values, and especially for plotting purposes? For example, in the alligator example, could I extract values and make a posterior estimate figure (like Figure 5) for Freshwater sources alone? I know that 'combine sources' was used a posteriori in the mantis example for a categorical variable - but this does not seem like what I am looking for, as I do not want to combine any of my sources, but simply consider the proportional input of them individually relative to my covariate(s) of interest.

Second, I noticed in my models that the results (e.g. LOOic values and rankings in a model set, and especially the posterior plots) changed depending on whether resid_err and/or process_err were FALSE or TRUE in the JAGS model structure. Could you explain the purposes of these two selections and how they might affect the inferences of my models (and subsequent figures)? I have seen both of these used as 'true' and 'false' in different examples in the vignettes (particularly resid_err), and as I do not know the reason why I am not sure which options to pick for my models.

Thank you!

iso-spot avatar May 02 '21 01:05 iso-spot

Sorry for the slow response, hope this is still useful.

  1. Yes. Assuming you have run the alligator ex model 5 and then up to g.post in the modify plots vignette, the easiest would be to filter the calculated data frame saved within the ggplot object. E.g.:
g.post$cont[[1]] # original fig 5 with all sources

original

library(tidyverse)
g.post$cont[[1]]$data <- g.post$cont[[1]]$data %>% filter(source=="Freshwater") # only keep freshwater
g.post$cont[[1]] # replot only freshwater

freshwater

  1. Take a look at the "Understanding MixSIAR error structures for mixture data" section of the MixSIAR description paper. That's a summary of the descriptions and results from the error structure paper.

brianstock avatar Jun 11 '21 16:06 brianstock