Learn R Programming

⚠️There's a newer version (2.5.0) of this package.Take me there.

EpiModel

Tools for simulating mathematical models of infectious disease dynamics. Epidemic model classes include deterministic compartmental models, stochastic individual-contact models, and stochastic network models. Network models use the robust statistical methods of exponential-family random graph models (ERGMs) from the Statnet suite of software packages in R. Standard templates for epidemic modeling include SI, SIR, and SIS disease types. EpiModel features an easy API for extending these templates to address novel scientific research aims.

Lead Authors

Additional contributors to EpiModel are listed on the contributors page.

Installation

The current release version can be found on CRAN and installed with:

install.packages("EpiModel", dependencies = TRUE)

To install this development version, use the remotes package:

if (!require("remotes")) install.packages("remotes")
remotes::install_github("statnet/EpiModel")

Documentation and Support

Website. The main website for EpiModel, with tutorials and other supporting files is http://epimodel.org/.

Methods Paper. A good place to start learning about EpiModel is the main methods paper published in the Journal of Statistical Software. It is available at http://doi.org/10.18637/jss.v084.i08.

Summer Course. Network Modeling for Epidemics is our annual 5-day course at the University of Washington where we teach the statistical theory, software tools, and applied modeling methods using EpiModel. Our course materials are open-source and updated annually around the time of the course.

Email listserv. Users are encouraged to join the email list for EpiModel as a place to ask questions, report bugs, and tell us about your research using these tools.

The EpiModel Gallery

We recently started a new EpiModel Gallery that contains templates of extensions to EpiModel, for now focused on network-based mathematical models. We will be continuing to add new examples the gallery, and encourage users to either file requests for new examples or contribute them following our guidelines.

Citation

If using EpiModel for teaching or research, please include a citation our main methods paper:

Jenness SM, Goodreau SM and Morris M. EpiModel: An R Package for Mathematical Modeling of Infectious Disease over Networks. Journal of Statistical Software. 2018; 84(8): 1-47. doi: 10.18637/jss.v084.i08

Please also send us an email if you have used EpiModel in your work so we can add the citation below.

Funding

The primary support for the development of these software tools and statistical methods has been by two National Institutes of Health (NIH) grants:

  • NIH R01 AI138783: EpiModel 2.0: Integrated Network Models for HIV/STI Prevention Science (PI: Samuel Jenness)
  • NIH R01 HD68395: Statistical Methods for Network Epidemiology (PI: Martina Morris)

Our applied research projects using EpiModel have received funding from the NIH and Centers for Disease Control and Prevention (CDC):

  • NIH R21 MH112449: Modeling Antiretroviral-Based Prevention among MSM in the US (PI: Samuel Jenness)
  • NIH R21 HD075662: Using Sexual Network Transmission Models to Explain HIV Disparities Between Black and White MSM (PI: Steven Goodreau)
  • NIH R01 AI108490: Integrated Bio-Social Models for HIV Epidemiology (MPIs: Steven Goodreau, Joshua Herbeck, and John Mittler)
  • CDC U38 PS004646: Enhancing Models of HIV, Viral Hepatitis, STIs, and Tuberculosis to Inform and Improve Public Health Impact (PI: Patrick Sullivan)

Our team also receives institutional support through the following center-level NIH grants:

  • NIH P30 AI050409: Center for AIDS Research at Emory University (MPIs: Carlos del Rio and James Curran)
  • NIH P30 AI027757: Center for AIDS Research at the University of Washington (PI: King Holmes)

EpiModel in the Scientific Literature

EpiModel and its extension packages have been used in the following scientific journal articles. (If you are aware of others, send us an email at samuel.m.jenness@emory.edu to be included in this list.)

HIV and Sexually Transmitted Infections

  1. Delaney KP, Rosenberg ES, Kramer MR, Waller LA, Sullivan PS. Optimizing Human Immunodeficiency Virus Testing Interventions for Men Who Have Sex With Men in the United States: A Modeling Study. Open Forum Infect Dis. 2015;2(4): ofv153. [LINK]

  2. Jenness SM, Goodreau SM, Morris M, Cassels S. Effectiveness of Combination Packages for HIV-1 Prevention in Sub-Saharan Africa Depends on Partnership Network Structure. Sexually Transmitted Infections. 2016; 92(8): 619-624. [LINK]

  3. Jenness SM, Goodreau SM, Rosenberg E, Beylerian EN, Hoover KW, Smith DK, Sullivan P. Impact of CDC’s HIV Preexposure Prophylaxis Guidelines among MSM in the United States. Journal of Infectious Diseases. 2016; 214(12): 1800-1807. [LINK]

  4. Jenness SM, Sharma A, Goodreau SM, Rosenberg ES, Weiss KM, Hoover KW, Smith DK, Sullivan P. Individual HIV Risk versus Population Impact of Risk Compensation after HIV Preexposure Prophylaxis Initiation among Men Who Have Sex with Men. PLoS One. 2017; 12(1): e0169484. [LINK]

  5. Goodreau SM, Rosenberg ES, Jenness SM, Luisi N, Stansfield SE, Millett G, Sullivan P. Sources of Racial Disparities in HIV Prevalence among Men Who Have Sex with Men in Atlanta, GA: A Modeling Study. Lancet HIV. 2017; 4(7):e311-e320. [LINK]

  6. Jenness SM, Weiss KM, Goodreau SM, Rosenberg E, Gift T, Chesson H, Hoover KW, Smith DK, Liu AY, Sullivan P. Incidence of Gonorrhea and Chlamydia Following HIV Preexposure Prophylaxis among Men Who Have Sex with Men: A Modeling Study. Clinical Infectious Diseases. 2017; 65(5): 712-718. [LINK]

  7. Vandormael A, Dobra A, Bärnighausen T, de Oliveira T, Tanser F. Incidence rate estimation, periodic testing and the limitations of the mid-point imputation approach. International Journal of Epidemiology. 2018; 47(1): 236-245. [LINK]

  8. Goodreau SM, Hamilton DT, Jenness SM, Sullivan PS, Valencia RK, Wang LY, Dunville RL, Barrios LC, Rosenberg ES. Targeting Human Immunodeficiency Virus Pre-Exposure Prophylaxis to Adolescent Sexual Minority Males in Higher Prevalence Areas of the United States: A Modeling Study. J Adolesc Health. 2018; 62(3): 311-319. [LINK]

  9. Herbeck JT, Peebles K, Edlefsen PT, Rolland M, Murphy JT, Gottlieb GS, Abernethy N, Mullins JI, Mittler JE, Goodreau SM. HIV population-level adaptation can rapidly diminish the impact of a partially effective vaccine. Vaccine. 2018;36(4): 514-520. [LINK]

  10. Luo W, Katz DA, Hamilton DT, McKenney J, Jenness SM, Goodreau SM, Stekler JD, Rosenberg ES, Sullivan P, Cassels S. Development of an Agent-Based Model to Investigate the Impact of HIV Self-Testing Programs for Men Who Have Sex with Men in Atlanta and Seattle. Journal of Medical Internet Research Public Health Surveillance. 2018; 4(2): e58. [LINK]

  11. Jenness SM, Maloney K, Smith SK, Hoover KW, Rosenberg ES, Goodreau SM, Weiss KM, Liu AY, Rao D, Sullivan PS. Addressing Gaps in HIV Preexposure Prophylaxis Care to Reduce Racial Disparities in HIV Incidence in the United States. American Journal of Epidemiology. 2019; 188(4): 743-752. [LINK]

  12. Stansfield SE, Mittler JE, Gottlieb GS, Murphy JT, Hamilton DT, Detels R, Wolinsky SM, Jacobson LP, Margolick JB, Rinaldo CR, Herbeck JT, Goodreau SM. Sexual Role and HIV-1 Set Point Viral Load among Men who Have Sex with Men. Epidemics. 2019; 26: 68-76. [LINK]

  13. Hamilton DT, Goodreau SM, Jenness SM, Sullivan PS, Wang LY, Dunville RL, Barrios LC, Rosenberg ES. Potential Impact of HIV Preexposure Prophylaxis Among Black and White Adolescent Sexual Minority Males: A Modeling Study. American Journal of Public Health. 2018; 108(S4): S284–S291. [LINK]

  14. Goodreau SM, Stansfield SE, Murphy JT, Peebles KC, Gottlieb GS, Abernethy NF, Herbeck JT, Mittler JE. Relational concurrency, stages of infection, and the evolution of HIV set point viral load. Virus Evolution. 2018; 4(2): vey032. [LINK]

  15. Goldstein ND, LeVasseur MT, Tran NK, Purtle J, Welles SL, Eppes SC. Modeling HPV vaccination scale-up among urban young men who have sex with men in the context of HIV. Vaccine. 2019; 37(29): 3883-3891. [LINK]

  16. Jones J, Weiss K, Mermin J, Dietz P, Rosenberg ES, Gift TL, Chesson H, Sullivan PS, Lyles C, Bernstein KT, Jenness SM. Proportion of Incident Human Immunodeficiency Virus Cases Among Men Who Have Sex With Men Attributable to Gonorrhea and Chlamydia: A Modeling Analysis. Sexually Transmitted Diseases. 2019; 46(6): 357-63. [LINK]

  17. Hamilton DT, Rosenberg ES, Jenness SM, Sullivan PS, Wang LY, Dunville RL, Barrios LC, Aslam M, Goodreau SM. Modeling the Joint Effects of Adolescent and Adult PrEP for Sexual Minority Males in the United States. PloS One. 2019; 14(5): e0217315. [LINK]

  18. Weiss KM, Jones J, Katz DA, Gift TL, Bernstein K, Workowski K, Rosenberg E, Jenness SM. Epidemiological Impact of Expedited Partner Therapy for Men Who Have Sex with Men: A Modeling Study. Sexually Transmitted Diseases. 2019; 46(11): 697–705. [LINK]

  19. Goldstein ND, LeVasseur MT, Tran NK, Purtle J, Welles SL, Eppes SC. Modeling HPV vaccination scale-up among urban young men who have sex with men in the context of HIV. Vaccine. 2019; 37(29): 3883-3891. [LINK]

  20. Weiss KM, Jones JS, Anderson EJ, Gift T, Chesson H, Bernstein K, Workowski K, Tuite A, Rosenberg ES, Sullivan PS, Jenness SM. Optimizing Coverage versus Frequency for Sexually Transmitted Infection Screening of Men Who Have Sex with Men. Open Forum Infectious Diseases. 2019; 6(10): ofz405. [LINK]

  21. Maloney KM, Driggers RA, Sarkar S, Anderson E, Malik A, Jenness SM. Expanded Choices with Greater HIV Prevention Benefits: A Mathematical Model of Long-Acting Injectable and Daily-Oral Pre-Exposure Prophylaxis. medRxiv. 2019; DOI: 10.1101/19012443. [LINK]

  22. Wang LY, Hamilton DT, Rosenberg ES, Aslam MV, Sullivan PS, Katz DA, Dunville RL, Barrios LC, Goodreau SM. Cost-Effectiveness of Pre-Exposure Prophylaxis Among Adolescent Sexual Minority Males. J Adolesc Health. 2019; pii: S1054-139X(19)30415-X. [LINK]

  23. Mittler JE, Murphy JT, Stansfield SE, Peebles KC, Gottlieb GS, Abernethy NF, Reid MC, Goodreau SM, Herbeck JT. Large benefits to youth-focused HIV treatment-as-prevention efforts in generalized heterosexual populations: An agent-based simulation model. PLoS Comput Biol. 2019 Dec 17;15(12):e1007561. [LINK]

  24. Jenness SM, Johnson JA, Hoover KW, Smith DK, Delaney K. Modeling an Integrated HIV Prevention and Care Continuum to Achieve the 2030 Ending the HIV Epidemic Goals. medRxiv. [LINK].

