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")

EpiModel 2.0

In July 2020, we relased EpiModel version 2.0. This major software package update incorporates a substantial redesign of many elements of the EpiModel infrastructure and application programming interface (API). We anticipate that there will be some minor backwards incompatibilities with any EpiModel code developed with versions 1.x. There is a EpiModel 2.0 migration document available in the Tutorials page.

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. Our applied research projects using EpiModel have received funding from the NIH and Centers for Disease Control and Prevention (CDC). Our team also receives institutional support through center-level NIH grants. A full list of our funding support can be found here.

EpiModel in the Scientific Literature

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

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

2.0.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Samuel Jenness

Last Published

October 11th, 2024

Functions in EpiModel (2.0.1)

arrivals.icm.bip

Arrivals: bipartite icm Module
InitErgmTerm.absdiffby

Definition for absdiffby ERGM Term
InitErgmTerm.absdiffnodemix

Definition for absdiffnodemix ERGM Term
apportion_lr

Apportion Least-Remainder Method
EpiModel-package

Mathematical Modeling of Infectious Disease Dynamics
arrivals.icm

Arrivals: icm Module
arrivals.2g.net

Arrivals: netsim Module
arrivals.net

Arrivals: netsim Module
as.data.frame.dcm

Extract Model Data for Deterministic Compartmental Models
as.data.frame.icm

Extract Model Data for Stochastic Models
color_tea

Creates a TEA Variable for Infection Status for ndtv Animations
control.icm

Control Settings for Stochastic Individual Contact Models
control.dcm

Control Settings for Deterministic Compartmental Models
comp_plot

Plot Compartment Diagram for Epidemic Models
check_degdist_bal

Check Degree Distribution for Balance in Target Statistics
brewer_ramp

RColorBrewer Color Ramp for EpiModel Plots
as.phylo.transmat

Convert transmat infection tree into a phylo object
auto_update_attr

Updates Vertex Attributes for Incoming Vertices
crosscheck.dcm

Cross Checking of Inputs for Deterministic Compartmental Models
copy_nwattr_to_datattr

Copies Vertex Attributes From Network to dat List
crosscheck.icm

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

Cross Checking of Inputs for Stochastic Network Models
copy_datattr_to_nwattr

Copies Vertex Attributes from the dat List to the Network Object
control.net

Control Settings for Stochastic Network Models
departures.2g.net

Departures: netsim Module
departures.icm

Departure: icm Module
departures.icm.bip

Departure: bipartite icm Module
dcm.mods

Deterministic Compartmental Model Functions
edgelist_censor

Table of Edge Censoring
departures.net

Departures: netsim Module
as.data.frame.netdx

Extract Timed Edgelists netdx Objects
dcm

Deterministic Compartmental Models
get_network_term_attr

Outputs ERGM Formula Attributes into a Character Vector
get_degree

Get Individual Degree from Network or Edgelist
edgelist_meanage

Mean Age of Partnerships over Time
get_formula_term_attr

Outputs ERGM Formula Attributes into a Character Vector
get_attr_prop

Proportional Table of Vertex Attributes
get_nwstats

Extract Network Statistics from netsim or netdx Object
get_network

Extract networkDynamic and network Objects from Network Simulations
epiweb

EpiModel Web
edges_correct

Adjustment for the Edges Coefficient with Changing Network Size
infection.icm

Primary Infection Module for icm
infection.icm.bip

Primary Infection Module for icm
get_sims

Extract Network Simulations
is.transmat

Extract Transmissions Matrix from Network Epidemic Model
init.dcm

Initial Conditions for Deterministic Compartmental Models
infection.net

Primary Infection Module for netsim
as.network.transmat

Converts transmat infection tree into a network object
deleteAttr

Delete Elements from Attribute List
icm

Stochastic Individual Contact Models
initialize.icm

Initialization: icm Module
initialize.net

Initialization: netsim Module
init_status.icm

Disease Status Initialization Module for icm
init_status.net

Disease Status Initialization Module for netsim
modules.net

Modules for Stochastic Network Models
mutate_epi

Add New Epidemiology Variables
mcat

Write Out Test Progress to Console
modules.icm

Modules for Stochastic Individual Contact Models
merge.netsim

Merge Model Simulations Across netsim Objects
merge.icm

Merge Data across Stochastic Individual Contact Model Simulations
get_nwparam

Extract Network Model Parameters
idgroup

Mode Numbers for Two-Group Network
infection.2g.net

Primary Infection Module for netsim
delete_attr

Delete Elements from Attribute List
dissolution_coefs

Dissolution Coefficients for Stochastic Network Models
discord_edgelist

Discordant Edgelist
geom_bands

ggplot2 geom for Quantile Bands
netsim_loop

Internal function running the network simulation loop
get_args

Get Arguments from EpiModel Parameterization Functions
net-accessor

Functions to Access and Edit the Master List Object in Network Models
param.net

Epidemic Parameters for Stochastic Network Models
init.icm

Initial Conditions for Stochastic Individual Contact Models
init.net

Initial Conditions for Stochastic Network Models
netsim

Stochastic Network Models
netest

Dynamic Network Model Estimation
nwupdate.net

Dynamic Network Updates
netdx

Dynamic Network Model Diagnostics
param.dcm

Epidemic Parameters for Deterministic Compartmental Models
recovery.icm

Recovery: icm Module
plot.icm

Plot Data from a Stochastic Individual Contact Epidemic Model
recovery.2g.net

Recovery: netsim Module
prevalence.icm

Get Epidemic Output from icm Model
prevalence.icm.bip

Get Epidemic Output from icm Model
plot.netdx

Plot Dynamic Network Model Diagnostics
plot.dcm

Plot Data from a Deterministic Compartmental Epidemic Model
param.icm

Epidemic Parameters for Stochastic Individual Contact Models
recovery.icm.bip

Recovery: icm Module
recovery.net

Recovery: netsim Module
summary.netsim

Summary Model Statistics
prevalence.net

Get Epidemic Output from netsim Model
summary.dcm

Summary Model Statistics
ssample

Stable Sampling Function
process_out.net

Save a list of netsim Data to Output List Format
summary.icm

Summary Model Statistics
set_transmat

Save Transmission Matrix
summary.netest

Summary for Network Model Fit
verbose.net

Progress Print Module for Stochastic Network Models
verbose.dcm

Progress Print Module for Deterministic Compartmental Models
verbose.icm

Progress Print Module for Stochastic Individual Contact Models
saveout.icm

Save icm Data to Output List Format
saveout.net

Save netsim Data to Output List Format
test_icm

Test the Model Output from a Stochastic Individual Contact Model
truncate_sim

Truncate Simulation Time Series
sim_nets

Simulate Dynamic Network at Time 1
update_dissolution

Adjust Dissolution Component of Network Model Fit
plot.netsim

Plot Data from a Stochastic Network Epidemic Model
plot.transmat

Plot transmat infection tree in one of several styles
resim_nets

Resimulate Dynamic Network at Time 2+
test_net

Test the Model Output from a Network Model
saveout.dcm

Save dcm Data to Output List Format
transco

Obtain Transparent Colors