summary_stat {MixSIAR} | R Documentation |
Summary statistics from posterior of MixSIAR model
Description
summary_stat
prints and saves summary statistics
Usage
summary_stat(
combined,
toprint = "all",
groupby = "factor",
meanSD = TRUE,
quantiles = c(0.025, 0.25, 0.5, 0.75, 0.975),
savetxt = TRUE,
filename = "summary_statistics"
)
Arguments
combined |
list, output from |
toprint |
vector, which parameters to print? Options are: |
groupby |
character, group stats by "factor" or "source"? I.e. in wolves example, group proportions by Region 1, Region 2, Region 3
( |
meanSD |
|
quantiles |
vector, which quantiles to print. Default = |
savetxt |
|
filename |
character, file name to save results as ( |
See Also
combine_sources
and plot_intervals
Examples
## 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")))
summary_stat(combined)
summary_stat(combined, savetxt=FALSE)
summary_stat(combined, meanSD=FALSE)
summary_stat(combined, quantiles=c(.05,.5,.95))
summary_stat(combined, toprint="fac1")
summary_stat(combined, toprint="p")
summary_stat(combined, toprint="global")
## End(Not run)