# NOT RUN {
# first run mantis shrimp example
# combine 6 sources into 2 groups of interest (hard-shelled vs. soft-bodied)
# 'hard' = 'clam' + 'crab' + 'snail' # group 1 = hard-shelled prey
# 'soft' = 'alphworm' + 'brittlestar' + 'fish' # group 2 = soft-bodied prey
combined <- combine_sources(jags.1, mix, source, alpha.prior=alpha,
groups=list(hard=c("clam","crab","snail"), soft=c("alphworm","brittlestar","fish")))
# get posterior medians for new source groupings
apply(combined$post, 2, median)
summary_stat(combined, meanSD=FALSE, quantiles=c(.025,.5,.975), savetxt=FALSE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab