diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..13f72db7
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,15 @@
+---
+title: "Contributor Code of Conduct"
+---
+
+As contributors and maintainers of this project,
+we pledge to follow the [The Epiverse-TRACE Code of Conduct][coc].
+
+
+
+[coc-reporting]: https://forms.gle/guKqVXPk6K43jPn59
+[coc]: https://github.com/epiverse-trace/.github/blob/main/CODE_OF_CONDUCT.md
+
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 00000000..49a8cbdd
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,74 @@
+---
+title: "Licenses"
+---
+
+## Instructional Material
+
+The tutorials in this repository are developed by Epiverse-TRACE, based on the [lesson template from the Carpentries](https://github.com/carpentries/workbench-template-rmd) (template under CC BY license).
+
+All Epiverse-TRACE
+instructional material is made available under the [Creative Commons
+Attribution license][cc-by-human]. The following is a human-readable summary of
+(and not a substitute for) the [full legal text of the CC BY 4.0
+license][cc-by-legal].
+
+You are free:
+
+- to **Share**---copy and redistribute the material in any medium or format
+- to **Adapt**---remix, transform, and build upon the material
+
+for any purpose, even commercially.
+
+The licensor cannot revoke these freedoms as long as you follow the license
+terms.
+
+Under the following terms:
+
+- **Attribution**---You must give appropriate credit (mentioning that your work
+ is derived from work that is Copyright (c) Epiverse-TRACE, where
+ practical, linking to ), provide a [link to the
+ license][cc-by-human], and indicate if changes were made. You may do so in
+ any reasonable manner, but not in any way that suggests the licensor endorses
+ you or your use.
+
+- **No additional restrictions**---You may not apply legal terms or
+ technological measures that legally restrict others from doing anything the
+ license permits. With the understanding that:
+
+Notices:
+
+* You do not have to comply with the license for elements of the material in
+ the public domain or where your use is permitted by an applicable exception
+ or limitation.
+* No warranties are given. The license may not give you all of the permissions
+ necessary for your intended use. For example, other rights such as publicity,
+ privacy, or moral rights may limit how you use the material.
+
+## Software
+
+Except where otherwise noted, the example programs and other software provided
+by Epiverse-TRACE are made available under the [OSI][osi]-approved [MIT
+license][mit-license].
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+[cc-by-human]: https://creativecommons.org/licenses/by/4.0/
+[cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode
+[mit-license]: https://opensource.org/licenses/mit-license.html
+[osi]: https://opensource.org
diff --git a/compare-interventions.md b/compare-interventions.md
new file mode 100644
index 00000000..2952b0f6
--- /dev/null
+++ b/compare-interventions.md
@@ -0,0 +1,110 @@
+---
+title: 'Comparing public health outcomes of interventions'
+teaching: 45 # teaching time in minutes
+exercises: 30 # exercise time in minutes
+
+---
+
+
+
+:::::::::::::::::::::::::::::::::::::: questions
+
+- How can I quantify the effect of an intervention?
+
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+::::::::::::::::::::::::::::::::::::: objectives
+
+- Understand how to compare intervention scenarios
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+::::::::::::::::::::::::::::::::::::: prereq
+
+## Prerequisites
++ Complete tutorials [Simulating transmission](../episodes/simulating-transmission.md) and [Modelling interventions](../episodes/modelling-interventions.md)
+
+This tutorial has the following concept dependencies:
+
+**Outbreak response** : [Intervention types](https://www.cdc.gov/nonpharmaceutical-interventions/).
+:::::::::::::::::::::::::::::::::
+
+
+## Introduction
+
+In this tutorial we will compare intervention scenarios against each other. To quantify the effect of the intervention we need to compare our intervention scenario to a counter factual scenario. The *counter factual* is the scenario in which nothing changes, often referred to as the 'do nothing' scenario. The counter factual scenario may include no interventions, or if we are investigating the potential impact of an additional intervention in the later stages of an outbreak there may be existing interventions in place.
+
+We must also decide what our *outcome of interest* is to make comparisons between intervention and counter factual scenarios. The outcome of interest can be:
+
++ a model outcome, e.g. number of infections or hospitalisations,
++ a metric such as the epidemic peak time or size,
++ a measure that uses the model outcomes such as QALY/DALYs.
+
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: instructor
+
+In this tutorial we introduce the concept of the counter factual and how to compare scenarios (counter factual versus intervention) against each other.
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+## Vacamole model
+
+The Vacamole model is a deterministic model based on a system of ODEs in [Ainslie et al. 2022]( https://doi.org/10.2807/1560-7917.ES.2022.27.44.2101090). The model consists of 11 compartments, individuals are classed as one of the following:
+
++ susceptible, $S$,
++ partial vaccination ($V_1$), fully vaccination ($V_2$),
++ exposed, $E$ and exposed while vaccinated, $E_V$,
++ infectious, $I$ and infectious while vaccinated, $I_V$,
++ hospitalised, $H$ and hospitalised while vaccinated, $H_V$,
++ dead, $D$,
++ recovered, $R$.
+
+The diagram below describes the flow of individuals through the different compartments.
+
+
+
+See `?epidemics::model_vacamole_cpp` for detail on how to run the model.
+
+## Comparing scenarios
+
+*Coming soon*
+
+## Challenge
+
+*Coming soon*
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+::::::::::::::::::::::::::::::::::::: keypoints
+
+- The counter factual scenario must be defined to make comparisons
+
+::::::::::::::::::::::::::::::::::::::::::::::::
diff --git a/config.yaml b/config.yaml
new file mode 100644
index 00000000..ac966d32
--- /dev/null
+++ b/config.yaml
@@ -0,0 +1,81 @@
+#------------------------------------------------------------
+# Values for this lesson.
+#------------------------------------------------------------
+
+# Which carpentry is this (swc, dc, lc, or cp)?
+# swc: Software Carpentry
+# dc: Data Carpentry
+# lc: Library Carpentry
+# cp: Carpentries (to use for instructor training for instance)
+# incubator: The Carpentries Incubator
+carpentry: 'incubator'
+
+# Overall title for pages.
+title: 'Epiverse-TRACE'
+
+# Date the lesson was created (YYYY-MM-DD, this is empty by default)
+created: ~
+
+# Comma-separated list of keywords for the lesson
+keywords: 'forecasts, epidemic models, interventions' #FIXME
+
+# Life cycle stage of the lesson
+# possible values: pre-alpha, alpha, beta, stable
+life_cycle: 'pre-alpha'
+
+# License of the lesson
+license: 'CC-BY 4.0' #FIXME
+
+# Link to the source repository for this lesson
+source: 'https://github.com/epiverse-trace/tutorials'
+
+# Default branch of your lesson
+branch: 'main'
+
+# Who to contact if there are any issues
+contact: 'andree.valle-campos@lshtm.ac.uk' #FIXME
+
+# Navigation ------------------------------------------------
+#
+# Use the following menu items to specify the order of
+# individual pages in each dropdown section. Leave blank to
+# include all pages in the folder.
+#
+# Example -------------
+#
+# episodes:
+# - introduction.md
+# - first-steps.md
+#
+# learners:
+# - setup.md
+#
+# instructors:
+# - instructor-notes.md
+#
+# profiles:
+# - one-learner.md
+# - another-learner.md
+
+# Order of episodes in your lesson
+episodes:
+- simulating-transmission.Rmd
+- model-choices.Rmd
+- modelling-interventions.Rmd
+- compare-interventions.Rmd
+
+# Information for Learners
+learners:
+
+# Information for Instructors
+instructors:
+
+# Learner Profiles
+profiles:
+
+# Customisation ---------------------------------------------
+#
+# This space below is where custom yaml items (e.g. pinning
+# sandpaper and varnish versions) should live
+varnish: epiverse-trace/varnish@epiversetheme
+sandpaper: 'carpentries/sandpaper#533'
diff --git a/data/ebola_cases.csv b/data/ebola_cases.csv
new file mode 100644
index 00000000..260b8f8a
--- /dev/null
+++ b/data/ebola_cases.csv
@@ -0,0 +1,121 @@
+"date","confirm"
+2014-05-18,1
+2014-05-20,2
+2014-05-21,4
+2014-05-22,6
+2014-05-23,1
+2014-05-24,2
+2014-05-26,10
+2014-05-27,8
+2014-05-28,2
+2014-05-29,12
+2014-05-30,7
+2014-05-31,2
+2014-06-01,5
+2014-06-02,2
+2014-06-03,1
+2014-06-05,3
+2014-06-06,7
+2014-06-07,4
+2014-06-08,6
+2014-06-09,1
+2014-06-10,29
+2014-06-11,1
+2014-06-12,10
+2014-06-13,20
+2014-06-14,17
+2014-06-15,4
+2014-06-16,1
+2014-06-17,4
+2014-06-18,8
+2014-06-19,11
+2014-06-20,9
+2014-06-21,3
+2014-06-22,3
+2014-06-23,2
+2014-06-24,9
+2014-06-25,9
+2014-06-26,14
+2014-06-27,15
+2014-06-28,21
+2014-06-29,9
+2014-06-30,15
+2014-07-01,12
+2014-07-02,11
+2014-07-03,4
+2014-07-04,11
+2014-07-05,17
+2014-07-06,9
+2014-07-07,18
+2014-07-08,11
+2014-07-09,8
+2014-07-10,14
+2014-07-11,8
+2014-07-12,7
+2014-07-13,4
+2014-07-14,7
+2014-07-15,5
+2014-07-16,7
+2014-07-17,8
+2014-07-18,10
+2014-07-19,13
+2014-07-20,13
+2014-07-21,18
+2014-07-22,9
+2014-07-23,13
+2014-07-24,10
+2014-07-25,40
+2014-07-26,8
+2014-07-27,7
+2014-07-28,14
+2014-07-29,9
+2014-07-30,14
+2014-07-31,12
+2014-08-01,12
+2014-08-02,15
+2014-08-03,14
+2014-08-04,5
+2014-08-05,13
+2014-08-06,8
+2014-08-07,8
+2014-08-08,13
+2014-08-09,8
+2014-08-10,13
+2014-08-11,4
+2014-08-12,9
+2014-08-13,6
+2014-08-14,8
+2014-08-15,5
+2014-08-16,1
+2014-08-17,5
+2014-08-18,17
+2014-08-19,18
+2014-08-20,35
+2014-08-21,18
+2014-08-22,16
+2014-08-23,18
+2014-08-24,38
+2014-08-25,25
+2014-08-26,42
+2014-08-27,16
+2014-08-28,26
+2014-08-29,30
+2014-08-30,23
+2014-08-31,24
+2014-09-01,29
+2014-09-02,29
+2014-09-03,43
+2014-09-04,41
+2014-09-05,15
+2014-09-06,44
+2014-09-07,30
+2014-09-08,42
+2014-09-09,38
+2014-09-10,21
+2014-09-11,39
+2014-09-12,37
+2014-09-13,38
+2014-09-14,49
+2014-09-15,68
+2014-09-16,84
+2014-09-17,56
diff --git a/fig/compare-interventions-rendered-unnamed-chunk-1-1.png b/fig/compare-interventions-rendered-unnamed-chunk-1-1.png
new file mode 100644
index 00000000..9e03b7a4
Binary files /dev/null and b/fig/compare-interventions-rendered-unnamed-chunk-1-1.png differ
diff --git a/fig/model-choices-rendered-diagram-1.png b/fig/model-choices-rendered-diagram-1.png
new file mode 100644
index 00000000..eb18a7f6
Binary files /dev/null and b/fig/model-choices-rendered-diagram-1.png differ
diff --git a/fig/model-choices-rendered-unnamed-chunk-1-1.png b/fig/model-choices-rendered-unnamed-chunk-1-1.png
new file mode 100644
index 00000000..5a803301
Binary files /dev/null and b/fig/model-choices-rendered-unnamed-chunk-1-1.png differ
diff --git a/fig/modelling-interventions-rendered-diagram_SEIRV-1.png b/fig/modelling-interventions-rendered-diagram_SEIRV-1.png
new file mode 100644
index 00000000..d684c708
Binary files /dev/null and b/fig/modelling-interventions-rendered-diagram_SEIRV-1.png differ
diff --git a/fig/modelling-interventions-rendered-plot_masks-1.png b/fig/modelling-interventions-rendered-plot_masks-1.png
new file mode 100644
index 00000000..cad5366a
Binary files /dev/null and b/fig/modelling-interventions-rendered-plot_masks-1.png differ
diff --git a/fig/modelling-interventions-rendered-plot_school-1.png b/fig/modelling-interventions-rendered-plot_school-1.png
new file mode 100644
index 00000000..af037670
Binary files /dev/null and b/fig/modelling-interventions-rendered-plot_school-1.png differ
diff --git a/fig/modelling-interventions-rendered-plot_vaccinate-1.png b/fig/modelling-interventions-rendered-plot_vaccinate-1.png
new file mode 100644
index 00000000..a2ef03e7
Binary files /dev/null and b/fig/modelling-interventions-rendered-plot_vaccinate-1.png differ
diff --git a/fig/simulating-transmission-rendered-diagram-1.png b/fig/simulating-transmission-rendered-diagram-1.png
new file mode 100644
index 00000000..ab75590d
Binary files /dev/null and b/fig/simulating-transmission-rendered-diagram-1.png differ
diff --git a/fig/simulating-transmission-rendered-plot-1.png b/fig/simulating-transmission-rendered-plot-1.png
new file mode 100644
index 00000000..87ddbb21
Binary files /dev/null and b/fig/simulating-transmission-rendered-plot-1.png differ
diff --git a/fig/simulating-transmission-rendered-traj-1.png b/fig/simulating-transmission-rendered-traj-1.png
new file mode 100644
index 00000000..61a237dd
Binary files /dev/null and b/fig/simulating-transmission-rendered-traj-1.png differ
diff --git a/fig/simulating-transmission-rendered-visualise-1.png b/fig/simulating-transmission-rendered-visualise-1.png
new file mode 100644
index 00000000..61a237dd
Binary files /dev/null and b/fig/simulating-transmission-rendered-visualise-1.png differ
diff --git a/index.md b/index.md
new file mode 100644
index 00000000..f81c8e37
--- /dev/null
+++ b/index.md
@@ -0,0 +1,38 @@
+---
+site: sandpaper::sandpaper_site
+---
+
+## Epiverse-TRACE tutorials
+
+The Epiverse-TRACE tutorials are training materials for Outbreak Analysis tasks aimed at [learners](../profiles.md) who are willing to achieve basic competence in modelling and analytics.
+
+The tutorials are built around the workflow of outbreak analysis split into three stages : early tasks, middle tasks and late tasks.
+
+![An overview of the tutorial topics](https://epiverse-trace.github.io/task_pipeline-minimal.svg)
+
+Task topics consist of one or more episodes. You can navigate to different episodes using the menu on the left hand side. Alternatively, you may find the topic you are interested in the [key points](../key-points.md) of each episode.
+
+Each episode contains:
+
++ **Overview** : describes what questions will be answered and what are the objectives of the episode.
++ **Prerequisites**: describes what episodes/packages need to be covered before the current episode.
++ **Example R code** : work through the episodes on your own computer using the example R code.
++ **Challenges** : complete challenges to test your understanding.
++ **Explainers** : add to your understanding of mathematical and modelling concepts with the explainer boxes.
+
+Also check out the [glossary](../reference.md) for any terms you may be unfamiliar with.
+
+## Related projects
+
++ R package vignettes : for R package `{package}` find the vignette located at `https://epiverse-trace.github.io/{package}/`. [Look at all Epiverse-TRACE packages in our developer space](https://epiverse-trace.github.io/).
++ [How-to guides](https://epiverse-trace.github.io/howto/) : reproducible recipes with concrete steps to solve specific Outbreak Analysis questions.
++ [The Epidemiologist R Handbook](https://www.epirhandbook.com/en/index.html) : Quick R code reference manual with task-centered examples that address common epidemiological problems.
++ *COMING SOON* case studies : reproducible case-studies of outbreak data analysis tasks using R packages.
+
+
+
+This tutorial was built with [The Carpentries Workbench][workbench].
+
+
+[workbench]: https://carpentries.github.io/sandpaper-docs
+
diff --git a/instructor-notes.md b/instructor-notes.md
new file mode 100644
index 00000000..24c98af6
--- /dev/null
+++ b/instructor-notes.md
@@ -0,0 +1,5 @@
+---
+title: 'Instructor Notes'
+---
+
+Instructor notes
diff --git a/learner-profiles.md b/learner-profiles.md
new file mode 100644
index 00000000..ffc70a8f
--- /dev/null
+++ b/learner-profiles.md
@@ -0,0 +1,15 @@
+---
+title: Who are these tutorials for?
+---
+
+
+## Who are these tutorials for?
+
+We thought about Lucia, Patricia, and Vania as learner personas in designing the contents of this training:
+
+- [Lucia](https://epiverse-trace.github.io/personas/lucia-outbreaks.html), a Field Epidemiologist in a National Health Agency that uses R for data cleaning, plotting and automated reports.
+
+- [Patricia](https://epiverse-trace.github.io/personas/patricia-discoverer.html), A PhD student learning to use R and analyse Outbreak data for her research project.
+
+- [Vania](https://epiverse-trace.github.io/personas/vania-academica.html), a Professor who needs ready-to-use teaching material for her research and to pass on to students.
+
diff --git a/links.md b/links.md
new file mode 100644
index 00000000..4c5cd2f9
--- /dev/null
+++ b/links.md
@@ -0,0 +1,10 @@
+
+
+[pandoc]: https://pandoc.org/MANUAL.html
+[r-markdown]: https://rmarkdown.rstudio.com/
+[rstudio]: https://www.rstudio.com/
+[carpentries-workbench]: https://carpentries.github.io/sandpaper-docs/
+
diff --git a/md5sum.txt b/md5sum.txt
new file mode 100644
index 00000000..0ee71fa8
--- /dev/null
+++ b/md5sum.txt
@@ -0,0 +1,15 @@
+"file" "checksum" "built" "date"
+"CODE_OF_CONDUCT.md" "549f00b0992a7743c2bc16ea6ce3db57" "site/built/CODE_OF_CONDUCT.md" "2023-11-20"
+"LICENSE.md" "14377518ee654005a18cf28549eb30e3" "site/built/LICENSE.md" "2023-11-20"
+"config.yaml" "e7027efc188d35350a68ad8f50b9777e" "site/built/config.yaml" "2023-11-20"
+"index.md" "adfca1a79e0106ee8b3f7731d0678b59" "site/built/index.md" "2023-11-20"
+"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2023-11-20"
+"episodes/simulating-transmission.Rmd" "1772135692f677dbd2516da44ee79809" "site/built/simulating-transmission.md" "2023-12-13"
+"episodes/model-choices.Rmd" "88731fa7294dce80bffeef8e51738e76" "site/built/model-choices.md" "2023-11-20"
+"episodes/modelling-interventions.Rmd" "0c2b8a23920ad50e6cde1bd0eadb0859" "site/built/modelling-interventions.md" "2023-11-20"
+"episodes/compare-interventions.Rmd" "78123d2140fbe6488cd295eba3066fcd" "site/built/compare-interventions.md" "2023-11-20"
+"instructors/instructor-notes.md" "ca3834a1b0f9e70c4702aa7a367a6bb5" "site/built/instructor-notes.md" "2023-11-20"
+"learners/reference.md" "7980e987fc72761f30df53cb3ef246fc" "site/built/reference.md" "2023-12-16"
+"learners/setup.md" "b3c6bfa13fd687f926bb1a3e772a2516" "site/built/setup.md" "2023-11-20"
+"profiles/learner-profiles.md" "31b503c4b5bd1f0960ada730eca4a25e" "site/built/learner-profiles.md" "2023-11-20"
+"renv/profiles/lesson-requirements/renv.lock" "11f723731ae793f0efcfe51dc1acf874" "site/built/renv.lock" "2023-11-20"
diff --git a/model-choices.md b/model-choices.md
new file mode 100644
index 00000000..cc4ab9ac
--- /dev/null
+++ b/model-choices.md
@@ -0,0 +1,153 @@
+---
+title: 'Choosing an appropriate model'
+teaching: 10 # teaching time in minutes
+exercises: 20 # exercise time in minutes
+
+---
+
+
+
+
+:::::::::::::::::::::::::::::::::::::: questions
+
+- How do I choose a model for my task?
+
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+::::::::::::::::::::::::::::::::::::: objectives
+
+- Learn how to access the model library in `epidemics`
+- Understand the model requirements for a question
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+::::::::::::::::::::::::::::::::::::: prereq
+
+## Prerequisites
++ Complete tutorial [Simulating transmission](../episodes/simulating-transmission.md)
+:::::::::::::::::::::::::::::::::
+
+
+## Introduction
+
+Using mathematical models in outbreak analysis does not necessarily require developing a new model. There are existing models for different infections, interventions and transmission patterns which can be used to answer new questions. In this tutorial, we will learn how to choose an existing model to generate predictions for a given scenario.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: instructor
+
+The focus of this tutorial is understanding existing models to decide if they are appropriate for a defined question.
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+### Choosing a model
+
+When deciding whether an existing model can be used, we must consider :
+
++ What is the infection/disease of interest?
+
+A model may already exist for your study disease, or there may be a model for an infection that has the same transmission pathways and epidemiological features that can be used.
+
++ Do we need a [deterministic](../learners/reference.md#deterministic) or [stochastic](../learners/reference.md#stochastic) model?
+
+Model structures differ for whether the disease has pandemic potential or not. When predicted numbers of infection are small, stochastic variation in output can have an effect on whether an outbreak takes off or not. Outbreaks are usually smaller in magnitude than epidemics, so its often appropriate to use a stochastic model to characterise the uncertainty in the early stages of the outbreak. Epidemics are larger in magnitude than outbreaks and so a deterministic model is suitable as we have less interest in the stochastic variation in output.
+
++ What is the outcome of interest?
+
+The outcome of interest can be a feature of a mathematical model. It may be that you are interested in the predicted numbers of infection through time, or in a specific outcome such as hospitalisations or cases of severe disease.
+
++ Will any interventions be modelled?
+
+Finally, interventions such as vaccination may be of interest. A model may or may not have the capability to include the impact of different interventions on different time scales (continuous time or at discrete time points). We will discuss interventions in detail in the next tutorial.
+
+### Available models
+
+The R package `epidemics` contains functions to run existing models.
+For details on the models that are available, see the package [vignettes](https://epiverse-trace.github.io/epidemics/articles). To learn how to run the models in R, read the documentation using `?epidemics::model_ebola_r`. Remember to use the questions in the '[Check model equation](#check-model-equations)' checklist to help your understanding of an existing model.
+
+::::::::::::::::::::::::::::::::::::: checklist
+### Check model equations
+
+- How is transmission modelled? e.g. direct or indirect, airborne or vector-borne
+- What interventions are modelled?
+- What state variables are there and how do they relate to assumptions about infection?
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+
+
+## Challenge
+
+::::::::::::::::::::::::::::::::::::: challenge
+
+## What model?
+
+You have been asked to explore the variation in numbers of infected individuals in the early stages of an Ebola outbreak.
+
+Which of the following models would be an appropriate choice for this task:
+
++ `model_default_cpp()`
+
++ `model_ebola_r()`
+
+::::::::::::::::: hint
+
+### HINT
+
+Consider the following questions:
+
+::::::::::::::::::::::::::::::::::::: checklist
+
++ What is the infection/disease of interest?
++ Do we need a deterministic or stochastic model?
++ What is the outcome of interest?
++ Will any interventions be modelled?
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+
+::::::::::::::::::::::
+
+
+::::::::::::::::: solution
+
+### SOLUTION
+
+
++ What is the infection/disease of interest? **Ebola**
++ Do we need a deterministic or stochastic model? **A stochastic model would allow us to explore variation in the early stages of the outbreak**
++ What is the outcome of interest? **Number of infections**
++ Will any interventions be modelled? **No**
+
+#### `model_default_cpp()`
+
+A deterministic SEIR model with age specific direct transmission.
+
+
+
+
+The model is capable of predicting an Ebola type outbreak, but as the model is deterministic, we are not able to explore stochastic variation in the early stages of the outbreak.
+
+
+#### `model_ebola_r()`
+
+A stochastic SEIHFR (Susceptible, Exposed, Infectious, Hospitalised, Funeral, Removed) model that was developed specifically for infection with Ebola.
+
+
+
+
+
+As this model is stochastic, it is the most appropriate choice to explore how variation in numbers of infected individuals in the early stages of an Ebola outbreak.
+
+
+:::::::::::::::::::::::::::
+
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+
+
+::::::::::::::::::::::::::::::::::::: keypoints
+
+- Existing models can be used for new questions
+- Check that a model has appropriate assumptions about transmission, outbreak potential, outcomes and interventions
+::::::::::::::::::::::::::::::::::::::::::::::::
diff --git a/modelling-interventions.md b/modelling-interventions.md
new file mode 100644
index 00000000..2fb40769
--- /dev/null
+++ b/modelling-interventions.md
@@ -0,0 +1,225 @@
+---
+title: 'Modelling interventions'
+teaching: 45 # teaching time in minutes
+exercises: 30 # exercise time in minutes
+
+---
+
+
+
+:::::::::::::::::::::::::::::::::::::: questions
+
+- How do I investigate the effect of interventions on disease trajectories?
+
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+::::::::::::::::::::::::::::::::::::: objectives
+
+- Learn how to implement pharmaceutical and non-pharmaceutical interventions
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+::::::::::::::::::::::::::::::::::::: prereq
+
+## Prerequisites
++ Complete tutorial [Simulating transmission](../episodes/simulating-transmission.md)
+
+This tutorial has the following concept dependencies:
+
+**Outbreak response** : [Intervention types](https://www.cdc.gov/nonpharmaceutical-interventions/).
+:::::::::::::::::::::::::::::::::
+
+
+## Introduction
+
+Mathematical models can be used to generate predictions for the implementation of non-pharmaceutical and pharmaceutical interventions at different stages of an outbreak. In this tutorial, we will introduce how to include different interventions in models.
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: instructor
+
+In this tutorial different types of intervention and how they can be modelled are introduced. Learners should be able to understand the underlying mechanism of these interventions (e.g. reduce contact rate) as well as how to implement the code to include such interventions.
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+## Non-pharmaceutical interventions
+
+Non-pharmaceutical interventions (NPIs) are measures put in place to reduce transmission that do not include taking medicine or vaccines. NPIs aim reduce contact between infectious and susceptible individuals. For example, washing hands, wearing masks and closures of school and workplaces.
+
+In mathematical modelling, we must make assumptions about how NPIs will affect transmission. This may include adding additional disease states or reducing the value of relevant parameters.
+
+#### Effect of school closures on COVID-19 spread
+
+
+
+
+We want to investigate the effect of school closures on reducing the number of individuals infectious with COVID-19 through time. We assume that a school closure will reduce the frequency of contacts within and between different age groups.
+
+Using an SEIR model (`model_default_cpp()` in the R package `{epidemics}`) we set $R_0 = 2.7$, preinfectious period $= 4$ and the infectious_period $= 5.5$ (parameters adapted from [Davies et al. (2020)](https://doi.org/10.1016/S2468-2667(20)30133-X)). We load a contact matrix with age bins 0-18, 18-65, 65 years and older using `{socialmixr}` and assume that one in every 1 million in each age group is infectious at the start of the epidemic.
+
+We will assume that school closures will reduce the contacts between school aged children (aged 0-15) by 0.5, and will cause a small reduction (0.01) in the contacts between adults (aged 15 and over).
+
+::::::::::::::::::::::::::::::::::::: callout
+### Effect of interventions on contacts
+
+The contact matrix is scaled down by proportions for the period in which the intervention is in place. To explain the reduction, consider a contact matrix for two age groups with equal number of contacts:
+
+
+```{.output}
+ [,1] [,2]
+[1,] 1 1
+[2,] 1 1
+```
+
+If the reduction is 50% in group 1 and 10% in group 2, the contact matrix during the intervention will be:
+
+
+```{.output}
+ [,1] [,2]
+[1,] 0.25 0.45
+[2,] 0.45 0.81
+```
+
+The contacts within group 1 are reduced by 50% twice to accommodate for a 50% reduction in outgoing and incoming contacts ($1\times 0.5 \times 0.5 = 0.25$). Similarly, the contacts within group 2 are reduced by 10% twice. The contacts between group 1 and group 2 are reduced by 50% and then by 10% ($1 \times 0.5 \times 0.9= 0.45$).
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+To include an intervention in our model we must create an `intervention` object. The inputs are the name of the intervention (`name`), the type of intervention (`contacts` or `rate`), the start time (`time_begin`), the end time (`time_end`) and the reduction (`reduction`). The values of the reduction matrix are specified in the same order as the age groups in the contact matrix.
+
+
+```r
+rownames(contact_matrix)
+```
+
+```{.output}
+[1] "[0,15)" "[15,65)" "65+"
+```
+
+Therefore, we specify ` reduction = matrix(c(0.5, 0.01, 0.01))`. We assume that the school closures start on day 50 and are in place for a further 100 days. Therefore our intervention object is :
+
+
+```r
+close_schools <- intervention(
+ name = "School closure",
+ type = "contacts",
+ time_begin = 50,
+ time_end = 50 + 100,
+ reduction = matrix(c(0.5, 0.01, 0.01))
+)
+```
+
+
+
+
+To run the model with an intervention we set ` intervention = list(contacts = close_schools)` as follows:
+
+
+```r
+output_school <- model_default_cpp(
+ population = uk_population,
+ infection = covid,
+ intervention = list(contacts = close_schools),
+ time_end = 300, increment = 1.0
+)
+```
+
+
+We see that with the intervention (solid line) in place, the infection still spreads through the population, though the epidemic peak is smaller than the baseline with no intervention in place (dashed line).
+
+
+
+#### Effect of mask wearing on COVID-19 spread
+
+We can model the effect of other NPIs as reducing the value of relevant parameters. For example, we want to investigate the effect of mask wearing on the number of individuals infectious with COVID-19 through time.
+
+We expect that mask wearing will reduce an individual's infectiousness. As we are using a population based model, we cannot make changes to individual behaviour and so assume that the transmission rate $\beta$ is reduced by a proportion due to mask wearing in the population. We specify this proportion, $\theta$ as product of the proportion wearing masks multiplied by the proportion reduction in transmissibility (adapted from [Li et al. 2020](https://doi.org/10.1371/journal.pone.0237691))
+
+We create an intervention object with `type = rate` and `reduction = 0.161`. Using parameters adapted from [Li et al. 2020](https://doi.org/10.1371/journal.pone.0237691) we have proportion wearing masks = coverage $\times$ availability = $0.54 \times 0.525 = 0.2835$, proportion reduction in transmissibility = $0.575$. Therefore, $\theta = 0.2835 \times 0.575 = 0.163$. We assume that the mask wearing mandate starts at day 40 and is in place for 200 days.
+
+
+```r
+mask_mandate <- intervention(
+ name = "mask mandate",
+ type = "rate",
+ time_begin = 40,
+ time_end = 40 + 200,
+ reduction = 0.163
+)
+```
+
+To implement this intervention on the parameter $\beta$, we specify `intervention = list(beta = mask_mandate)`.
+
+
+```r
+output_masks <- model_default_cpp(
+ population = uk_population,
+ infection = covid,
+ intervention = list(beta = mask_mandate),
+ time_end = 300, increment = 1.0
+)
+```
+
+
+
+
+
+
+## Pharmaceutical interventions
+
+Models can be used to investigate the effect of pharmaceutical interventions, such as vaccination. In this case, it is useful to add another disease state to track the number of vaccinated individuals through time. The diagram below shows an SEIRV model where susceptible individuals are vaccinated and then move to the $V$ class.
+
+
+
+The equations describing this model are as follows:
+
+$$
+\begin{aligned}
+\frac{dS_i}{dt} & = - \beta S_i \sum_j C_{i,j} I_j -\nu_{t} S_i \\
+\frac{dE_i}{dt} &= \beta S_i\sum_j C_{i,j} I_j - \alpha E_i \\
+\frac{dI_i}{dt} &= \alpha E_i - \gamma I_i \\
+\frac{dR_i}{dt} &=\gamma I_i \\
+\frac{dV_i}{dt} & =\nu_{i,t} S_i\\
+\end{aligned}
+$$
+Individuals are vaccinated at an age group ($i$) specific time dependent ($t$) vaccination rate ($\nu$). The SEIR components of these equations are described in the tutorial Simulating transmission.
+
+To explore the effect of vaccination we need to create a vaccination object. As vaccination is age group specific, we must pass an age groups specific vaccination rate $\nu$ and age group specific start and end times of the vaccination program. Here we will assume all age groups are vaccinated at the same rate and that the vaccination program starts on day 40 and is in place for 150 days.
+
+
+
+```r
+# prepare a vaccination object
+vaccinate <- vaccination(
+ name = "vaccinate all",
+ time_begin = matrix(40, nrow(contact_matrix)),
+ time_end = matrix(40 + 150, nrow(contact_matrix)),
+ nu = matrix(c(0.01, 0.01, 0.01))
+)
+```
+
+We pass our vaccination object using `vaccination = vaccinate`:
+
+
+```r
+output_vaccinate <- model_default_cpp(
+ population = uk_population,
+ infection = covid,
+ vaccination = vaccinate,
+ time_end = 300, increment = 1.0
+)
+```
+
+Here we see that the total number of infectious individuals when vaccination is in place is much lower compared to school closures and mask wearing interventions.
+
+
+
+
+## Summary
+
+Modelling interventions requires assumptions of how interventions affect model parameters such as contact matrices or parameter values. Next we want quantify the effect of an interventions. In the next tutorial, we will learn how to compare intervention scenarios against each other.
+
+
+::::::::::::::::::::::::::::::::::::: keypoints
+
+- Different types of intervention can be implemented using mathematical modelling
+
+::::::::::::::::::::::::::::::::::::::::::::::::
diff --git a/reference.md b/reference.md
new file mode 100644
index 00000000..5cec1299
--- /dev/null
+++ b/reference.md
@@ -0,0 +1,82 @@
+---
+title: 'Glossary of Terms: Epiverse-TRACE'
+---
+
+## A
+
+[Airborne transmission]{#airborne}
+: Individuals become infected via contact with infectious particles in the air. Examples include influenza and COVID-19. Atler et al. (2023) discuss about [factors and management procedures](https://www.ncbi.nlm.nih.gov/books/NBK531468/) of airborne transmission.
+
+
+
+
+
+## D
+
+[Deterministic model]{#deterministic}
+: Models that will always have the same trajectory for given initial conditions and parameter values. Examples include ordinary differential equations and difference equations.
+
+[Direct transmission]{#direct}
+: Individuals become infected via direct contact with other infected humans. Airborne transmitted infections are often modelled as directly transmitted infections as they require close contact with infected individuals for successful transmission.
+
+
+
+
+
+
+
+
+
+## I
+
+[Incubation period]{#incubation}
+: The time between becoming infected and the onset of infectiousness, same as [latent period](#latent).
+
+[Indirect transmission]{#indirect}
+: Indirectly transmitted infections are passed on to humans via contact with vectors, animals or contaminated environment. Vector-borne infections, zoonoses and water-borne infections are modelled as indirectly transmitted.
+
+
+
+
+
+## L
+
+[Latent period]{#latent}
+: The time between becoming infected and the onset of infectiousness, same as [incubation period](#incubation).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## S
+
+[Stochastic model]{#stochastic}
+: A model that includes some stochastic process resulting in variation in model simulations for the same initial conditions and parameter values. Examples include stochastic differential equations and branching process models. For more detail see [Allen (2017)](https://doi.org/10.1016/j.idm.2017.03.001).
+
+
+
+
+
+
+## V
+
+[Vector-borne transmission]{#vectorborne}
+: Vector-borne transmission means an infection can be passed from a vector (e.g. mosquitoes) to humans. Examples of vector-borne diseases include malaria and dengue. The World Health Organization have a [Fact sheet about Vector-borne diseases](https://www.who.int/news-room/fact-sheets/detail/vector-borne-diseases) with key information and a list of them according to their vector.
+
+
+
+
+
+
+
+
+
diff --git a/renv.lock b/renv.lock
new file mode 100644
index 00000000..c295b771
--- /dev/null
+++ b/renv.lock
@@ -0,0 +1,1993 @@
+{
+ "R": {
+ "Version": "4.3.2",
+ "Repositories": [
+ {
+ "Name": "carpentries",
+ "URL": "https://carpentries.r-universe.dev"
+ },
+ {
+ "Name": "carpentries_archive",
+ "URL": "https://carpentries.github.io/drat"
+ },
+ {
+ "Name": "CRAN",
+ "URL": "https://cran.rstudio.com"
+ }
+ ]
+ },
+ "Packages": {
+ "BH": {
+ "Package": "BH",
+ "Version": "1.81.0-1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "68122010f01c4dcfbe58ce7112f2433d"
+ },
+ "DBI": {
+ "Package": "DBI",
+ "Version": "1.1.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "methods"
+ ],
+ "Hash": "b2866e62bab9378c3cc9476a1954226b"
+ },
+ "DiagrammeR": {
+ "Package": "DiagrammeR",
+ "Version": "1.0.10",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "RColorBrewer",
+ "downloader",
+ "dplyr",
+ "glue",
+ "htmltools",
+ "htmlwidgets",
+ "igraph",
+ "magrittr",
+ "purrr",
+ "readr",
+ "rlang",
+ "rstudioapi",
+ "scales",
+ "stringr",
+ "tibble",
+ "tidyr",
+ "viridis",
+ "visNetwork"
+ ],
+ "Hash": "f3de4a4878163a4629a528bbcc6e655d"
+ },
+ "MASS": {
+ "Package": "MASS",
+ "Version": "7.3-60",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "grDevices",
+ "graphics",
+ "methods",
+ "stats",
+ "utils"
+ ],
+ "Hash": "a56a6365b3fa73293ea8d084be0d9bb0"
+ },
+ "Matrix": {
+ "Package": "Matrix",
+ "Version": "1.6-1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "grDevices",
+ "graphics",
+ "grid",
+ "lattice",
+ "methods",
+ "stats",
+ "utils"
+ ],
+ "Hash": "1a00d4828f33a9d690806e98bd17150c"
+ },
+ "R6": {
+ "Package": "R6",
+ "Version": "2.5.1",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "470851b6d5d0ac559e9d01bb352b4021"
+ },
+ "RColorBrewer": {
+ "Package": "RColorBrewer",
+ "Version": "1.1-3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "45f0398006e83a5b10b72a90663d8d8c"
+ },
+ "Rcpp": {
+ "Package": "Rcpp",
+ "Version": "1.0.11",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "methods",
+ "utils"
+ ],
+ "Hash": "ae6cbbe1492f4de79c45fce06f967ce8"
+ },
+ "RcppEigen": {
+ "Package": "RcppEigen",
+ "Version": "0.3.3.9.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "Matrix",
+ "R",
+ "Rcpp",
+ "stats",
+ "utils"
+ ],
+ "Hash": "1e035db628cefb315c571202d70202fe"
+ },
+ "askpass": {
+ "Package": "askpass",
+ "Version": "1.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "sys"
+ ],
+ "Hash": "cad6cf7f1d5f6e906700b9d3e718c796"
+ },
+ "backports": {
+ "Package": "backports",
+ "Version": "1.4.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "c39fbec8a30d23e721980b8afb31984c"
+ },
+ "base64enc": {
+ "Package": "base64enc",
+ "Version": "0.1-3",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "543776ae6848fde2f48ff3816d0628bc"
+ },
+ "bit": {
+ "Package": "bit",
+ "Version": "4.0.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "d242abec29412ce988848d0294b208fd"
+ },
+ "bit64": {
+ "Package": "bit64",
+ "Version": "4.0.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "bit",
+ "methods",
+ "stats",
+ "utils"
+ ],
+ "Hash": "9fe98599ca456d6552421db0d6772d8f"
+ },
+ "blob": {
+ "Package": "blob",
+ "Version": "1.2.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "methods",
+ "rlang",
+ "vctrs"
+ ],
+ "Hash": "40415719b5a479b87949f3aa0aee737c"
+ },
+ "brio": {
+ "Package": "brio",
+ "Version": "1.1.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "976cf154dfb043c012d87cddd8bca363"
+ },
+ "broom": {
+ "Package": "broom",
+ "Version": "1.0.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "backports",
+ "dplyr",
+ "ellipsis",
+ "generics",
+ "glue",
+ "lifecycle",
+ "purrr",
+ "rlang",
+ "stringr",
+ "tibble",
+ "tidyr"
+ ],
+ "Hash": "fd25391c3c4f6ecf0fa95f1e6d15378c"
+ },
+ "bslib": {
+ "Package": "bslib",
+ "Version": "0.5.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "base64enc",
+ "cachem",
+ "grDevices",
+ "htmltools",
+ "jquerylib",
+ "jsonlite",
+ "memoise",
+ "mime",
+ "rlang",
+ "sass"
+ ],
+ "Hash": "283015ddfbb9d7bf15ea9f0b5698f0d9"
+ },
+ "cachem": {
+ "Package": "cachem",
+ "Version": "1.0.8",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "fastmap",
+ "rlang"
+ ],
+ "Hash": "c35768291560ce302c0a6589f92e837d"
+ },
+ "callr": {
+ "Package": "callr",
+ "Version": "3.7.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "R6",
+ "processx",
+ "utils"
+ ],
+ "Hash": "9b2191ede20fa29828139b9900922e51"
+ },
+ "cellranger": {
+ "Package": "cellranger",
+ "Version": "1.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "rematch",
+ "tibble"
+ ],
+ "Hash": "f61dbaec772ccd2e17705c1e872e9e7c"
+ },
+ "checkmate": {
+ "Package": "checkmate",
+ "Version": "2.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "backports",
+ "utils"
+ ],
+ "Hash": "ca9c113196136f4a9ca9ce6079c2c99e"
+ },
+ "cli": {
+ "Package": "cli",
+ "Version": "3.6.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "utils"
+ ],
+ "Hash": "89e6d8219950eac806ae0c489052048a"
+ },
+ "clipr": {
+ "Package": "clipr",
+ "Version": "0.8.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "utils"
+ ],
+ "Hash": "3f038e5ac7f41d4ac41ce658c85e3042"
+ },
+ "colorspace": {
+ "Package": "colorspace",
+ "Version": "2.1-0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "grDevices",
+ "graphics",
+ "methods",
+ "stats"
+ ],
+ "Hash": "f20c47fd52fae58b4e377c37bb8c335b"
+ },
+ "conflicted": {
+ "Package": "conflicted",
+ "Version": "1.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "memoise",
+ "rlang"
+ ],
+ "Hash": "bb097fccb22d156624fd07cd2894ddb6"
+ },
+ "countrycode": {
+ "Package": "countrycode",
+ "Version": "1.5.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "bbc5ab5258e5ddf38f2cd2c5a7afa860"
+ },
+ "cpp11": {
+ "Package": "cpp11",
+ "Version": "0.4.6",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "707fae4bbf73697ec8d85f9d7076c061"
+ },
+ "crayon": {
+ "Package": "crayon",
+ "Version": "1.5.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "grDevices",
+ "methods",
+ "utils"
+ ],
+ "Hash": "e8a1e41acf02548751f45c718d55aa6a"
+ },
+ "curl": {
+ "Package": "curl",
+ "Version": "5.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "9123f3ef96a2c1a93927d828b2fe7d4c"
+ },
+ "data.table": {
+ "Package": "data.table",
+ "Version": "1.14.8",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "methods"
+ ],
+ "Hash": "b4c06e554f33344e044ccd7fdca750a9"
+ },
+ "dbplyr": {
+ "Package": "dbplyr",
+ "Version": "2.4.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "DBI",
+ "R",
+ "R6",
+ "blob",
+ "cli",
+ "dplyr",
+ "glue",
+ "lifecycle",
+ "magrittr",
+ "methods",
+ "pillar",
+ "purrr",
+ "rlang",
+ "tibble",
+ "tidyr",
+ "tidyselect",
+ "utils",
+ "vctrs",
+ "withr"
+ ],
+ "Hash": "59351f28a81f0742720b85363c4fdd61"
+ },
+ "deSolve": {
+ "Package": "deSolve",
+ "Version": "1.38",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "grDevices",
+ "graphics",
+ "methods",
+ "stats"
+ ],
+ "Hash": "860e6724c3bcdf194e8e043b97ab6f6e"
+ },
+ "desc": {
+ "Package": "desc",
+ "Version": "1.4.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "R6",
+ "cli",
+ "rprojroot",
+ "utils"
+ ],
+ "Hash": "6b9602c7ebbe87101a9c8edb6e8b6d21"
+ },
+ "diffobj": {
+ "Package": "diffobj",
+ "Version": "0.3.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "crayon",
+ "methods",
+ "stats",
+ "tools",
+ "utils"
+ ],
+ "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8"
+ },
+ "digest": {
+ "Package": "digest",
+ "Version": "0.6.33",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "utils"
+ ],
+ "Hash": "b18a9cf3c003977b0cc49d5e76ebe48d"
+ },
+ "dotCall64": {
+ "Package": "dotCall64",
+ "Version": "1.1-0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "7744a30055fea449fc7cd98323b5887c"
+ },
+ "downloader": {
+ "Package": "downloader",
+ "Version": "0.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "digest",
+ "utils"
+ ],
+ "Hash": "f4f2a915e0dedbdf016a83b63477349f"
+ },
+ "dplyr": {
+ "Package": "dplyr",
+ "Version": "1.1.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "R6",
+ "cli",
+ "generics",
+ "glue",
+ "lifecycle",
+ "magrittr",
+ "methods",
+ "pillar",
+ "rlang",
+ "tibble",
+ "tidyselect",
+ "utils",
+ "vctrs"
+ ],
+ "Hash": "e85ffbebaad5f70e1a2e2ef4302b4949"
+ },
+ "dtplyr": {
+ "Package": "dtplyr",
+ "Version": "1.3.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "data.table",
+ "dplyr",
+ "glue",
+ "lifecycle",
+ "rlang",
+ "tibble",
+ "tidyselect",
+ "vctrs"
+ ],
+ "Hash": "54ed3ea01b11e81a86544faaecfef8e2"
+ },
+ "ellipsis": {
+ "Package": "ellipsis",
+ "Version": "0.3.2",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "R",
+ "rlang"
+ ],
+ "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077"
+ },
+ "epidemics": {
+ "Package": "epidemics",
+ "Version": "0.0.0.9000",
+ "Source": "GitHub",
+ "RemoteType": "github",
+ "RemoteHost": "api.github.com",
+ "RemoteRepo": "epidemics",
+ "RemoteUsername": "epiverse-trace",
+ "RemotePkgRef": "epiverse-trace/epidemics",
+ "RemoteRef": "HEAD",
+ "RemoteSha": "6004c3a7e50be7b127070c4e96a011630307df17",
+ "Requirements": [
+ "BH",
+ "Rcpp",
+ "RcppEigen",
+ "checkmate",
+ "data.table",
+ "deSolve",
+ "glue",
+ "jsonlite",
+ "stats",
+ "utils"
+ ],
+ "Hash": "96a7b1457b8a5d89f146d0abf3de7eff"
+ },
+ "evaluate": {
+ "Package": "evaluate",
+ "Version": "0.22",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "methods"
+ ],
+ "Hash": "66f39c7a21e03c4dcb2c2d21d738d603"
+ },
+ "fansi": {
+ "Package": "fansi",
+ "Version": "1.0.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "grDevices",
+ "utils"
+ ],
+ "Hash": "3e8583a60163b4bc1a80016e63b9959e"
+ },
+ "farver": {
+ "Package": "farver",
+ "Version": "2.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "8106d78941f34855c440ddb946b8f7a5"
+ },
+ "fastmap": {
+ "Package": "fastmap",
+ "Version": "1.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "f7736a18de97dea803bde0a2daaafb27"
+ },
+ "fields": {
+ "Package": "fields",
+ "Version": "15.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "maps",
+ "methods",
+ "spam",
+ "viridisLite"
+ ],
+ "Hash": "66fa5a16464666772f4929f8f5b2fc71"
+ },
+ "fontawesome": {
+ "Package": "fontawesome",
+ "Version": "0.5.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "htmltools",
+ "rlang"
+ ],
+ "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d"
+ },
+ "forcats": {
+ "Package": "forcats",
+ "Version": "1.0.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "glue",
+ "lifecycle",
+ "magrittr",
+ "rlang",
+ "tibble"
+ ],
+ "Hash": "1a0a9a3d5083d0d573c4214576f1e690"
+ },
+ "fs": {
+ "Package": "fs",
+ "Version": "1.6.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "methods"
+ ],
+ "Hash": "47b5f30c720c23999b913a1a635cf0bb"
+ },
+ "gargle": {
+ "Package": "gargle",
+ "Version": "1.5.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "fs",
+ "glue",
+ "httr",
+ "jsonlite",
+ "lifecycle",
+ "openssl",
+ "rappdirs",
+ "rlang",
+ "stats",
+ "utils",
+ "withr"
+ ],
+ "Hash": "fc0b272e5847c58cd5da9b20eedbd026"
+ },
+ "generics": {
+ "Package": "generics",
+ "Version": "0.1.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "methods"
+ ],
+ "Hash": "15e9634c0fcd294799e9b2e929ed1b86"
+ },
+ "ggplot2": {
+ "Package": "ggplot2",
+ "Version": "3.4.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "MASS",
+ "R",
+ "cli",
+ "glue",
+ "grDevices",
+ "grid",
+ "gtable",
+ "isoband",
+ "lifecycle",
+ "mgcv",
+ "rlang",
+ "scales",
+ "stats",
+ "tibble",
+ "vctrs",
+ "withr"
+ ],
+ "Hash": "313d31eff2274ecf4c1d3581db7241f9"
+ },
+ "glue": {
+ "Package": "glue",
+ "Version": "1.6.2",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "R",
+ "methods"
+ ],
+ "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e"
+ },
+ "googledrive": {
+ "Package": "googledrive",
+ "Version": "2.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "gargle",
+ "glue",
+ "httr",
+ "jsonlite",
+ "lifecycle",
+ "magrittr",
+ "pillar",
+ "purrr",
+ "rlang",
+ "tibble",
+ "utils",
+ "uuid",
+ "vctrs",
+ "withr"
+ ],
+ "Hash": "e99641edef03e2a5e87f0a0b1fcc97f4"
+ },
+ "googlesheets4": {
+ "Package": "googlesheets4",
+ "Version": "1.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cellranger",
+ "cli",
+ "curl",
+ "gargle",
+ "glue",
+ "googledrive",
+ "httr",
+ "ids",
+ "lifecycle",
+ "magrittr",
+ "methods",
+ "purrr",
+ "rematch2",
+ "rlang",
+ "tibble",
+ "utils",
+ "vctrs",
+ "withr"
+ ],
+ "Hash": "d6db1667059d027da730decdc214b959"
+ },
+ "gridExtra": {
+ "Package": "gridExtra",
+ "Version": "2.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "grDevices",
+ "graphics",
+ "grid",
+ "gtable",
+ "utils"
+ ],
+ "Hash": "7d7f283939f563670a697165b2cf5560"
+ },
+ "gtable": {
+ "Package": "gtable",
+ "Version": "0.3.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "glue",
+ "grid",
+ "lifecycle",
+ "rlang"
+ ],
+ "Hash": "b29cf3031f49b04ab9c852c912547eef"
+ },
+ "haven": {
+ "Package": "haven",
+ "Version": "2.5.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "cpp11",
+ "forcats",
+ "hms",
+ "lifecycle",
+ "methods",
+ "readr",
+ "rlang",
+ "tibble",
+ "tidyselect",
+ "vctrs"
+ ],
+ "Hash": "9b302fe352f9cfc5dcf0a4139af3a565"
+ },
+ "highr": {
+ "Package": "highr",
+ "Version": "0.10",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "R",
+ "xfun"
+ ],
+ "Hash": "06230136b2d2b9ba5805e1963fa6e890"
+ },
+ "hms": {
+ "Package": "hms",
+ "Version": "1.1.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "lifecycle",
+ "methods",
+ "pkgconfig",
+ "rlang",
+ "vctrs"
+ ],
+ "Hash": "b59377caa7ed00fa41808342002138f9"
+ },
+ "htmltools": {
+ "Package": "htmltools",
+ "Version": "0.5.6.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "base64enc",
+ "digest",
+ "ellipsis",
+ "fastmap",
+ "grDevices",
+ "rlang",
+ "utils"
+ ],
+ "Hash": "1e12fe667316a76508898839ecfb2d00"
+ },
+ "htmlwidgets": {
+ "Package": "htmlwidgets",
+ "Version": "1.6.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "grDevices",
+ "htmltools",
+ "jsonlite",
+ "knitr",
+ "rmarkdown",
+ "yaml"
+ ],
+ "Hash": "a865aa85bcb2697f47505bfd70422471"
+ },
+ "httr": {
+ "Package": "httr",
+ "Version": "1.4.7",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "R6",
+ "curl",
+ "jsonlite",
+ "mime",
+ "openssl"
+ ],
+ "Hash": "ac107251d9d9fd72f0ca8049988f1d7f"
+ },
+ "ids": {
+ "Package": "ids",
+ "Version": "1.0.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "openssl",
+ "uuid"
+ ],
+ "Hash": "99df65cfef20e525ed38c3d2577f7190"
+ },
+ "igraph": {
+ "Package": "igraph",
+ "Version": "1.5.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "Matrix",
+ "R",
+ "cli",
+ "cpp11",
+ "grDevices",
+ "graphics",
+ "lifecycle",
+ "magrittr",
+ "methods",
+ "pkgconfig",
+ "rlang",
+ "stats",
+ "utils"
+ ],
+ "Hash": "80401cb5ec513e8ddc56764d03f63669"
+ },
+ "isoband": {
+ "Package": "isoband",
+ "Version": "0.2.7",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "grid",
+ "utils"
+ ],
+ "Hash": "0080607b4a1a7b28979aecef976d8bc2"
+ },
+ "jquerylib": {
+ "Package": "jquerylib",
+ "Version": "0.1.4",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "htmltools"
+ ],
+ "Hash": "5aab57a3bd297eee1c1d862735972182"
+ },
+ "jsonlite": {
+ "Package": "jsonlite",
+ "Version": "1.8.7",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "methods"
+ ],
+ "Hash": "266a20443ca13c65688b2116d5220f76"
+ },
+ "knitr": {
+ "Package": "knitr",
+ "Version": "1.44",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "evaluate",
+ "highr",
+ "methods",
+ "tools",
+ "xfun",
+ "yaml"
+ ],
+ "Hash": "60885b9f746c9dfaef110d070b5f7dc0"
+ },
+ "labeling": {
+ "Package": "labeling",
+ "Version": "0.4.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "graphics",
+ "stats"
+ ],
+ "Hash": "b64ec208ac5bc1852b285f665d6368b3"
+ },
+ "lattice": {
+ "Package": "lattice",
+ "Version": "0.22-4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "grDevices",
+ "graphics",
+ "grid",
+ "stats",
+ "utils"
+ ],
+ "Hash": "7ae8282579016aee39386e2813d7c342"
+ },
+ "lifecycle": {
+ "Package": "lifecycle",
+ "Version": "1.0.3",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "R",
+ "cli",
+ "glue",
+ "rlang"
+ ],
+ "Hash": "001cecbeac1cff9301bdc3775ee46a86"
+ },
+ "lubridate": {
+ "Package": "lubridate",
+ "Version": "1.9.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "generics",
+ "methods",
+ "timechange"
+ ],
+ "Hash": "680ad542fbcf801442c83a6ac5a2126c"
+ },
+ "magrittr": {
+ "Package": "magrittr",
+ "Version": "2.0.3",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "7ce2733a9826b3aeb1775d56fd305472"
+ },
+ "maps": {
+ "Package": "maps",
+ "Version": "3.4.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "graphics",
+ "utils"
+ ],
+ "Hash": "644a88fb036ab50cee0b715394eefa1a"
+ },
+ "memoise": {
+ "Package": "memoise",
+ "Version": "2.0.1",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "cachem",
+ "rlang"
+ ],
+ "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c"
+ },
+ "mgcv": {
+ "Package": "mgcv",
+ "Version": "1.9-0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "Matrix",
+ "R",
+ "graphics",
+ "methods",
+ "nlme",
+ "splines",
+ "stats",
+ "utils"
+ ],
+ "Hash": "086028ca0460d0c368028d3bda58f31b"
+ },
+ "mime": {
+ "Package": "mime",
+ "Version": "0.12",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "tools"
+ ],
+ "Hash": "18e9c28c1d3ca1560ce30658b22ce104"
+ },
+ "modelr": {
+ "Package": "modelr",
+ "Version": "0.1.11",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "broom",
+ "magrittr",
+ "purrr",
+ "rlang",
+ "tibble",
+ "tidyr",
+ "tidyselect",
+ "vctrs"
+ ],
+ "Hash": "4f50122dc256b1b6996a4703fecea821"
+ },
+ "munsell": {
+ "Package": "munsell",
+ "Version": "0.5.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "colorspace",
+ "methods"
+ ],
+ "Hash": "6dfe8bf774944bd5595785e3229d8771"
+ },
+ "nlme": {
+ "Package": "nlme",
+ "Version": "3.1-163",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "graphics",
+ "lattice",
+ "stats",
+ "utils"
+ ],
+ "Hash": "8d1938040a05566f4f7a14af4feadd6b"
+ },
+ "oai": {
+ "Package": "oai",
+ "Version": "0.4.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "httr",
+ "plyr",
+ "stringr",
+ "tibble",
+ "xml2"
+ ],
+ "Hash": "2decae573db4fc6a7798721eb5326c10"
+ },
+ "openssl": {
+ "Package": "openssl",
+ "Version": "2.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "askpass"
+ ],
+ "Hash": "2a0dc8c6adfb6f032e4d4af82d258ab5"
+ },
+ "pak": {
+ "Package": "pak",
+ "Version": "0.6.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "tools",
+ "utils"
+ ],
+ "Hash": "8b18efeaf9e27136a65692bcec07fc7a"
+ },
+ "pillar": {
+ "Package": "pillar",
+ "Version": "1.9.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "cli",
+ "fansi",
+ "glue",
+ "lifecycle",
+ "rlang",
+ "utf8",
+ "utils",
+ "vctrs"
+ ],
+ "Hash": "15da5a8412f317beeee6175fbc76f4bb"
+ },
+ "pkgbuild": {
+ "Package": "pkgbuild",
+ "Version": "1.4.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "R6",
+ "callr",
+ "cli",
+ "crayon",
+ "desc",
+ "prettyunits",
+ "processx",
+ "rprojroot"
+ ],
+ "Hash": "beb25b32a957a22a5c301a9e441190b3"
+ },
+ "pkgconfig": {
+ "Package": "pkgconfig",
+ "Version": "2.0.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "utils"
+ ],
+ "Hash": "01f28d4278f15c76cddbea05899c5d6f"
+ },
+ "pkgload": {
+ "Package": "pkgload",
+ "Version": "1.3.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "crayon",
+ "desc",
+ "fs",
+ "glue",
+ "methods",
+ "pkgbuild",
+ "rlang",
+ "rprojroot",
+ "utils",
+ "withr"
+ ],
+ "Hash": "903d68319ae9923fb2e2ee7fa8230b91"
+ },
+ "plyr": {
+ "Package": "plyr",
+ "Version": "1.8.9",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "Rcpp"
+ ],
+ "Hash": "6b8177fd19982f0020743fadbfdbd933"
+ },
+ "praise": {
+ "Package": "praise",
+ "Version": "1.0.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "a555924add98c99d2f411e37e7d25e9f"
+ },
+ "prettyunits": {
+ "Package": "prettyunits",
+ "Version": "1.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7"
+ },
+ "processx": {
+ "Package": "processx",
+ "Version": "3.8.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "R6",
+ "ps",
+ "utils"
+ ],
+ "Hash": "3efbd8ac1be0296a46c55387aeace0f3"
+ },
+ "progress": {
+ "Package": "progress",
+ "Version": "1.2.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R6",
+ "crayon",
+ "hms",
+ "prettyunits"
+ ],
+ "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061"
+ },
+ "ps": {
+ "Package": "ps",
+ "Version": "1.7.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "utils"
+ ],
+ "Hash": "709d852d33178db54b17c722e5b1e594"
+ },
+ "purrr": {
+ "Package": "purrr",
+ "Version": "1.0.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "lifecycle",
+ "magrittr",
+ "rlang",
+ "vctrs"
+ ],
+ "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc"
+ },
+ "ragg": {
+ "Package": "ragg",
+ "Version": "1.2.6",
+ "Source": "Repository",
+ "Repository": "https://carpentries.r-universe.dev",
+ "Requirements": [
+ "systemfonts",
+ "textshaping"
+ ],
+ "Hash": "6ba2fa8740abdc2cc148407836509901"
+ },
+ "rappdirs": {
+ "Package": "rappdirs",
+ "Version": "0.3.3",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "5e3c5dc0b071b21fa128676560dbe94d"
+ },
+ "readr": {
+ "Package": "readr",
+ "Version": "2.1.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "R6",
+ "cli",
+ "clipr",
+ "cpp11",
+ "crayon",
+ "hms",
+ "lifecycle",
+ "methods",
+ "rlang",
+ "tibble",
+ "tzdb",
+ "utils",
+ "vroom"
+ ],
+ "Hash": "b5047343b3825f37ad9d3b5d89aa1078"
+ },
+ "readxl": {
+ "Package": "readxl",
+ "Version": "1.4.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cellranger",
+ "cpp11",
+ "progress",
+ "tibble",
+ "utils"
+ ],
+ "Hash": "8cf9c239b96df1bbb133b74aef77ad0a"
+ },
+ "rematch": {
+ "Package": "rematch",
+ "Version": "2.0.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "cbff1b666c6fa6d21202f07e2318d4f1"
+ },
+ "rematch2": {
+ "Package": "rematch2",
+ "Version": "2.1.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "tibble"
+ ],
+ "Hash": "76c9e04c712a05848ae7a23d2f170a40"
+ },
+ "reprex": {
+ "Package": "reprex",
+ "Version": "2.0.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "callr",
+ "cli",
+ "clipr",
+ "fs",
+ "glue",
+ "knitr",
+ "lifecycle",
+ "rlang",
+ "rmarkdown",
+ "rstudioapi",
+ "utils",
+ "withr"
+ ],
+ "Hash": "d66fe009d4c20b7ab1927eb405db9ee2"
+ },
+ "rlang": {
+ "Package": "rlang",
+ "Version": "1.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "utils"
+ ],
+ "Hash": "a85c767b55f0bf9b7ad16c6d7baee5bb"
+ },
+ "rmarkdown": {
+ "Package": "rmarkdown",
+ "Version": "2.25",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "bslib",
+ "evaluate",
+ "fontawesome",
+ "htmltools",
+ "jquerylib",
+ "jsonlite",
+ "knitr",
+ "methods",
+ "stringr",
+ "tinytex",
+ "tools",
+ "utils",
+ "xfun",
+ "yaml"
+ ],
+ "Hash": "d65e35823c817f09f4de424fcdfa812a"
+ },
+ "rprojroot": {
+ "Package": "rprojroot",
+ "Version": "2.0.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "1de7ab598047a87bba48434ba35d497d"
+ },
+ "rstudioapi": {
+ "Package": "rstudioapi",
+ "Version": "0.15.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "5564500e25cffad9e22244ced1379887"
+ },
+ "rvest": {
+ "Package": "rvest",
+ "Version": "1.0.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "glue",
+ "httr",
+ "lifecycle",
+ "magrittr",
+ "rlang",
+ "selectr",
+ "tibble",
+ "withr",
+ "xml2"
+ ],
+ "Hash": "a4a5ac819a467808c60e36e92ddf195e"
+ },
+ "sass": {
+ "Package": "sass",
+ "Version": "0.4.7",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R6",
+ "fs",
+ "htmltools",
+ "rappdirs",
+ "rlang"
+ ],
+ "Hash": "6bd4d33b50ff927191ec9acbf52fd056"
+ },
+ "scales": {
+ "Package": "scales",
+ "Version": "1.2.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "R6",
+ "RColorBrewer",
+ "farver",
+ "labeling",
+ "lifecycle",
+ "munsell",
+ "rlang",
+ "viridisLite"
+ ],
+ "Hash": "906cb23d2f1c5680b8ce439b44c6fa63"
+ },
+ "selectr": {
+ "Package": "selectr",
+ "Version": "0.4-2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "R6",
+ "methods",
+ "stringr"
+ ],
+ "Hash": "3838071b66e0c566d55cc26bd6e27bf4"
+ },
+ "socialmixr": {
+ "Package": "socialmixr",
+ "Version": "0.3.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "countrycode",
+ "curl",
+ "data.table",
+ "fields",
+ "grDevices",
+ "httr",
+ "jsonlite",
+ "lubridate",
+ "oai",
+ "wpp2017",
+ "xml2"
+ ],
+ "Hash": "70e8d107f01e2c1b54154c3aa6200e00"
+ },
+ "spam": {
+ "Package": "spam",
+ "Version": "2.10-0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "Rcpp",
+ "dotCall64",
+ "grid",
+ "methods"
+ ],
+ "Hash": "ffe1f9e95a4375530747b268f82b5086"
+ },
+ "stringi": {
+ "Package": "stringi",
+ "Version": "1.7.12",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "stats",
+ "tools",
+ "utils"
+ ],
+ "Hash": "ca8bd84263c77310739d2cf64d84d7c9"
+ },
+ "stringr": {
+ "Package": "stringr",
+ "Version": "1.5.0",
+ "Source": "Repository",
+ "Repository": "RSPM",
+ "Requirements": [
+ "R",
+ "cli",
+ "glue",
+ "lifecycle",
+ "magrittr",
+ "rlang",
+ "stringi",
+ "vctrs"
+ ],
+ "Hash": "671a4d384ae9d32fc47a14e98bfa3dc8"
+ },
+ "sys": {
+ "Package": "sys",
+ "Version": "3.4.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "3a1be13d68d47a8cd0bfd74739ca1555"
+ },
+ "systemfonts": {
+ "Package": "systemfonts",
+ "Version": "1.0.5",
+ "Source": "Repository",
+ "Repository": "https://carpentries.r-universe.dev",
+ "Requirements": [
+ "R",
+ "cpp11"
+ ],
+ "Hash": "15b594369e70b975ba9f064295983499"
+ },
+ "testthat": {
+ "Package": "testthat",
+ "Version": "3.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "R6",
+ "brio",
+ "callr",
+ "cli",
+ "desc",
+ "digest",
+ "ellipsis",
+ "evaluate",
+ "jsonlite",
+ "lifecycle",
+ "magrittr",
+ "methods",
+ "pkgload",
+ "praise",
+ "processx",
+ "ps",
+ "rlang",
+ "utils",
+ "waldo",
+ "withr"
+ ],
+ "Hash": "877508719fcb8c9525eccdadf07a5102"
+ },
+ "textshaping": {
+ "Package": "textshaping",
+ "Version": "0.3.7",
+ "Source": "Repository",
+ "Repository": "https://carpentries.r-universe.dev",
+ "Requirements": [
+ "R",
+ "cpp11",
+ "systemfonts"
+ ],
+ "Hash": "997aac9ad649e0ef3b97f96cddd5622b"
+ },
+ "tibble": {
+ "Package": "tibble",
+ "Version": "3.2.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "fansi",
+ "lifecycle",
+ "magrittr",
+ "methods",
+ "pillar",
+ "pkgconfig",
+ "rlang",
+ "utils",
+ "vctrs"
+ ],
+ "Hash": "a84e2cc86d07289b3b6f5069df7a004c"
+ },
+ "tidyr": {
+ "Package": "tidyr",
+ "Version": "1.3.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "cpp11",
+ "dplyr",
+ "glue",
+ "lifecycle",
+ "magrittr",
+ "purrr",
+ "rlang",
+ "stringr",
+ "tibble",
+ "tidyselect",
+ "utils",
+ "vctrs"
+ ],
+ "Hash": "e47debdc7ce599b070c8e78e8ac0cfcf"
+ },
+ "tidyselect": {
+ "Package": "tidyselect",
+ "Version": "1.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "glue",
+ "lifecycle",
+ "rlang",
+ "vctrs",
+ "withr"
+ ],
+ "Hash": "79540e5fcd9e0435af547d885f184fd5"
+ },
+ "tidyverse": {
+ "Package": "tidyverse",
+ "Version": "2.0.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "broom",
+ "cli",
+ "conflicted",
+ "dbplyr",
+ "dplyr",
+ "dtplyr",
+ "forcats",
+ "ggplot2",
+ "googledrive",
+ "googlesheets4",
+ "haven",
+ "hms",
+ "httr",
+ "jsonlite",
+ "lubridate",
+ "magrittr",
+ "modelr",
+ "pillar",
+ "purrr",
+ "ragg",
+ "readr",
+ "readxl",
+ "reprex",
+ "rlang",
+ "rstudioapi",
+ "rvest",
+ "stringr",
+ "tibble",
+ "tidyr",
+ "xml2"
+ ],
+ "Hash": "c328568cd14ea89a83bd4ca7f54ae07e"
+ },
+ "timechange": {
+ "Package": "timechange",
+ "Version": "0.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cpp11"
+ ],
+ "Hash": "8548b44f79a35ba1791308b61e6012d7"
+ },
+ "tinytex": {
+ "Package": "tinytex",
+ "Version": "0.48",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "xfun"
+ ],
+ "Hash": "8f96d229b7311beb32b94cf413b13f84"
+ },
+ "tzdb": {
+ "Package": "tzdb",
+ "Version": "0.4.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cpp11"
+ ],
+ "Hash": "f561504ec2897f4d46f0c7657e488ae1"
+ },
+ "utf8": {
+ "Package": "utf8",
+ "Version": "1.2.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "62b65c52671e6665f803ff02954446e9"
+ },
+ "uuid": {
+ "Package": "uuid",
+ "Version": "1.1-1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "3d78edfb977a69fc7a0341bee25e163f"
+ },
+ "vctrs": {
+ "Package": "vctrs",
+ "Version": "0.6.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "cli",
+ "glue",
+ "lifecycle",
+ "rlang"
+ ],
+ "Hash": "266c1ca411266ba8f365fcc726444b87"
+ },
+ "viridis": {
+ "Package": "viridis",
+ "Version": "0.6.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "ggplot2",
+ "gridExtra",
+ "viridisLite"
+ ],
+ "Hash": "80cd127bc8c9d3d9f0904ead9a9102f1"
+ },
+ "viridisLite": {
+ "Package": "viridisLite",
+ "Version": "0.4.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R"
+ ],
+ "Hash": "c826c7c4241b6fc89ff55aaea3fa7491"
+ },
+ "visNetwork": {
+ "Package": "visNetwork",
+ "Version": "2.1.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "grDevices",
+ "htmltools",
+ "htmlwidgets",
+ "jsonlite",
+ "magrittr",
+ "methods",
+ "stats",
+ "utils"
+ ],
+ "Hash": "3e48b097e8d9a91ecced2ed4817a678d"
+ },
+ "vroom": {
+ "Package": "vroom",
+ "Version": "1.6.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "bit64",
+ "cli",
+ "cpp11",
+ "crayon",
+ "glue",
+ "hms",
+ "lifecycle",
+ "methods",
+ "progress",
+ "rlang",
+ "stats",
+ "tibble",
+ "tidyselect",
+ "tzdb",
+ "vctrs",
+ "withr"
+ ],
+ "Hash": "9db52c1656cf19c124f93124ea57f0fd"
+ },
+ "waldo": {
+ "Package": "waldo",
+ "Version": "0.5.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "cli",
+ "diffobj",
+ "fansi",
+ "glue",
+ "methods",
+ "rematch2",
+ "rlang",
+ "tibble"
+ ],
+ "Hash": "2c993415154cdb94649d99ae138ff5e5"
+ },
+ "webshot": {
+ "Package": "webshot",
+ "Version": "0.5.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "callr",
+ "jsonlite",
+ "magrittr"
+ ],
+ "Hash": "16858ee1aba97f902d24049d4a44ef16"
+ },
+ "withr": {
+ "Package": "withr",
+ "Version": "2.5.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "grDevices",
+ "graphics",
+ "stats"
+ ],
+ "Hash": "d77c6f74be05c33164e33fbc85540cae"
+ },
+ "wpp2017": {
+ "Package": "wpp2017",
+ "Version": "1.2-3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "data.table"
+ ],
+ "Hash": "ee42417b66554b8fb1ab000b6a7a6588"
+ },
+ "xfun": {
+ "Package": "xfun",
+ "Version": "0.40",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "stats",
+ "tools"
+ ],
+ "Hash": "be07d23211245fc7d4209f54c4e4ffc8"
+ },
+ "xml2": {
+ "Package": "xml2",
+ "Version": "1.3.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Requirements": [
+ "R",
+ "methods"
+ ],
+ "Hash": "6c40e5cfcc6aefd88110666e18c31f40"
+ },
+ "yaml": {
+ "Package": "yaml",
+ "Version": "2.3.7",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "0d0056cc5383fbc240ccd0cb584bf436"
+ }
+ }
+}
diff --git a/setup.md b/setup.md
new file mode 100644
index 00000000..db1654e4
--- /dev/null
+++ b/setup.md
@@ -0,0 +1,21 @@
+---
+title: Setup
+---
+
+
+
+## Software Setup
+
+Install R and Rstudio
+
diff --git a/simulating-transmission.md b/simulating-transmission.md
new file mode 100644
index 00000000..976d4742
--- /dev/null
+++ b/simulating-transmission.md
@@ -0,0 +1,484 @@
+---
+title: 'Simulating transmission'
+teaching: 45 # teaching time in minutes
+exercises: 30 # exercise time in minutes
+---
+
+
+
+
+:::::::::::::::::::::::::::::::::::::: questions
+
+- How do I generate predictions of disease trajectories?
+- What inputs are needed for a model simulation?
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+::::::::::::::::::::::::::::::::::::: objectives
+
+Using the R package `epidemics`, learn how to:
+
+- load an existing model structure,
+- load an existing social contact matrix,
+- run a model simulation.
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+::::::::::::::::::::::::::::::::::::: prereq
+
+## Prerequisites
+
+This tutorial has the following concept dependencies:
+
+**Modelling** : [Components of infectious disease models](https://doi.org/10.1038/s41592-020-0856-2) e.g. state variables, parameters, initial conditions, and ordinary differential equations.
+
+**Epidemic theory** : [Transmission](https://doi.org/10.1155/2011/267049), [Reproduction number](https://doi.org/10.3201/eid2501.171901).
+:::::::::::::::::::::::::::::::::
+
+
+
+## Introduction
+
+Mathematical models are useful tools for generating future trajectories of disease spread. Models can be used to evaluate the implementation of non-pharmaceutical and pharmaceutical interventions while accounting for factors such as age.
+
+In this tutorial, we will use the R package `{epidemics}` to generate trajectories of influenza spread. By the end of this tutorial, you will be able to generate the trajectory below showing the number of infectious individuals in different age categories over time.
+
+
+```{.error}
+Error in infection(name = "influenza", r0 = 1.46, preinfectious_period = 3, : could not find function "infection"
+```
+
+```{.error}
+Error in model_default_cpp(population = uk_population, infection = influenza, : unused argument (infection = influenza)
+```
+
+```{.error}
+Error in eval(expr, envir, enclos): object 'output' not found
+```
+
+
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: instructor
+
+By the end of this tutorial, learners should be able to replicate the above image on their own computers.
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+The first step is to install the R packages `epidemics`.
+
+
+```r
+if (!require("pak")) install.packages("pak")
+pak::pak("epiverse-trace/epidemics")
+```
+
+
+## Model structures
+To generate predictions of infectious disease trajectories, we must first select a mathematical model to use.
+There is a library of models to choose from in `epidemics`. Models in `epidemics` are prefixed with `model` and suffixed by the name of infection (e.g. ebola) or a different identifier (e.g. default), and whether the model has a R or C++ code base. In this tutorial, we will use the default epidemic model, `model_default_cpp()` which is described in the next section.
+
+
+::::::::::::::::::::::::::::::::::::: callout
+### Check model equations
+When using existing model structures always check the model assumptions. Ask questions such as:
+
+- How is transmission modelled? e.g. [direct](../learners/reference.md#direct) or [indirect](../learners/reference.md#indirect), [airborne](../learners/reference.md#airborne) or [vector-borne](../learners/reference.md#vectorborne)?
+- What interventions are modelled?
+- What state variables are there and how do they relate to assumptions about infection?
+
+There can be subtle differences in model structures for the same infection or outbreak type which can be missed without studying the equations.
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+
+### An epidemic model for pandemic influenza
+
+We want to generate disease trajectories of an influenza strain with pandemic potential. We will use the default epidemic model in `epidemics`, an age-structured SEIR model described by a system of ordinary differential equations. For each age group $i$, individuals are classed as either susceptible $S$, infected but not yet infectious $E$, infectious $I$ or recovered $R$.
+
+
+
+
+
+The model parameters and equations are as follows :
+
+- transmission rate $\beta$,
+- contact matrix $C$ containing the frequency of contacts between age groups (a square $i \times j$ matrix),
+- rate of transition from exposed to infectious $\alpha$ (preinfectious period=$1/\alpha$),
+- recovery rate $\gamma$ (infectious period = $1/\gamma$).
+
+
+$$
+\begin{aligned}
+\frac{dS_i}{dt} & = - \beta S_i \sum_j C_{i,j} I_j \\
+\frac{dE_i}{dt} &= \beta S_i\sum_j C_{i,j} I_j - \alpha E_i \\
+\frac{dI_i}{dt} &= \alpha E_i - \gamma I_i \\
+\frac{dR_i}{dt} &=\gamma I_i \\
+\end{aligned}
+$$
+
+The *contact matrix* is a square matrix consisting of rows/columns equal to the number age groups. Each element represents the frequency of contacts between age groups. If we believe that transmission of an infection is driven by contact, and that contact rates are very different for different age groups, then specifying a contact matrix allows us to account for age specific rates of transmission.
+
+From the model structure we see that :
+
+- the contact matrix $C$ allows for heterogeneity in contacts between age groups,
+- there is no loss of immunity (there are no flows out of the recovered state).
+
+This model also has the functionality to include vaccination and tracks the number of vaccinated individuals through time. We will cover the use of interventions in future tutorials.
+
+::::::::::::::::::::::::::::::::::::: callout
+### Exposed, infected, infectious
+
+Confusion sometimes arises when referring to the terms 'exposed', 'infected' and 'infectious' in mathematical modelling. Infection occurs after a person has been exposed, but in modelling terms individuals that are 'exposed' are treated as already infected.
+
+We will use the following definitions for our state variables:
+
++ $E$ = Exposed : infected **but not yet** infectious,
++ $I$ = Infectious: infected **and** infectious.
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+
+To generate trajectories using our model, we need the following :
+
+1. parameter values,
+2. contact matrix,
+3. demographic structure,
+4. initial conditions.
+
+## Model parameters
+
+To run our model we need to specify the model parameters:
+
+- transmission rate $\beta$,
+- rate of transition from exposed to infectious $\alpha$ (preinfectious period=$1/\alpha$),
+- recovery rate $\gamma$ (infectious period=$1/\gamma$).
+
+We will learn how to specify the contact matrix $C$ in the next section.
+
+We will simulate a strain of influenza with pandemic potential with $R_0=1.5$, a preinfectious period of 3 days and infectious period of 7 days.
+
+In `epidemics`, we use the function `infection()` to create an infection object containing the values of, $R_0$, the preinfectious period ($1/\alpha$) and the infectious period ($1/\gamma$) as follows.
+
+
+```r
+influenza <- infection(
+ name = "influenza",
+ r0 = 1.5,
+ preinfectious_period = 3,
+ infectious_period = 7
+)
+```
+
+::::::::::::::::::::::::::::::::::::: callout
+### The basic reproduction number $R_0$
+The basic reproduction number, $R_0$, for the SEIR model is:
+
+$$ R_0 = \frac{\beta}{\gamma}.$$
+
+Therefore, we can rewrite the transmission rate, $\beta$, as:
+
+$$ \beta = R_0 \gamma.$$
+
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+
+
+
+
+### Contact matrix
+
+Contact matrices can be estimated from surveys or contact data, or synthetic ones can be used. We will use the R package `{socialmixr}` to load in a contact matrix estimated from POLYMOD survey data [(Mossong et al. 2008)](https://doi.org/10.1371/journal.pmed.0050074).
+
+
+::::::::::::::::::::::::::::::::::::: challenge
+
+## Load contact and population data
+
+Using the R package `socialmixr`, run the following lines of R code to obtain the contact matrix for the United Kingdom for the year age bins:
+
++ age between 0 and 20 years,
++ age between 20 and 40,
++ 40 years and over.
+
+```r
+polymod <- socialmixr::polymod
+contact_data <- socialmixr::contact_matrix(
+ survey = polymod,
+ countries = "United Kingdom",
+ age.limits = c(0, 20, 40),
+ symmetric = TRUE
+)
+# prepare contact matrix
+contact_matrix <- t(contact_data$matrix)
+contact_matrix
+```
+
+:::::::::::::::::::::::: solution
+
+## Output
+
+
+```{.output}
+
+contact.age.group [,1] [,2] [,3]
+ [0,20) 7.883663 2.794154 1.565665
+ [20,40) 3.120220 4.854839 2.624868
+ 40+ 3.063895 4.599893 5.005571
+```
+
+
+:::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+The result is a square matrix with rows and columns for each age group. Contact matrices can be loaded from other sources, but they must be in the correct format to be used in `epidemics`.
+
+::::::::::::::::::::::::::::::::::::: callout
+### Why would a contact matrix be non-symmetric?
+
+One of the arguments of the function `contact_matrix()` is `symmetric=TRUE`. This means that the total number of contacts of age group 1 with age group 2, should be the same as the total number of contacts of age group 2 and age group 1 (see the `socialmixr` [vignette](https://cran.r-project.org/web/packages/socialmixr/vignettes/socialmixr.html) for more detail). However, when contact matrices are estimated from surveys or other sources, the *reported* number of contacts may differ by age group resulting in a non-symmetric contact matrix [(Prem et al 2021)](https://doi.org/10.1371/journal.pcbi.1009098).
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+
+## Generating trajectories
+
+We have prepared our parameter values, contact matrix and demography vector. Now we must set the initial conditions, prepare the population and run the model.
+
+### Initial conditions
+
+The initial conditions are the proportion of individuals in each disease state $S$, $E$, $I$ and $R$ for each age group at time 0. In this example, we have three age groups age between 0 and 20 years, age between 20 and 40 years and over. Let's assume that in the youngest age category, one in a million individuals are infectious, and the remaining age categories are infection free.
+
+The initial conditions in the first age category are $S(0)=1-\frac{1}{1,000,000}$, $E(0) =0$, $I(0)=\frac{1}{1,000,000}$, $R(0)=0$. This is specified as a vector as follows:
+
+
+```r
+initial_i <- 1e-6
+initial_conditions_inf <- c(
+ S = 1 - initial_i, E = 0, I = initial_i, R = 0, V = 0
+)
+```
+
+For the age categories that are free from infection, the initial conditions are $S(0)=1$, $E(0) =0$, $I(0)=0$, $R(0)=0$. We specify this as follows,
+
+
+```r
+initial_conditions_free <- c(
+ S = 1, E = 0, I = 0, R = 0, V = 0
+)
+```
+
+We combine the three initial conditions vectors into one matrix,
+
+
+```r
+# build for all age groups
+initial_conditions <- rbind(
+ initial_conditions_inf,
+ initial_conditions_free,
+ initial_conditions_free
+)
+rownames(initial_conditions) <- rownames(contact_matrix)
+initial_conditions
+```
+
+```{.output}
+ S E I R V
+[0,20) 0.999999 0 1e-06 0 0
+[20,40) 1.000000 0 0e+00 0 0
+40+ 1.000000 0 0e+00 0 0
+```
+
+### Running the model
+
+To run the model we need the following inputs:
+
+- an infection object,
+- a population object,
+- an optional number of time steps.
+
+We have already created our infection object `influenza`. The population object requires a vector containing the demographic structure of the population. The demographic vector must be a named vector containing the number of individuals in each age group of our given population. In this example, we can extract the demographic information from the `contact_data` object that we obtained using the `socialmixr` package.
+
+
+```r
+demography_vector <- contact_data$demography$population
+names(demography_vector) <- rownames(contact_matrix)
+demography_vector
+```
+
+```{.output}
+ [0,20) [20,40) 40+
+14799290 16526302 28961159
+```
+
+To create our population object, we call the function `population()` specifying a name, the contact matrix, the demography vector and the initial conditions.
+
+
+```r
+uk_population <- population(
+ name = "UK",
+ contact_matrix = contact_matrix,
+ demography_vector = demography_vector,
+ initial_conditions = initial_conditions
+)
+```
+
+No we are ready to run our model. We will specify `time_end=600` to run the model for 600 days.
+
+
+```r
+output <- model_default_cpp(
+ population = uk_population,
+ infection = influenza,
+ time_end = 600
+)
+```
+
+```{.error}
+Error in model_default_cpp(population = uk_population, infection = influenza, : unused argument (infection = influenza)
+```
+
+```r
+head(output)
+```
+
+```{.error}
+Error in eval(expr, envir, enclos): object 'output' not found
+```
+Our model output consists of the number of individuals in each compartment in each age group through time. We can visualise the infectious individuals only (those in the $I$ class) through time.
+
+
+```r
+ggplot(output[compartment == "infectious", ]) +
+ geom_line(
+ aes(time, value, colour = demography_group),
+ linewidth = 1
+ ) +
+ scale_colour_brewer(
+ palette = "Dark2",
+ labels = rownames(contact_matrix),
+ name = "Age group"
+ ) +
+ scale_y_continuous(
+ labels = scales::comma,
+ name = "Infectious indivduals"
+ ) +
+ labs(
+ x = "Model time (days)"
+ ) +
+ theme_classic() +
+ theme(
+ legend.position = "top"
+ ) +
+ theme_grey(
+ base_size = 15
+ )
+```
+
+```{.error}
+Error in eval(expr, envir, enclos): object 'output' not found
+```
+
+
+::::::::::::::::::::::::::::::::::::: callout
+### Time increments
+
+Note that there is a default argument of `increment = 1`. This relates to the time step of the ODE solver. When the parameters and maximum number of time steps is days, the default increment is one day.
+
+The choice of increment will depend on the time scale of the parameters, and the rate at which events can occur. In general, the increment should smaller than the fastest event. For example, if parameters are on a monthly time scale, but some events will occur within a month, then the increment should be less than one month.
+
+::::::::::::::::::::::::::::::::::::::::::::::::
+
+### Accounting for uncertainty
+
+As the epidemic model is [deterministic](../learners/reference.md#deterministic), we have one trajectory for our given parameter values. In practice, we have uncertainty in the value of our parameters. To account for this, we must run our model for different parameter combinations.
+
+We ran our model with $R_0= 1.5$. However, we believe that $R_0$ follows a normal distribution with mean 1.5 and standard deviation 0.05. To account for uncertainty we will run the model for different values of $R_0$. The steps we will follow to do this are:
+
+1. Obtain 100 samples from the from a normal distribution
+
+
+```r
+R0_vec <- rnorm(100, 1.5, 0.05)
+```
+
+2. Run the model 100 times with $R_0$ equal to a different sample each time
+
+
+```r
+output_samples <- Map(
+ R0_vec,
+ seq_along(R0_vec),
+ f = function(x, i) {
+ # create infection object for R0 value
+ influenza <- infection(
+ name = "influenza",
+ r0 = x,
+ preinfectious_period = 3,
+ infectious_period = 7
+ )
+
+ # run an epidemic model using `epidemic()`
+ output <- model_default_cpp(
+ population = uk_population,
+ infection = influenza,
+ time_end = 600, increment = 1.0
+ )
+
+ # extract infectious individuals
+ output <- output[compartment == "infectious"]
+
+ # assign scenario number
+ output[, c("scenario", "R") := list(i, x)]
+
+ output
+ }
+)
+```
+
+```{.error}
+Error in infection(name = "influenza", r0 = x, preinfectious_period = 3, : could not find function "infection"
+```
+
+```r
+# combine to prepare for plotting
+output_samples <- bind_rows(output_samples)
+```
+
+```{.error}
+Error in eval(expr, envir, enclos): object 'output_samples' not found
+```
+
+
+3. Calculate the mean and 95% quantiles of number of infectious individuals across each model simulation and visualise output
+
+
+```r
+ggplot(output_samples ,aes(time, value)) +
+ stat_summary(geom = "line", fun = mean) +
+ stat_summary(geom = "ribbon",
+ fun.min = function(z) { quantile(z, 0.025) },
+ fun.max = function(z) { quantile(z, 0.975) },
+ alpha = 0.3) +
+ facet_grid(
+ cols = vars(demography_group)
+ ) +
+ theme_grey(
+ base_size = 15
+ )
+```
+
+```{.error}
+Error in eval(expr, envir, enclos): object 'output_samples' not found
+```
+
+
+Deciding which parameters to include uncertainty in depends on a few factors: how well informed a parameter value is e.g. consistency of estimates from the literature; how sensitive model outputs are to parameter value changes; and the purpose of the modelling task.
+
+## Summary
+
+In this tutorial, we have learnt how to generate disease trajectories using a mathematical model. Once a model has been chosen, the parameters and other inputs must be specified in the correct way to perform model simulations. In the next tutorial, we will consider how to choose the right model for different tasks.
+
+::::::::::::::::::::::::::::::::::::: keypoints
+
+- Disease trajectories can be generated using the R package `epidemics`
+- Contact matrices can be estimated from different sources
+- Include uncertainty in model trajectories
+
+::::::::::::::::::::::::::::::::::::::::::::::::