brianstock / MixSIAR

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

running mixSIAR if some sources have only 1 sample #124

Open BelindaCannell opened 6 years ago

BelindaCannell commented 6 years ago

For some of my sources I only have 1 sample. When I draw the isospace plot many error messages are given, and the single sources are not located correctly on the isospace plot. Also the model does not run. So is there any way of being able to use mixSIAR with a mixture of some single sources and other sources with a small n?

brianstock commented 6 years ago

Hi Belinda,

MixSIAR wants to know something about the variability of the source data, since this influences the mixing process. You'll have to treat your source data as "means + SD + N", and tell the model to fix the source means at the values you have by inputting some arbitrary small SD and large N. In this case, do not use the multiplicative / process error because that constructs the mix variance from the source variance. Use "residual error only" option for the error structure.

andrewcparnell commented 5 years ago

HI. Apologies for re-looking at this, but MixSIAR should really produce a useful error when people put in n=1 in the sources document. Just spent a very miserable half hour looking through someone's code (and opaque JAGS error) only to find that this was it.