Other Infectious Diseases and Contagious Processes

  1. Ezenwa VO, Archie EA, Craft ME, Hawley DM, Martin LB, Moore J, White L. Host behaviour-parasite feedback: an essential link between animal behaviour and disease ecology. Proc Biol Sci. 2016; 283(1828). [LINK]

  2. Webber QM, Brigham RM, Park AD, Gillam EH, O’Shea TJ, Willis CK. Social network characteristics and predicted pathogen transmission in summer colonies of female big brown bats (Eptesicus fuscus). Behavioral Ecology and Sociobiology. 2016;70(5): 701-12. [LINK].

  3. Goldstein ND, Eppes SC, Mackley A, Tuttle D, Paul DA. A Network Model of Hand Hygiene: How Good Is Good Enough to Stop the Spread of MRSA? Infect Control Hosp Epidemiol. 2017; 38(8): 945-52. [LINK]

  4. White LA, Forester JD, Craft ME. Covariation between the physiological and behavioral components of pathogen transmission: Host heterogeneity determines epidemic outcomes. Oikos. 2018; 127(4): 538-52. [LINK].

  5. Robinson SJ, Barbieri MM, Murphy S, Baker JD, Harting AL, Craft ME, Littnan CL. Model recommendations meet management reality: implementation and evaluation of a network-informed vaccination effort for endangered Hawaiian monk seals. Proceeding of the Royal Society B. 2018; 285(1870): 20171899. [LINK].

  6. Goldstein ND, Jenness SM, Tuttle D, Power M, Paul DA, Eppes SC. Evaluating a neonatal intensive care unit HRSA surveillance programme using agent-based network modeling. Journal of Hospital Infection. 2018; 100(3): 337-43. [LINK]

  7. Haeussler K, Hout AV, Baio G. A dynamic Bayesian Markov model for health economic evaluations of interventions against infectious diseases. arXiv. arXiv:1512.06881. [LINK].

  8. Amirpour Haredasht S, Tavornpanich S, Jansen MD, Lyngstad TM, Yatabe T, Brun E, Martínez-López B. A stochastic network-based model to simulate the spread of pancreas disease (PD) in the Norwegian salmon industry based on the observed vessel movements and seaway distance between marine farms. Prev Vet Med. 2019; 167: 174-181. [LINK]

  9. Wilson-Aggarwal JK, Ozella L, Tizzoni M, Cattuto C, Swan GJ, Moundai T, Silk MJ, Zingeser JA, McDonald RA. High-resolution contact networks of free-ranging domestic dogs Canis familiaris and implications for transmission of infection. PLoS Neglected Tropical Diseases. 2019; 13(7): e0007565. [LINK]

  10. Baker E, Challenor P, Eames M. Predicting the Output From a Stochastic Computer Model When a Deterministic Approximation is Available. arXiv. 2019; 1902.01290. [LINK]

  11. Milwid RM, O'Sullivan TL, Poljak Z, Laskowski M, Greer AL. Comparing the effects of non-homogenous mixing patterns on epidemiological outcomes in equine populations: A mathematical modelling study. Sci Rep. 2019; 9(1): 3227. [LINK]

  12. Everton SF, Schroeder R. Plagues, Pagans, and Christians: Differential Survival, Social Networks, and the Rise of Christianity. Journal for the Scientific Study of Religion. 2019; DOI: 10.1111/jssr.12631. [LINK]

  13. Amusan O, Thompson AF, Aderinola TB, Alese BK. Modelling Malicious Attack in Social Networks. Network and Communication Technologies. 2020; 5(1): 37-43. [LINK]

