MixSIAR
MixSIAR copied to clipboard
Extracting predicted contributions of a given biotracer for a given resource
Hello,
I am trying to calculate an estimate of model fit (analogous to an R^2 value), but for each biotracer considered in the mixing model. My idea is/was to extract the predicted contribution of a given source (as described in the MixSIAR paper), and then compare that prediction with the actual values being fed into the model.
As far as I can tell, there is an aggregation procedure somewhere upstream of the MixSIAR outputs, where the individual biotracer contributions for a given resource are combined to the resource level.
Is there a way to extract the fitted proportions of a particular biomarker to the model prior to those fatty acids being aggregated to the resource composite level?
Hi,
Sorry for the slow response... I think you would need the model predicted tracer values, and then compare these to the tracer observations. The proportions/contributions are estimated parameters, not data fed into the model.
mix.mu[iso,i]
is the predicted tracer value for tracer iso
, data point i
. https://github.com/brianstock/MixSIAR/blob/master/R/write_JAGS_model.R#L527. So you could compare the observed tracer datapoint, X_iso[i,iso]
, to the predicted value, except that mix.mu
is not passed to JAGS as a parameter to save, e.g. in jags.params
here.
Perhaps you want posterior predictive checks?