Skip to contents



banner

STbayes (ST standing for social transmission) is a package for building and running Bayesian inferential models of social transmission across static or dynamic networks. Users may supply their own data in formats given below, or import nbdaData objects directly from the NBDA package.

There is now an associated preprint. The package is still under development, so if you run into a bug, please open an issue or contact me directly!

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 for strength of social transmission, baseline hazard rates, and other user defined ILVs.
  • easy workflow for ELPD (loo-psis, waic) model comparison.
  • propagation of uncertainty from network measures to transmission model
  • modeling of complex transmission and contagion