Copyright

These materials are distributed under the GPL-3 license, with the following copyright and attribution requirements listed in the LICENSE document above.

Copy Link

Version

Install

install.packages('EpiModel')

Monthly Downloads

933

Version

1.8.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Samuel Jenness

Last Published

October 11th, 2024

Functions in EpiModel (1.8.0)

color_tea

Creates a TEA Variable for Infection Status for ndtv Animations
InitErgmTerm.absdiffby

Definition for absdiffby ERGM Term
infection.net

Primary Infection Module for netsim
get_formula_term_attr

Outputs ERGM Formula Attributes into a Character Vector
dcm.mods

Deterministic Compartmental Model Functions
infection.icm

Primary Infection Module for icm
get_network

Extract networkDynamic and network Objects from Network Simulations
control.net

Control Settings for Stochastic Network Models
comp_plot

Plot Compartment Diagram for Epidemic Models
as.phylo.transmat

Convert transmat infection tree into a phylo object
dissolution_coefs

Dissolution Coefficients for Stochastic Network Models
deleteAttr

Delete Elements from Attribute List
bipvals

Vertex Attributes for Bipartite Network
edgelist_censor

Table of Edge Censoring
discord_edgelist

Discordant Edgelist from NetworkDynamic Object
get_sims

Extract Network Simulations
dcm

Deterministic Compartmental Models
mutate_epi

Add New Epidemiology Variables
init.dcm

Initial Conditions for Deterministic Compartmental Models
crosscheck.net

Cross Checking of Inputs for Stochastic Network Models
netdx

Dynamic Network Model Diagnostics
brewer_ramp

RColorBrewer Color Ramp for EpiModel Plots
edges_correct

Adjustment for the Edges Coefficient with Changing Network Size
plot.dcm

