multigroup.vaccine models infectious disease dynamics in populations
with multiple distinct subgroups that have:
- Different vaccination rates
- Different vaccine effectiveness
- Differential contact patterns between and within groups
The package provides both an interactive Shiny dashboard and programmatic R functions for epidemiological modeling and outbreak forecasting.
install.packages("multigroup.vaccine",
repos = "https://epiforesite.r-universe.dev")# install.packages("remotes")
remotes::install_github("EpiForeSITE/multigroup-vaccine")The package depends on the following R packages:
- Imports:
deSolve,graphics,shiny,stats,bslib(>= 0.8.0),htmltools,socialmixr - Suggests:
knitr,rmarkdown,testthat(>= 3.0.0),ggplot2,epiworldR
Note that some vignettes require ggplot2 and other suggested packages.
Launch the Shiny dashboard for interactive modeling:
library(multigroup.vaccine)
run_my_app()The dashboard models two distinct sub-populations with differential within-group and across-group contact rates and different vaccination adherence levels. See Nguyen et al. (2024) for more details on this modeling approach.
You can also use the package functions directly in R scripts. Here’s an example of comparing populations with different vaccination rates:
# Compare populations with different vaccination rates
results <- getFinalSize(
vacPortion = c(0.9, 0.3), # 90% vs 30% vaccinated
popSize = c(10000, 10000), # Equal population sizes
R0 = 15, # Basic reproduction number
recoveryRate = 0.1, # 1/recovery rate = 10 days
relContact = 0.05, # 5% contact between groups
contactWithinGroup = c(0.8, 0.8), # 80% within-group contact
relSusc = c(0.1, 1) # 10% relative susceptibility if vaccinated
)
print(results)- Multi-group SIR modeling with vaccination and variable contact rates
- Age-structured population models using census data
- Contact matrix integration via POLYMOD and custom matrices
- Final outbreak size calculations using both analytic and stochastic methods
- Interactive Shiny dashboard for scenario exploration
- Real-world case studies including measles outbreaks with census data
Comprehensive documentation and vignettes are available at: https://epiforesite.github.io/multigroup-vaccine/
View all available vignettes:
browseVignettes("multigroup.vaccine")getOutputTable(): Run age-structured outbreak simulations with vaccinationgetFinalSize(): Calculate final outbreak size for two-group populationsgetFinalSizeDist(): Stochastic outbreak simulations with distributional resultstransmissionRates(): Calculate transmission rate matrices from R0 and contact patternscontactMatrixPolymod(): Generate age-structured contact matrices from POLYMOD datagetCensusData(): Download and process US Census Bureau population datarun_my_app(): Launch the interactive Shiny dashboard
- Bug reports: GitHub Issues
- Documentation: Package website
If you use this package in your research, please obtain citation information in R:
citation("multigroup.vaccine")For local development:
# Clone the repository
# git clone https://github.com/EpiForeSITE/multigroup-vaccine.git
# Install development dependencies
install.packages(c("devtools", "roxygen2", "pkgdown", "lintr"))
# Load the package for development
devtools::load_all()
# Run tests
devtools::test()
# Check package
devtools::check()This project is licensed under the MIT License - see the LICENSE.md file for details.
This package is part of the EpiForeSITE software ecosystem developed by the ForeSITE Group at the University of Utah. Development was supported by the Centers for Disease Control and Prevention’s Center for Forecasting and Outbreak Analytics (Cooperative agreement CDC-RFA-FT-23-0069).
EpiForeSITE: Epidemiological Forecasting and Scenario Modeling Initiative for Translational Epidemiology