
STbayes (ST standing for social transmission) is an R package for building, fitting and interpreting Bayesian network-based diffusion analyses (NBDA). NBDA models are generally used to identify i) whether social transmission is occurring, ii) correlates of asocial learning and social transmission, iii) pathways of transmission.
An overview of the package is now published as an application article in Methods in Ecology and Evolution.
Installation
The functions of this package depend on cmdstanr, posterior, bayestestR, data.table and loo. You can install cmdstanr by following these instructions.
Vignettes use packages NBDA (install with devtools::install_github("whoppitt/NBDA"), igraph, dplyr, ggplot2, and ggpubr.
To install the development version of STbayes:
# install devtools if not already
if (!require("devtools")) install.packages("devtools")
devtools::install_github("michaelchimento/STbayes")Features:
- TADA (acquisition time known) and OADA (only acquisition order known) model types.
- static and dynamic networks.
- multi-network comparison (with static or dynamic networks).
- multiple trials with the same set, subsets, or different sets of individuals.
- constant and time-varying ILVs for additive and multiplicative transmission models.
- varying effects by individual, by trial, or by both for any parameter.
- easy workflow for ELPD (loo-psis, waic) model comparison.
- propagation of uncertainty from network measures to transmission model
- modeling of complex transmission and contagion