|
2 | 2 |
|
3 | 3 | [](https://github.com/EpiModel/EpiModel-Gallery/actions) |
4 | 4 |
|
5 | | -Templates for extending the [EpiModel](https://github.com/statnet/EpiModel) platform to model infectious disease dynamics over networks. Each example demonstrates how to build custom modules for stochastic network models using exponential random graph models (ERGMs). |
| 5 | +### 📖 **[Browse the Gallery Website →](https://epimodel.github.io/EpiModel-Gallery/)** |
6 | 6 |
|
7 | | -EpiModel provides built-in SIS/SIR models out of the box, but its module API supports arbitrarily complex epidemic systems. The learning curve for writing custom modules can be steep, so these examples teach by example -- from adding a single compartment to multi-stage disease models with interventions and cost-effectiveness analysis. |
| 7 | +A curated collection of tutorials for extending the [EpiModel](https://github.com/statnet/EpiModel) platform to model infectious disease dynamics over networks. Each example demonstrates how to build custom modules for stochastic network models using exponential random graph models (ERGMs), with fully annotated walkthroughs on the [Gallery website](https://epimodel.github.io/EpiModel-Gallery/). |
| 8 | + |
| 9 | +EpiModel provides built-in SIS/SIR models out of the box, but its module API supports arbitrarily complex epidemic systems. The learning curve for writing custom modules can be steep, so these examples teach by example -- from adding a single compartment to multi-stage disease models with interventions and cost-effectiveness analysis. The examples are organized from beginner-friendly fundamentals through intermediate extensions to full applied disease models. |
8 | 10 |
|
9 | 11 |
|
10 | 12 | ## Gallery Examples |
11 | 13 |
|
| 14 | +**Fundamentals** |
| 15 | + |
12 | 16 | | Example | Description | |
13 | 17 | |---------|-------------| |
14 | | -| [SI with Vital Dynamics](examples/si-vital-dynamics/) | SI with aging, births, deaths, and age-specific mortality | |
15 | | -| [Adding an Exposed State](examples/seir-exposed-state/) | SEIR/SEIRS: adding an exposed (latent) compartment, with optional waning immunity | |
16 | | -| [Test and Treat](examples/sis-test-and-treat/) | SIS with screening and antibiotic treatment for bacterial STIs | |
17 | | -| [Competing Strains](examples/sis-competing-strains/) | SIS with two pathogen strains differing in infectiousness and duration | |
18 | | -| [Social Diffusion](examples/social-diffusion/) | SI framework repurposed for social diffusion with threshold and dose-response contagion | |
19 | | -| [Syphilis](examples/syphilis/) | Multi-stage syphilis with diagnosis, treatment, and recovery | |
20 | | -| [SEIR with AON Vaccination](examples/seir-aon-vaccination/) | SEIR with all-or-nothing vaccination, vital dynamics, and herd immunity | |
21 | | -| [SEIRS with Leaky Vaccination](examples/seirs-leaky-vaccination/) | SEIRS with leaky vaccination (reduced transmission probability) and vital dynamics | |
22 | | -| [HIV](examples/hiv/) | HIV with acute/chronic/AIDS stages and antiretroviral therapy (ART) | |
23 | | -| [Cost-Effectiveness](examples/cost-effectiveness/) | SI with cost-effectiveness analysis: costs, QALYs, discounting, and ICERs | |
24 | | -| [Observed Network Data](examples/observed-network-data/) | Epidemics over observed (census) dynamic networks without ERGM estimation | |
25 | | -| [Multinets](examples/multinets/) | Multilayer networks with cross-layer dependency (e.g., main vs. casual partnerships) | |
26 | | - |
27 | | -Each example contains `model.R` (network estimation and simulation), `module-fx.R` (custom module functions), and `index.qmd` (annotated Quarto document). |
| 18 | +| [SEIR/SEIRS: Adding an Exposed State](https://epimodel.github.io/EpiModel-Gallery/examples/seir-exposed-state/) | Adding an exposed (latent) compartment to SIR, with optional waning immunity | |
| 19 | +| [SI with Vital Dynamics](https://epimodel.github.io/EpiModel-Gallery/examples/si-vital-dynamics/) | SI with aging, births, deaths, and age-specific mortality | |
| 20 | + |
| 21 | +**Interventions** |
| 22 | + |
| 23 | +| Example | Description | |
| 24 | +|---------|-------------| |
| 25 | +| [SEIR with AON Vaccination](https://epimodel.github.io/EpiModel-Gallery/examples/seir-aon-vaccination/) | SEIR with all-or-nothing vaccination, vital dynamics, and herd immunity | |
| 26 | +| [SEIRS with Leaky Vaccination](https://epimodel.github.io/EpiModel-Gallery/examples/seirs-leaky-vaccination/) | SEIRS with leaky vaccination (reduced transmission probability) and vital dynamics | |
| 27 | +| [Test and Treat](https://epimodel.github.io/EpiModel-Gallery/examples/sis-test-and-treat/) | SIS with screening and antibiotic treatment for bacterial STIs | |
| 28 | + |
| 29 | +**Intermediate Extensions** |
| 30 | + |
| 31 | +| Example | Description | |
| 32 | +|---------|-------------| |
| 33 | +| [Competing Strains](https://epimodel.github.io/EpiModel-Gallery/examples/sis-competing-strains/) | SIS with two pathogen strains differing in infectiousness and duration | |
| 34 | +| [Social Diffusion](https://epimodel.github.io/EpiModel-Gallery/examples/social-diffusion/) | SI framework repurposed for social diffusion with threshold and dose-response contagion | |
| 35 | + |
| 36 | +**Network Features** |
| 37 | + |
| 38 | +| Example | Description | |
| 39 | +|---------|-------------| |
| 40 | +| [Observed Network Data](https://epimodel.github.io/EpiModel-Gallery/examples/observed-network-data/) | Epidemics over observed (census) dynamic networks without ERGM estimation | |
| 41 | +| [Multilayer Networks](https://epimodel.github.io/EpiModel-Gallery/examples/multinets/) | Multilayer networks with cross-layer dependency (e.g., main vs. casual partnerships) | |
| 42 | + |
| 43 | +**Full Disease Models** |
| 44 | + |
| 45 | +| Example | Description | |
| 46 | +|---------|-------------| |
| 47 | +| [HIV](https://epimodel.github.io/EpiModel-Gallery/examples/hiv/) | HIV with acute/chronic/AIDS stages and antiretroviral therapy (ART) | |
| 48 | +| [Syphilis](https://epimodel.github.io/EpiModel-Gallery/examples/syphilis/) | Multi-stage syphilis with diagnosis, treatment, and recovery | |
| 49 | + |
| 50 | +**Advanced Extensions** |
| 51 | + |
| 52 | +| Example | Description | |
| 53 | +|---------|-------------| |
| 54 | +| [Cost-Effectiveness Analysis](https://epimodel.github.io/EpiModel-Gallery/examples/cost-effectiveness/) | SI with cost-effectiveness analysis: costs, QALYs, discounting, and ICERs | |
| 55 | + |
| 56 | +Each example contains `model.R` (network estimation and simulation), `module-fx.R` (custom module functions), and `index.qmd` (annotated tutorial on the website). |
28 | 57 |
|
29 | 58 |
|
30 | 59 | ## Getting Started |
31 | 60 |
|
| 61 | +The recommended way to learn is through the [Gallery website](https://epimodel.github.io/EpiModel-Gallery/), which presents each example as an annotated tutorial with model diagrams, code walkthroughs, and output plots. Start with the Fundamentals section and work through the examples in order. |
| 62 | + |
| 63 | +To run the code yourself: |
| 64 | + |
32 | 65 | ### Prerequisites |
33 | 66 |
|
34 | 67 | - **R** >= 4.5 |
@@ -68,13 +101,15 @@ This runs each example's `model.R` and reports pass/fail with timing. |
68 | 101 | Contributions of new gallery examples are welcome! To contribute: |
69 | 102 |
|
70 | 103 | 1. Fork this repository on GitHub. |
71 | | -2. Create a new subdirectory under `examples/` containing: |
| 104 | +2. Create a new subdirectory under `examples/` named descriptively (e.g., `sir-vaccination/`) containing: |
72 | 105 | - `model.R` -- main script for network estimation and simulation |
73 | 106 | - `module-fx.R` -- custom module functions plugged into `control.net()` |
74 | | - - `index.qmd` -- annotated Quarto document |
| 107 | + - `index.qmd` -- annotated Quarto tutorial (see existing examples for the format) |
| 108 | + - `thumbnail.png` -- thumbnail image for the gallery listing |
75 | 109 | 3. Include the standard unit test lines near the top of `model.R` (see existing examples). |
76 | 110 | 4. Verify your example passes: `bash test.sh` |
77 | | -5. Submit a Pull Request. |
| 111 | +5. Verify the website builds: `quarto render` |
| 112 | +6. Submit a Pull Request. |
78 | 113 |
|
79 | 114 |
|
80 | 115 | ## Citation |
|
0 commit comments