Package: EpiModel 2.6.2

Samuel Jenness

EpiModel: Mathematical Modeling of Infectious Disease Dynamics

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 API for extending these templates to address novel scientific research aims. Full methods for EpiModel are detailed in Jenness et al. (2018, <doi:10.18637/jss.v084.i08>).

Authors:Samuel Jenness [cre, aut], Steven M. Goodreau [aut], Martina Morris [aut], Adrien Le Guillou [aut], Chad Klumb [aut], Skye Bender-deMoll [ctb]

EpiModel_2.6.2.tar.gz
EpiModel_2.6.2.zip(r-4.7)EpiModel_2.6.2.zip(r-4.6)EpiModel_2.6.2.zip(r-4.5)
EpiModel_2.6.2.tgz(r-4.6-x86_64)EpiModel_2.6.2.tgz(r-4.6-arm64)EpiModel_2.6.2.tgz(r-4.5-x86_64)EpiModel_2.6.2.tgz(r-4.5-arm64)
EpiModel_2.6.2.tar.gz(r-4.7-arm64)EpiModel_2.6.2.tar.gz(r-4.7-x86_64)EpiModel_2.6.2.tar.gz(r-4.6-arm64)EpiModel_2.6.2.tar.gz(r-4.6-x86_64)
EpiModel_2.6.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
EpiModel/json (API)
NEWS

