plot_continuous_var creates a plot of how the mixture proportions change according to a continuous covariate, as well as plots of the mixture proportions for the individuals with minimum, median, and maximum covariate values. Called by output_JAGS if any continuous effects are in the model.

plot_continuous_var(
  jags.1,
  mix,
  source,
  output_options,
  alphaCI = 0.05,
  exclude_sources_below = 0.1
)

Arguments

jags.1

output from run_model

mix

output from load_mix_data

source

output from load_source_data

output_options

list containing options for plots and saving, passed from output_JAGS or output_posteriors

alphaCI

alpha level for credible intervals (default = 0.05, 95% CI)

exclude_sources_below

don't plot sources with median proportion below this level for entire range of continuous effect variable (default = 0.1)

Details

MixSIAR fits a continuous covariate as a linear regression in ILR/transform-space. Two terms are fit for the proportion of each source: an intercept and a slope. The plotted line uses the posterior median estimates of the intercept and slope, and the lines are curved because of the ILR-transform back into proportion-space. The 95% credible intervals are shaded.

If the model contains both a continuous AND a categorical (factor) covariate, MixSIAR fits a different intercept term for each factor level and all levels share the same slope term.

See also

Francis et al. 2011