EpiModel Gallery
  • Gallery
  • About
  • EpiModel
  1. EpiModel Gallery
  • Fundamentals
    • SEIR/SEIRS Model: Adding an Exposed State
    • SI Model with Age-Specific Vital Dynamics
  • Interventions
    • SEIR Model with All-or-Nothing Vaccination
    • SEIRS with Leaky Vaccination
    • Test and Treat Intervention for an SIS Epidemic
  • Intermediate Extensions
    • Competing Pathogen Strains in an SIS Epidemic
    • Social Diffusion Model
  • Full Disease Models
    • HIV Transmission Model
    • Syphilis Progression Model
  • Network Features
    • Epidemics over Observed Networks
    • Epidemics with Multiple (Multilayer) Networks
  • Advanced Extensions
    • Cost-Effectiveness Analysis

EpiModel Gallery

A collection of template examples for extending EpiModel to model infectious disease dynamics over networks. Each example provides annotated code, pre-rendered output, and downloadable standalone scripts you can plug into your own projects.

If you’re new to writing custom EpiModel modules, we recommend starting with the two Fundamentals examples — Adding an Exposed State and SI with Vital Dynamics — which introduce the core patterns for custom compartments and vital dynamics. From there, the sidebar navigation follows a suggested learning sequence through intervention models (vaccination and test-and-treat), intermediate extensions like competing strains and social diffusion, full disease models (HIV and syphilis), and specialized topics like multilayer networks and cost-effectiveness analysis.

SEIR/SEIRS Model: Adding an Exposed State
SEIR
SEIRS
exposed state
beginner

Extend EpiModel’s SIR by adding a latent Exposed compartment, with an SEIRS waning-immunity extension.

SI Model with Age-Specific Vital Dynamics
SI
vital dynamics
aging
beginner

An SI epidemic on a dynamic network with aging, births, and age-specific mortality using US life table data.

SEIR Model with All-or-Nothing Vaccination
SEIR
vaccination
vital dynamics
herd immunity
intermediate

SEIR epidemic model with all-or-nothing vaccination through three delivery routes — initial coverage, ongoing campaigns, and newborn vaccination — over a dynamic network…

SEIRS with Leaky Vaccination
SEIRS
vaccination
vaccine efficacy
vital dynamics
intermediate

Implements leaky vaccination where protection reduces (rather than eliminates) infection risk, on an SEIRS model with waning immunity and vital dynamics.

Test and Treat Intervention for an SIS Epidemic
SIS
intervention
diagnosis
treatment
beginner

An SIS epidemic model with a test-and-treat intervention for a bacterial STI, comparing screening intensities on a dynamic sexual contact network.

Competing Pathogen Strains in an SIS Epidemic
SIS
multi-strain
network effects
intermediate

Models SIS with two competing strains differing in transmission-duration trade-offs, showing how network concurrency determines which strain dominates.

Social Diffusion Model
SI
social diffusion
complex contagion
intermediate

SI-based model comparing simple, threshold, and dose-response diffusion mechanisms on a social network

HIV Transmission Model
HIV
stage-dependent
ART
intervention
advanced

Simplified HIV transmission with four infectious stages (Acute, Chronic 1-2, AIDS) and antiretroviral therapy intervention based on Granich et al.

Syphilis Progression Model
multi-stage
syphilis
diagnosis
treatment
advanced

Models multi-stage syphilis transmission, progression, diagnosis, and treatment with stage-dependent infectiousness and screening-driven recovery.

Epidemics over Observed Networks
SI
observed networks
census data
intermediate

SI epidemic simulation over observed (census) dynamic networks without ERGM estimation

Epidemics with Multiple (Multilayer) Networks
SI
multilayer networks
network structure
intermediate

Simulates epidemics on multilayer networks with shared nodes but distinct edge sets, modeling cross-layer dependency in partnership formation.

Cost-Effectiveness Analysis
SI
cost-effectiveness
prophylaxis
economics
advanced

Conducts cost-effectiveness analysis comparing baseline SI with universal prophylaxis, tracking QALYs and costs with discounting and vital dynamics.

No matching items
Source Code
---
title: "EpiModel Gallery"
listing:
  id: gallery-listing
  contents: examples/*/index.qmd
  type: grid
  grid-columns: 3
  sort:
    - "order"
  fields: [image, title, description, categories]
  categories: false
page-layout: full
toc: false
---

A collection of template examples for extending [EpiModel](https://www.epimodel.org/) to model infectious disease dynamics over networks. Each example provides annotated code, pre-rendered output, and downloadable standalone scripts you can plug into your own projects.

If you're new to writing custom EpiModel modules, we recommend starting with the two Fundamentals examples --- Adding an Exposed State and SI with Vital Dynamics --- which introduce the core patterns for custom compartments and vital dynamics. From there, the sidebar navigation follows a suggested learning sequence through intervention models (vaccination and test-and-treat), intermediate extensions like competing strains and social diffusion, full disease models (HIV and syphilis), and specialized topics like multilayer networks and cost-effectiveness analysis.

::: {#gallery-listing}
:::