# Install 'EpiModel' in R:
install.packages('EpiModel', repos = c('https://epimodel.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/epimodel/epimodel/issues

Pkgdown/docs site:https://epimodel.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

agent-based-modelingepidemicsepidemiologyinfectious-diseasesnetwork-graphcpp

11.83 score 274 stars 389 scripts 1.3k downloads 19 mentions 174 exports 67 dependencies

Last updated from:dc50915ebd. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK217
linux-devel-x86_64OK567
source / vignettesOK322
linux-release-arm64OK221
linux-release-x86_64OK268
macos-release-arm64OK128
macos-release-x86_64OK295
macos-oldrel-arm64OK137
macos-oldrel-x86_64OK345
windows-develOK203
windows-releaseOK210
windows-oldrelOK205
wasm-releaseOK163

Exports:add_attradd_controladd_epiadd_initadd_paramadd_verticesappend_attrappend_core_attrapportion_lrarrivals.2g.netarrivals.icmarrivals.icm.biparrivals.netarrive_nodesas_cumulative_edgelistas_tibble_edgelistas.epi.data.frameas.phylo.transmatauto_update_attrbrewer_rampcheck_degdist_balcolor_teacomp_plotcontrol.dcmcontrol.icmcontrol.netcopy_datattr_to_nwattrcopy_nwattr_to_datattrcreate_dat_objectcreate_scenario_listcrosscheck.dcmcrosscheck.icmcrosscheck.netdcmdedup_cumulative_edgelistdelete_attrdelete_edgesdelete_verticesdepart_nodesdepartures.2g.netdepartures.icmdepartures.icm.bipdepartures.netdiscord_edgelistdissolution_coefsedgelist_censoredges_correctepiwebgenerate_random_paramsgeom_bandsget_argsget_attrget_attr_historyget_attr_listget_attr_propget_backward_reachableget_controlget_control_listget_core_attributesget_cumulative_degreeget_cumulative_edgelistget_cumulative_edgelists_dfget_current_timestepget_degreeget_discordant_edgelistget_edgelistget_edgelists_dfget_epiget_epi_listget_formula_term_attrget_forward_reachableget_initget_init_listget_networkget_network_attributesget_network_controlget_network_term_attrget_nwparamget_nwstatsget_paramget_param_listget_param_setget_partnersget_posit_idsget_simsget_transmatget_unique_idsget_vertex_attributeicmidgroupincrement_timestepinfection.2g.netinfection.icminfection.icm.bipinfection.netinit_netsinit_status.icminit_status.netinit.dcminit.icminit.netinitialize.icminitialize.netis_active_posit_idsis_active_unique_idsis.transmatmake_restart_pointmcatmod_SI_1g_clmod_SI_1g_opmod_SI_2g_clmod_SI_2g_opmod_SIR_1g_clmod_SIR_1g_opmod_SIR_2g_clmod_SIR_2g_opmod_SIS_1g_clmod_SIS_1g_opmod_SIS_2g_clmod_SIS_2g_opmultilayermutate_epinetdxnetestnetsimnetwork_initializenwupdate.netoverwrite_attrspadded_vectorparam_randomparam.dcmparam.icmparam.netparam.net_from_tableparam.net_to_tableprevalence.icmprevalence.icm.bipprevalence.netprocess_out.netrecord_attr_historyrecord_raw_objectrecovery.2g.netrecovery.icmrecovery.icm.biprecovery.netremove_node_attrresim_netssaveout.dcmsaveout.icmsaveout.netset_attrset_controlset_current_timestepset_episet_initset_networkset_paramset_transmatset_vertex_attributesim_nets_t1simulate_datssamplesummary_netstest_icmtest_nettrim_netesttruncate_simupdate_cumulative_edgelistupdate_dissolutionupdate_paramsuse_scenarioverbose.dcmverbose.icmverbose.net

Dependencies:apecachemclicodacodetoolscollectionscpp11DEoptimRdeSolvedigestdplyrergmergm.multievaluatefarverfastmapfuturefuture.applygenericsggplot2globalsgluegtablehighrisobandknitrlabelinglatticelazyevallifecyclelistenvlpSolveAPImagrittrMASSMatrixmemoisenetworknetworkDynamicnetworkLitenlmeparallellypillarpkgconfigpurrrR6rbibutilsRColorBrewerRcppRdpackrlangrlerobustbaseS7scalesstatnet.commonstringistringrtergmtibbletidyselecttrustutf8vctrsviridisLitewithrxfunyaml

EpiModel: Mathematical Modeling of Infectious Disease Dynamics

Rendered fromIntro.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-05-12
Started: 2014-11-02

Working with Custom Attributes and Summary Statistics in EpiModel

Rendered fromattributes-and-summary-statistics.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-04-01
Started: 2021-11-08

Working with Model Parameters in EpiModel

Rendered frommodel-parameters.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-04-01
Started: 2021-11-08

Working with Network Objects in EpiModel

Rendered fromnetwork-objects.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-05-26
Started: 2021-11-08

Readme and manuals

Help Manual

Help pageTopics
Mathematical Modeling of Infectious Disease DynamicsEpiModel-package EpiModel
Fast Version of network::add.vertices for Edgelist-formatted Networkadd_vertices
Apportion Using the Largest Remainder Methodapportion_lr
Arrive New Nodes to the netsim_dat Objectarrive_nodes
Convert an Object to a Cumulative Edgelistas_cumulative_edgelist
Convert an Edgelist into a Tibbleas_tibble_edgelist
Extract Model Data for Deterministic Compartmental Modelsas.data.frame.dcm
Extract Model Data for Stochastic Modelsas.data.frame.icm as.data.frame.netsim
Extract Timed Edgelists for netdx Objectsas.data.frame.netdx
Validate and Convert to epi.data.frameas.epi.data.frame
Convert transmat Infection Tree into a network Objectas.network.transmat
Convert transmat Infection Tree into a phylo Objectas.phylo.transmat
Check Degree Distribution for Balance in Target Statisticscheck_degdist_bal
Create a TEA Variable for Infection Status for 'ndtv' Animationscolor_tea
Plot Compartment Diagram for Epidemic Modelscomp_plot comp_plot.dcm comp_plot.icm comp_plot.netsim
Control Settings for Deterministic Compartmental Modelscontrol.dcm
Control Settings for Stochastic Individual Contact Modelscontrol.icm
Control Settings for Stochastic Network Modelscontrol.net
Create a Minimal netsim_dat Main List Object for a Network Modelcreate_dat_object
Make a list of EpiModel scenarios from a data.frame of scenarioscreate_scenario_list
Deterministic Compartmental Modelsdcm
Deduplicate a Cumulative Edgelistdedup_cumulative_edgelist
Remove Edges That Include Specified Verticesdelete_edges
Fast Version of network::delete.vertices for Edgelist-formatted Networkdelete_vertices
Depart Nodes from the netsim_dat Objectdepart_nodes
Dissolution Coefficients for Stochastic Network Modelsdissolution_coefs
Table of Edge Censoringedgelist_censor
EpiModel Webepiweb
Generate Values for Random Parametersgenerate_random_params
ggplot2 Geom for Quantile Bandsgeom_bands
Returns an adjacency list from an edge listget_adj_list
Extract the Attributes History from Network Simulationsget_attr_history
Returns all the node connected directly or indirectly to a set of nodesget_connected_nodes
Return the Cumulative Degree of a Set of Index Nodesget_cumulative_degree
Get a Cumulative Edgelist From a Specified Networkget_cumulative_edgelist
Get the Cumulative Edgelists of a Modelget_cumulative_edgelists_df
Return the Current Timestepget_current_timestep
Get Individual Degree from Network or Edgelistget_degree
Get an Edgelist From the Specified Networkget_edgelist
Get the Edgelist(s) from the Specified Network(s)get_edgelists_df
Output ERGM Formula Attributes into a Character Vectorget_formula_term_attr
Extract Network Objects from Network Simulationsget_network get_network.netdx get_network.netsim get_network.netsim_dat
Get Network Attributes from a Network Objectget_network_attributes
Output Network Attributes into a Character Vectorget_network_term_attr
Extract Network Statistics from netsim or netdx Objectget_nwstats
Extract the Parameter Set from Network Simulationsget_param_set
Return the Historical Contacts (Partners) of a Set of Index Nodesget_partners
Extract Network Simulationsget_sims
Return an adjacency list of subnetsget_subnet_adj_list
Get Vertex Attribute on Network Objectget_vertex_attribute
Stochastic Individual Contact Modelsicm
Increment the Current Timestepincrement_timestep
Initial Conditions for Deterministic Compartmental Modelsinit.dcm
Initial Conditions for Stochastic Individual Contact Modelsinit.icm
Initial Conditions for Stochastic Network Modelsinit.net
Definition for absdiffby ERGM Termabsdiffby InitErgmTerm.absdiffby
Definition for absdiffnodemix ERGM Termabsdiffnodemix InitErgmTerm.absdiffnodemix
Definition for fuzzynodematch ERGM Termfuzzynodematch InitErgmTerm.fuzzynodematch
Are These Nodes Active (Positional IDs)is_active_posit_ids
Are These Nodes Active (Unique IDs)is_active_unique_ids
Extract Transmissions Matrix from Network Epidemic Modelget_transmat is.transmat transmat
Make a Lightweight Restart Point From a 'netsim' Object with tergmLitemake_restart_point
Merge Data across Stochastic Individual Contact Model Simulationsmerge.icm
Merge Model Simulations across netsim Objectsmerge.netsim
Modules for Stochastic Individual Contact Modelsmodules.icm
Modules for Stochastic Network Modelsmodules.net
Specify Controls by Networkmultilayer
Add New Epidemiology Variablesmutate_epi
Functions to Access and Edit the Main netsim_dat Object in Network Modelsadd_attr add_control add_epi add_init add_param append_attr append_core_attr get_attr get_attr_list get_control get_control_list get_core_attributes get_epi get_epi_list get_init get_init_list get_network_control get_param get_param_list net-accessor remove_node_attr set_attr set_control set_epi set_init set_param
Dynamic Network Model Diagnosticsnetdx
Dynamic Network Model Estimationnetest
Stochastic Network Modelsnetsim
Initialize Network Objectnetwork_initialize
Dynamic Network Updatesnwupdate.net
Helper to use a 'data.frame' to initialize some attributesoverwrite_attrs
Grow a Vector to a Given Size, Padding it With Empty Elementspadded_vector
Create a Value Sampler for Random Parametersparam_random
Epidemic Parameters for Deterministic Compartmental Modelsparam.dcm
Epidemic Parameters for Stochastic Individual Contact Modelsparam.icm
Epidemic Parameters for Stochastic Network Modelsparam.net
Parameters List for Stochastic Network Models from a Formatted Data Frameparam.net_from_table
Coerce a list of parameters to a 'long.param.df'param.net_to_table
Plot Data from a Deterministic Compartmental Epidemic Modelplot.dcm
Plot Epidemic Model Results From a Netsim Data.Frameplot.epi.data.frame
Plot Data from a Stochastic Individual Contact Epidemic Modelplot.icm
Plot Dynamic Network Model Diagnosticsplot.netdx
Plot Data from a Stochastic Network Epidemic Modelplot.netsim
Plot transmat Infection Tree in Three Stylesplot.transmat
Print Method for DCM Objectsprint.dcm
Print Method for ICM Objectsprint.icm
Utility Function for Printing netdx Objectprint.netdx
Print Method for Network Model Simulationsprint.netsim
Get the Forward or Backward Reachable Nodes for a Set of Nodesget_backward_reachable get_forward_reachable reachable-nodes
Record Attribute Historyrecord_attr_history
Record an Arbitrary Object During a Simulationrecord_raw_object
Set the Current Timestepset_current_timestep
Save Transmission Matrixset_transmat
Set Vertex Attribute on Network Objectset_vertex_attribute
Summary Model Statisticssummary.dcm
Summary Model Statisticssummary.icm
Summary Model Statisticssummary.netsim
Function to Reduce the Size of a 'netest' Objecttrim_netest
Truncate Simulation Time Seriestruncate_sim truncate_sim.dcm truncate_sim.icm truncate_sim.netsim
Convert Unique Identifiers to/from Positional Identifiersget_posit_ids get_unique_ids unique_id-tools
Update a Cumulative Edgelist of the Specified Networkupdate_cumulative_edgelist
Adjust Dissolution Component of Network Model Fitupdate_dissolution
Update Model Parameters for Stochastic Network Modelsupdate_params
Apply a scenario object to a param.net objectuse_scenario