Bayesian Compartmental Infection Models from Individual Outcomes

Fit Bayesian compartmental infection models (such as susceptible-infected-recovered and multi-compartment hidden Markov variants) from individual-level outcome data. Models are composed from infection-process and observation-process components and fit using Stan via 'rstan'.


hestia

R-CMD-check lint pkgdown codecov DOI

{hestia} fits Bayesian compartmental infection models — such as susceptible-infected-recovered (SIR) and multi-compartment hidden Markov variants — from individual-level outcome data. Models are composed from infection-process and observation-process components and fit using Stan via {rstan}.

Installation

remotes::install_github("ACCIDDA/hestia", build = TRUE)

Requires R >= 4.1.0 and a C++ toolchain (for Stan model compilation).

Usage

Compose an infection-process model from transmit() (transmission between compartments) and progress() (within-host progression) steps:

library(hestia)

# A basic SIR model: S -> I transmission, I -> R recovery (rate fit from data)
inf_process <- make_infection_model(
  transmit(from = "S", to = "I"),
  progress(from = "I", to = "R", gamma = NA)
)

Pair the infection process with an observation model (make_observation_model()) and fit it with run_model(). See the vignettes for full worked examples, including a multi-compartment (symptomatic/asymptomatic) model.

Part of ACCIDDA

{hestia} is developed by the Atlantic Coast Center for Infectious Disease Dynamics and Analytics (ACCIDDA).

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("hestia")

0.1.0 by Claire Perrin Smith, 8 hours ago


https://accidda.github.io/hestia/, https://github.com/ACCIDDA/hestia


Report a bug at https://github.com/ACCIDDA/hestia/issues


Browse source code at https://github.com/cran/hestia


Authors: Claire Perrin Smith [aut, cre] (ORCID: , Jack Goodall [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports checkmate, dplyr, flexstanr, methods, posterior, Rcpp, RcppParallel, rstan, rstantools, stats, tidyr

Suggests bayesplot, ggplot2, knitr, lintr, patchwork, pkgload, rmarkdown, roxygen2, roxyglobals, spelling, testthat, withr

Linking to BH, Rcpp, RcppEigen, RcppParallel, rstan, StanHeaders

System requirements: GNU make


See at CRAN