Plot Data from a Deterministic Compartmental Epidemic Model
copy_toall_attr

Copies Vertex Attributes in Formation Formula to attr List
check_bip_degdist

Check Degree Distribution for Bipartite Target Statistics
init.icm

Initial Conditions for Stochastic Individual Contact Models
netsim

Stochastic Network Models
init_pids

Persistent ID Initialization
control.dcm

Control Settings for Deterministic Compartmental Models
netest

Dynamic Network Model Estimation
summary.icm

Summary Model Statistics
departures.icm

Departure: icm Module
departures.net

Departures: netsim Module
is.transmat

Extract Transmissions Matrix from Network Epidemic Model
get_prev.icm

Get Epidemic Output from icm Model
saveout.icm

Save icm Data to Output List Format
param.net

Epidemic Parameters for Stochastic Network Models
init.net

Initial Conditions for Stochastic Network Models
verbose.icm

Progress Print Module for Stochastic Individual Contact Models
get_nwparam

Extract Network Model Parameters
recovery.icm

Recovery: icm Module
sim_nets

Simulate Dynamic Network at Time 1
get_attr_prop

Proportional Table of Vertex Attributes
init_status.net

Disease Status Initialization Module for netsim
get_degree

Get Individual Degree from Network or Edgelist
control.icm

Control Settings for Stochastic Individual Contact Models
verbose.net

Progress Print Module for Stochastic Network Models
saveout.net

Save netsim Data to Output List Format
crosscheck.dcm

Cross Checking of Inputs for Deterministic Compartmental Models
crosscheck.icm

Cross Checking of Inputs for Stochastic Individual Contact Models
recovery.net

Recovery: netsim Module
geom_bands

ggplot2 geom for Quantile Bands
modules.net

Modules for Stochastic Network Models
initialize.icm

Initialization: icm Module
get_nwstats

Extract Network Statistics from netsim or netdx Object
get_args

Get Arguments from EpiModel Parameterization Functions
edgelist_meanage

Mean Age of Partnerships over Time
saveout.dcm

Save dcm Data to Output List Format
param.icm

Epidemic Parameters for Stochastic Individual Contact Models
merge.netsim

Merge Model Simulations Across netsim Objects
split_bip

Update Attribute Values for a Bipartite Network
epiweb

EpiModel Web
param.dcm

Epidemic Parameters for Deterministic Compartmental Models
update_nwattr

Updates Vertex Attributes for Incoming Vertices
get_prev.net

Get Epidemic Output from netsim Model
merge.icm

Merge Data across Stochastic Individual Contact Model Simulations
init_status.icm

Disease Status Initialization Module for icm
summary.dcm

Summary Model Statistics
mcat

Write Out Test Progress to Console
plot.netsim

Plot Data from a Stochastic Network Epidemic Model
resim_nets

Resimulate Dynamic Network at Time 2+
verbose.dcm

Progress Print Module for Deterministic Compartmental Models
ssample

Stable Sampling Function
test_icm

Test the Model Output from a Stochastic Individual Contact Model
truncate_sim

Truncate Simulation Time Series
modeids

ID Numbers for Bipartite Network
plot.transmat

Plot transmat infection tree in one of several styles
modules.icm

Modules for Stochastic Individual Contact Models
plot.netdx

Plot Dynamic Network Model Diagnostics
update_dissolution

Adjust Dissolution Component of Network Model Fit
initialize.net

Initialization: netsim Module
idmode

Mode Numbers for Bipartite Network
plot.icm

Plot Data from a Stochastic Individual Contact Epidemic Model
icm

Stochastic Individual Contact Models
summary.netsim

Summary Model Statistics
test_net

Test the Model Output from a Network Model
summary.netest

Summary for Network Model Fit
transco

Obtain Transparent Colors
InitErgmTerm.absdiffnodemix

Definition for absdiffnodemix ERGM Term
apportion_lr

Apportion Least-Remainder Method
arrivals.icm

Arrivals: icm Module
as.data.frame.netdx

Extract Timed Edgelists netdx Objects
as.network.transmat

Converts transmat infection tree into a network object
arrivals.net

Arrivals: netsim Module
EpiModel-package

Mathematical Modeling of Infectious Disease Dynamics
as.data.frame.icm

Extract Model Data for Stochastic Models
as.data.frame.dcm

Extract Model Data for Deterministic Compartmental Models