diff --git a/_freeze/slides/execute-results/html.json b/_freeze/slides/execute-results/html.json index af6fa57..5d7e6d7 100644 --- a/_freeze/slides/execute-results/html.json +++ b/_freeze/slides/execute-results/html.json @@ -1,8 +1,8 @@ { - "hash": "e467f370972d687c9a6e08ca1a048aba", + "hash": "6eafbce25102b18551f8d523b407f1cd", "result": { "engine": "knitr", - "markdown": "---\ntitle: \"Introduction to Infectious Disease Modelling\"\nauthor: \"James Mba Azam, PhD\"\nexecute:\n echo: true\n# format: clean-revealjs\nformat:\n revealjs: \n theme: solarized\n slide-number: true\n scrollable: true\n chalkboard: true\nrevealjs-plugins:\n - revealjs-text-resizer\nbibliography: references.bib\nlink-citations: true\nengine: knitr\n---\n\n\n# An overview of infectious diseases\n\n## What are infectious diseasess\n\n::: columns\n::: {.column width=\"30%\"}\n![Generic definition of a disease (source: Merriam Webster)](images/disease_definition.png){.lightbox}\n:::\n\n::: {.column width=\"70%\"}\nDepending on what we care about, we can classify diseases according to:\n\n- Cause (e.g., infectious, non-infectious)\n- Duration (e.g., acute, chronic)\n- Mode of transmission (direct or indirect)\n- Impact on the host (e.g., fatal, non-fatal)\n\nNote that these classifications are not mutually exclusive. Hence, a disease can be classified under more than one category at a time.\n:::\n:::\n\n## How are infectious diseases controlled?\n\n- In general, infectious disease control aims to reduce disease transmission.\n- The type of control used depends on the disease and its characteristics.\n- Broadly, there are two main types of control measures:\n - Pharmaceutical interventions (PIs)\n - Non-pharmaceutical interventions (NPIs)\n\n------------------------------------------------------------------------\n\n### Pharmaceutical interventions (PIs)\n\n- Pharmaceutical Interventions are medical interventions that target the pathogen or the host.\n\n- Examples:\n\n - Vaccines,\n - Antiviral drugs, and\n - Antibiotics.\n\n------------------------------------------------------------------------\n\n### Vaccination\n\n- Most effective way to prevent infectious diseases.\n- Activates the host's immune system to produce antibodies against the pathogen.\n- Generally applied prophylactically to susceptible individuals (before infection); this reduces the risk of infection and disease.\n- Challenges:\n - Take time to develop for new pathogens\n - Never 100% effective and limited duration of protection\n - Adverse side effects\n - Some individuals cannot be vaccinated or refuce vaccination\n - Some pathogens mutate rapidly (e.g., influenza virus)\n\n------------------------------------------------------------------------\n\n### Non-pharmaceutical interventions (NPIs)\n\n- Non-pharmaceutical interventions are measures that do not involve medical interventions.\n\n- Examples:\n\n - Quarantine,\n - Physical/social distancing, and\n - Mask-wearing.\n\n------------------------------------------------------------------------\n\n### Quarantine\n\n- *Isolation of individuals who may have been exposed to a contagious disease*.\n- Advantage is that it's simple and its effectiveness does not depend on the disease.\n- Disadvantages include:\n - Infringement on individual rights\n - Can be difficult to enforce\n - Can be costly\n - Can lead to social stigma\n\n[What type of intervention is contact tracing?]{style=\"color:red;\"}\n\n------------------------------------------------------------------------\n\n### Contact tracing\n\n- Contact tracing is not necessarily an NPI but is often used to identify likely infected individuals.\n- It involves identifying, assessing, and managing people who have been exposed to a contagious disease to prevent further transmission.\n- It is a critical component of infectious disease surveillance and is often used in combination with other control measures.\n\n------------------------------------------------------------------------\n\n[How do we quantify the impact of a control measure?]{style=\"color:red;\"}\n\n# Infectious disease models\n\n## What are infectious disease models?\n\n- [*Models*]{style=\"color:red;\"} generally refer to conceptual representations of an object or system.\n- [*Mathematical models*]{style=\"color:red;\"} use mathematics to represent the description of the system.\n- [*Infectious disease models*]{style=\"color:red;\"} use mathematics/statistics to represent dynamics/spread of infectious diseases.\n\n------------------------------------------------------------------------\n\n- Mathematical models can be used to link the biological process of disease transmission and the emergent dynamics of infection at the population level.\n- Models require making some assumptions and abstractions.\n- By definition, \"all models are wrong, but some are useful\" [@Box1979].\n - Good enough models are those that capture the essential features of the system being studied.\n- \"Wrong\" here means that models are simplifications of reality and do not capture all the complexities of the system being studied. It does not mean that models are useless.\n\n------------------------------------------------------------------------\n\n\\\n\n------------------------------------------------------------------------\n\n## (Conflicting) Factors that influence model formulation/choice\n\n- Accuracy: how well does the model to reproduce observed data and predict future outcomes?\n- Transparency: is it easy to understand and interpret the model and its outputs? (This is affected by the model's complexity)\n- Flexibility: the ability of the model to be adapted to different scenarios.\n\n## What are models used for?\n\n- Generally, models can be used to predict and understand/explain the dynamics of infectious diseases.\n\n[How are these two uses impacted by accuracy, transparency, and flexibility?]{style=\"color:red;\"}\n\n------------------------------------------------------------------------\n\n### Modelling to predict the future course\n\n::: columns\n::: {.column width=\"40%\"}\n- Must be [accurate]{style=\"color:red;\"} else they will provide an incorrect outlook of the future.\n- Example of the [prediction of Ebola deaths](https://apnews.com/domestic-news-domestic-news-fbb4fc8921d54201a1c5ca91e5b601f5) during the outbreak in West Africa in 2014/2015.\n- \"But the estimate proved to be off. Way, way off. Like, 65 times worse than what ended up happening.\"\n:::\n\n::: {.column width=\"60%\"}\n![Controversy over estimates of Ebola deaths](images/wrong_ebola_deaths_estimate.png){.lightbox}\n:::\n:::\n\n------------------------------------------------------------------------\n\n\\< Insert examples of models that have made accurate predictions of the future course of an outbreak \\>\n\n------------------------------------------------------------------------\n\n### Modelling to understand or explain\n\n- Models can be used to understand how a disease spreads and how its spread can be controlled.\n- The insights gained from models can be used to:\n - inform public health policy and interventions.\n - design interventions to control the spread of the disease, for example, randomised controlled trials.\n - collect new data.\n - build predictive models.\n\n------------------------------------------------------------------------\n\n\\< Insert examples of models that explain the spread and dynamics of infectious diseases \\>\n\n\\< Insert examples of models that evaluate the impact of interventions and determine the next course of action \\>\n\n------------------------------------------------------------------------\n\n## Limitations of infectious disease models\n\n- Host behaviour is often difficult to predict.\n- The pathogen often has unknown characteristics or known characteristics that are difficult to model.\n- Data is often not available or is of poor quality.\n\n------------------------------------------------------------------------\n\n- Models:\n - Simplifications of reality and do not capture all the complexities of the system being studied.\n - Only as good as the data used to parameterize them.\n - Can be sensitive to the assumptions made during their formulation.\n - Can be computationally expensive and require a lot of data to run.\n - Can be difficult to interpret and communicate to non-experts.\n\n## What skills are needed to build and use infectious disease models?\n\n- Mathematical and statistical skills:\n - Differential equations.\n - Probability and statistics.\n - Stochastic processes.\n - Numerical analysis\n - Time series analyses\n - Survival analysis\n\n---\n\n- Programming skills:\n - Proficiency in at least one programming language (e.g., R, Python, Julia, C++).\n - Experience with version control (e.g., Git).\n - Experience with data manipulation and visualization.\n\n---\n\n- Domain knowledge in infectious diseases:\n - Immunology.\n - Epidemiology.\n - Virology.\n - Genomics\n \n---\n\n- Other subject areas:\n\n - Communication skills:\n - Ability to communicate complex ideas to non-experts.\n - Ability to write clear and concise reports.\n - Ability to present results to a diverse audience.\n - Public health.\n - Health economics.\n - Policy analysis.\n\n# Introduction to compartmental models\n\n## What are compartmental models?\n\n- Compartmental models divide populations into compartments (or groups) based on individual's infection status [@Blackwood2018a].\n- Individuals move between compartments based on defined transition quantities.\n- Any particular individual can only be in one compartment at a time.\n\n------------------------------------------------------------------------\n\n::: columns\n::: {.column width=\"40%\"}\n- They divide the population into compartments based on the [disease status]{style=\"color:red;\"} of individuals.\n- The most common compartments are:\n - Susceptible (S) - hosts are not infected but can be infected\n - Infected (I) - hosts are infected (and can infect others)\n - Removed (R) - hosts are no longer infected and cannot be re-infected\n- In compartmental models, individuals move between compartments based on defined transition quantities.\n:::\n\n::: {.column width=\"60%\"}\n![Infection timeline illustrating how a pathogen in a host interacts with the host's immune system (source: Modelling Infectious Diseases of Humans and Animals)](images/infection_timeline.png){.lightbox}\n:::\n:::\n\n------------------------------------------------------------------------\n\n- Other compartments can be added to the model to account for important events or processes (e.g., exposed, recovered, vaccinated, etc.)\n\n- It is, however, important to keep the model simple, less computationally intensive, and interpretable.\n\n# Some simple compartmental models\n\n- We are going to consider infections that either confer immunity after recovery or not.\n- The simplest compartmental models for capturing this are the SIS and SIR models.\n\n## The Susceptible-Infected-Recovered model (SIR)\n\n- SIR models are used to model diseases that confer immunity after recovery.\n\n- The SIR model groups individuals into three _disease states_:\n - Susceptible (S): individuals who are not infected and can be infected.\n - Infected (I): individuals who are infected and can infect others.\n - Removed (R): individuals who have recovered from the infection and are immune.\n \n- This framework was popularised by Kermack and McKendrick in 1927 [@kermack1927contribution]\n - A must-read paper for anyone interested in infectious disease modelling.\n\n---\n\n![Diagram of an SIR/SIRS model](images/sir_sirs_model.png){.lightbox}\n\n## Model equations\n\n- The SIR model is described by the following set of differential equations:\n\n\\begin{aligned}\n\\frac{dS}{dt} & = \\color{orange}{-\\beta \\frac{S I}{N}} \\\\\n\\frac{dI}{dt} & = \\color{orange}{\\beta \\frac{S I}{N}} - \\color{cornflowerblue}{\\gamma I} \\\\\n\\frac{dR}{dt} & = \\color{cornflowerblue}{\\gamma I}\n\\end{aligned}\n\nWith initial conditions $S(0) = S_0$, $I(0) = I_0$, and $R(0) = R_0$.\n\nwhere:\n\n- $N$ is the total population size.\n- $\\beta$ is the transmission rate.\n- $\\gamma$ is the recovery rate.\n\n---\n\n- The model cannot be solved analytically, so numerical methods are used to solve the equations.\n\n- However, we can gain insights into the dynamics of the model by qualitatively analysing the equations.\n\n---\n\n## Solving the SIR model in R\n\n- To solve the model in R, we will always need to define at least three things:\n - The model equations.\n - The parameter values.\n - The initial conditions.\n\n- We will need the `deSolve` package to solve the model.\n\n---\n\n- Let's start by defining the model equations.\n\n\n::: {.cell}\n\n```{.r .cell-code}\n# Define the SIR model\nsir_model <- function(t, state, parameters) {\n with(as.list(c(state, parameters)), {\n dS <- -beta * S * I\n dI <- beta * S * I - gamma * I\n dR <- gamma * I\n return(list(c(dS, dI, dR)))\n })\n}\n```\n:::\n\n\n---\n\nNext, we will define the parameter values and initial conditions.\n\n\n::: {.cell}\n\n```{.r .cell-code}\n# define parameters we know\nN <- 1000 \nR0 <- 2\ninfectious_period <- 7\n\n# Remember gamma <- 1/ infectious_period as discussed earlier\ngamma <- 1/infectious_period \n\n# We will use R0 = beta N / gamma instead because it is easier to interpret.\n# beta is not directly interpretable.\n\nparams <- c(beta = R0 * gamma / N, gamma = gamma)\n\n# Initial conditions for S, I, R\n# Why is S = N - 1?\ninits <- c(S = N - 1, I = 1, R = 0)\n\n# Time steps to return results\ndt <- 1:150\n```\n:::\n\n\n---\n\nFinally, we will solve the model using the `ode` function from the `deSolve` package.\n\n\n::: {.cell}\n\n```{.r .cell-code}\n# Solve the model\nresults <- deSolve::ode(\n y = inits,\n times = dt,\n func = sir_model,\n parms = params\n)\n\n# Make it a data.frame\nresults <- as.data.frame(results)\n```\n:::\n\n\n---\n\nNow, let's plot the results.\n\n\n::: {.cell output-location='slide'}\n\n```{.r .cell-code}\n# Load the necessary libraries\nlibrary(dplyr)\nlibrary(tidyr)\nlibrary(ggplot2)\n# Create data for ggplot2 by reshaping\nresults_long <- results |> \n pivot_longer(cols = c(2:4), names_to = \"compartment\", values_to = \"value\")\n \nplot <- ggplot(data = results_long,\n aes(x = time, y = value, color = compartment)\n ) +\ngeom_line(linewidth = 1) +\nlabs(\n title = \"SIR model\",\n x = \"Time\",\n y = \"Number of individuals\"\n) \nprint(plot)\n```\n\n::: {.cell-output-display}\n![](slides_files/figure-revealjs/plot-sir-1.png){width=960}\n:::\n:::\n\n\n---\n\n## Model assumptions\n\n- There are no inflows or outflows from the population, i.e., no births, deaths, or migration. This is often described as a _closed population_.\n - That is, the epidemic occurs much faster than the time scale of births, deaths, or migration.\n\n- Mixing is homogeneous, i.e., individuals mix randomly and have an equal probability of coming into contact with any other individual in the population.\n\n- Transition rates are constant and do not change over time.\n\n- When this assumption is \"relaxed\"/included, we get more complex models.\n\n---\n\n## Transitions between compartments\n\n- There are two processes that govern the transitions between compartments:\n - Transmission, governed by the transmission rate, $\\beta$ (rate at which susceptible individuals become infected).\n - Recovery, governed by the recovery rate, $\\gamma$ (rate at which infected individuals recover and become immune).\n \n---\n\n### Transmission\n\n[What factors drive transmission?]{style=\"color:orange;\"}\n\n---\n\n- Transmission is driven by several factors:\n - The prevalence, [$I$]{style=\"color:orange;\"}, i.e., number of infected individuals at the time.\n - The number of contacts, [$C$]{style=\"color:orange;\"}, susceptible individuals have with infected individual.\n - The probability, [$p$]{style=\"color:orange;\"}, a susceptible individual will become infected when they contact an infected individual.\n\n---\n\n- The transmission term is often defined through the force of infection (FOI), $\\lambda$:\n - The force of infection is the [per capita rate]{style=\"color:orange;\"} at which susceptible individuals become infected.\n\n- The rate at which new infecteds are generated is given by [$\\lambda S$]{style=\"color:orange;\"}, where $S$ is the number of susceptible individuals.\n\n- The force of infection is proportional to the number of infected individuals and the transmission rate, [$\\beta$]{style=\"color:orange;\"}.\n\n- $\\beta$ is the product of the contact rate and the probability of transmission per contact.\n\n---\n\n- The FOI can be formulated in two ways, depending on how the contact rate is expected to change with the population size:\n - [_Frequency-dependent/mass action transmission_]{style=\"color:orange;\"}: The rate of contact between individuals is proportional to the population size. Here, [$\\lambda = \\beta \\times \\dfrac{I}{N}$]{style=\"color:orange;\"}.\n - [_Density dependent transmission_]{style=\"color:orange;\"}: The rate of contact between individuals is independent of the population size. Here, [$\\lambda = \\beta \\times I$]{style=\"color:orange;\"}.\n\n---\n\n- Frequency-dependent transmission assumes that that the number of contacts an individual has is independent of the population size:\n - Often used to model vector-borned diseases and diseases with heterogeneity in contact rates.\n\n---\n\n- Density-dependent transmission assumes that the number of contacts an individual has is proportional to the population size:\n - Often used to model diseases that allow the safe assumption of random/homogenous mixing.\n\n::: {.callout-note}\nThe differences become important when dealing with population sizes that change significantly over time.\n:::\n\n---\n\n- The recovery rate $\\gamma$ is the reciprocal of the average duration of the infection. That is, infected individuals spend $1/\\gamma$ days in the infected compartment before recovering.\n\n- The average infectious period is often estimated from epidemiological data.\n\n\n# The Susceptible-Infected-Susceptible model (SIS)\n\n- The SIS model has two compartments: Susceptible (S) and Infected (I).\n\n\n\n\n\n\n\n\n\n\n\n\n\n- We assume that individuals are susceptible to infection, become infected, and then either recover become susceptible again or become immune.\n\n[What kinds of diseases can be modelled using the SIS and SIR models?]{style=\"color:red;\"}\n\n------------------------------------------------------------------------\n\n# The Basic Reproduction Number\n\n# Analyzing Model Outputs and Dynamics\n\n# Wrap-Up and Q&A\n\n# List of Resources\n\n## Textbooks\n\n- [Modeling Infectious Diseases in Humans and Animals by Matt Keeling and Pejman Rohani](https://www.amazon.co.uk/Modeling-Infectious-Diseases-Humans-Animals/dp/0691116172) -[Epidemics: Models and Data Using R by Ottar N. Bjornstad](https://link.springer.com/book/10.1007/978-3-031-12056-5)\n- [Infectious Disease Modelling by Emilia Vynnycky and Richard White](https://www.amazon.co.uk/Introduction-Infectious-Disease-Modelling/dp/0198565763)\n- [Infectious Diseases of Humans: Dynamics and Control by Roy M. Anderson and Robert M. May](https://www.amazon.co.uk/Infectious-Diseases-Humans-Dynamics-Control/dp/019854040X)\n\n## Papers and Articles {.scrollable}\n\n### Modelling infectious disease transmission\n\n- [Kirkeby, C., Brookes, V. J., Ward, M. P., Dürr, S., & Halasa, T. (2021). A practical introduction to mechanistic modeling of disease transmission in veterinary science. Frontiers in veterinary science, 7, 546651.](https://www.frontiersin.org/articles/10.3389/fvets.2020.546651/full)\n- [Blackwood, J. C., & Childs, L. M. (2018). An introduction to compartmental modeling for the budding infectious disease modeler.](https://vtechworks.lib.vt.edu/items/61e9ca00-ef21-4356-bcd7-a9294a1d2f17)\n- [Grassly, N. C., & Fraser, C. (2008). Mathematical models of infectious disease transmission. Nature Reviews Microbiology, 6(6), 477–487.](https://doi.org/10.1038/nrmicro1845)\n- [Cobey, S. (2020). Modeling infectious disease dynamics. Science, 368(6492), 713–714.](https://doi.org/10.1126/science.abb5659)\n- [Bjørnstad, O. N., Shea, K., Krzywinski, M., & Altman, N. (2020). Modeling infectious epidemics. Nature Methods, 17(5), 455–456.](https://doi.org/10.1038/s41592-020-0822-z)\n- [Bodner, K., Brimacombe, C., Chenery, E. S., Greiner, A., McLeod, A. M., Penk, S. R., & Soto, J. S. V. (2021). Ten simple rules for tackling your first mathematical models: A guide for graduate students by graduate students. PLOS Computational Biology, 17(1), e1008539.](https://doi.org/10.1371/journal.pcbi.1008539)\n- [Mishra, S., Fisman, D. N., & Boily, M.-C. (2011). The ABC of terms used in mathematical models of infectious diseases. Journal of Epidemiology & Community Health, 65(1), 87–94.](https://jech.bmj.com/content/65/1/87)\n- [James, L. P., Salomon, J. A., Buckee, C. O., & Menzies, N. A. (2021). The Use and Misuse of Mathematical Modeling for Infectious Disease Policymaking: Lessons for the COVID-19 Pandemic. 41(4), 379–385.](https://doi.org/10.1177/0272989X21990391)\n- [Holmdah, I., & Buckee, C. (2020). Wrong but useful—What COVID-19 epidemiologic models can and cannot tell us. New England Journal of Medicine.](https://doi.org/10.1056/nejmp2009027)\n- [Metcalf, C. J. E. E., Edmunds, W. J., & Lessler, J. (2015). Six challenges in modelling for public health policy. Epidemics, 10(2015), 93–96.](https://doi.org/10.1016/j.epidem.2014.08.008)\n- [Roberts, M., Andreasen, V., Lloyd, A., & Pellis, L. (2015). Nine challenges for deterministic epidemic models. Epidemics, 10(2015), 49–53.](https://doi.org/10.1016/j.epidem.2014.09.006)\n\n### Deriving and Interpreting R0\n\n- [Jones, J. H. (2011). Notes On R0. Building, 1–19.](https://web.stanford.edu/~jhj1/teachingdocs/Jones-on-R0.pdf)\n- [Diekmann, O., Heesterbeek, J. A. P., & Metz, J. A. J. (1990). On the definition and the computation of the basic reproduction ratio R0 in models for infectious diseases in heterogeneous populations. Journal of Mathematical Biology, 28(4), 365–382.](https://doi.org/10.1007/BF00178324)\n- [Diekmann, O., Heesterbeek, J. A. P., & Roberts, M. G. (2010). The construction of next-generation matrices for compartmental epidemic models. Journal of the Royal Society Interface, 7(47), 873–885.](https://doi.org/10.1098/rsif.2009.0386)\n\n### References\n\n::: {#refs}\n:::\n", + "markdown": "---\ntitle: \"Introduction to Infectious Disease Modelling\"\nauthor:\n - name: \"James Mba Azam, PhD\"\n orcid: 0000-0001-5782-7330\n email: james.azam@lshtm.ac.uk\n affiliation: \n - name: Epiverse-TRACE Initiative, London School of Hygiene and Tropical Medicine, UK\n city: London, United Kingdom\ndate: \"last-modified\"\nexecute:\n echo: true\n freeze: auto\n# format:\n# beamer:\n# navigation: horizontal\n# theme: metropolis\n # institute: Epiverse-TRACE Initiative, London School of Hygiene and Tropical Medicine, UK\n # orcid: 0000-0001-5782-7330\n # email: james.azam@lshtm.ac.uk\nformat:\n revealjs:\n theme: [solarized]\n slide-number: true\n scrollable: true\n chalkboard: true\n toc: true\n toc-depth: 1\ntransition: fade\nlightbox: true\nprogress: true\ncode-copy: true\n# revealjs-plugins:\n# - revealjs-text-resizer\nbibliography: references.bib\nlink-citations: true\nengine: knitr\neditor_options: \n chunk_output_type: console\n---\n\n\n\n# An overview of infectious diseases\n\n\n## What are infectious diseases\n\n![](images/disease_definition.png){fig-cap=\"Definition of a disease according to the Merriam Webster dictionary\" fig-align=\"center\"}\n\n------------------------------------------------------------------------\n\n::: columns\n::: {.column width=\"45%\"}\n![A 3D graphical representation of Rotavirus virions.](images/rotavirus.jpeg)\n:::\n\n::: {.column width=\"55%\"}\nDiseases can be classified according to:\n\n- [Cause]{style=\"color:tomato\"} (e.g., infectious, non-infectious)\n- [Duration]{style=\"color:tomato\"} (e.g., acute, chronic)\n- [Mode of transmission]{style=\"color:tomato\"} (direct or indirect)\n- [Impact]{style=\"color:tomato\"} on the host (e.g., fatal, non-fatal)\n:::\n:::\n\n------------------------------------------------------------------------\n\nNote that these classifications are not mutually exclusive. Hence, a disease can be classified under more than one category at a time.\n\n------------------------------------------------------------------------\n\n## How are infectious diseases controlled? {#sec-control-measures}\n\n- In general, infectious disease control aims to reduce disease transmission.\n- The type of control used depends on the disease and its characteristics.\n- Broadly, there are two main types of control measures:\n - Pharmaceutical interventions (PIs)\n - Non-pharmaceutical interventions (NPIs)\n\n------------------------------------------------------------------------\n\n### Pharmaceutical interventions (PIs)\n\n- Pharmaceutical Interventions are medical interventions that target the pathogen or the host.\n\n- Examples:\n\n - Vaccines,\n - Antiviral drugs, and\n - Antibiotics.\n\n------------------------------------------------------------------------\n\n#### Vaccination {#sec-vaccination}\n\n::: columns\n::: {.column width=\"40%\"}\n![](images/vaccine.jpeg)\n:::\n\n::: {.column width=\"60%\"}\n- Activates the host's immune system to produce antibodies against the pathogen.\n- Generally applied to reduce the risk of infection and disease.\n- The most effective way to prevent infectious diseases.\n:::\n:::\n\n------------------------------------------------------------------------\n\n##### Challenges with vaccination\n\n- Take time to develop for new pathogens\n- Never 100% effective and limited duration of protection\n- Adverse side effects\n- Some individuals cannot be vaccinated or refuce vaccination\n- Some pathogens mutate rapidly (e.g., influenza virus)\n- Logistical challenges (e.g., cold chain requirements)\n\n------------------------------------------------------------------------\n\n### Non-pharmaceutical interventions (NPIs) {#sec-npi}\n\n::: columns\n::: {.column width=\"50%\"}\n![](images/mask.jpeg){width=\"70%\"}\n\n![](images/screening.jpeg){width=\"70%\"}\n:::\n\n::: {.column width=\"50%\"}\n- Non-pharmaceutical interventions are measures that do not involve medical interventions.\n\n- Examples:\n\n - Quarantine,\n - Physical/social distancing, and\n - Mask-wearing.\n:::\n:::\n\n------------------------------------------------------------------------\n\n#### Quarantine\n\n- *Isolation of individuals who may have been exposed to a contagious disease*.\n- Advantage is that it's simple and its effectiveness does not depend on the disease.\n- Disadvantages include:\n - Infringement on individual rights\n - Can be difficult to enforce\n - Can be costly\n - Can lead to social stigma\n\n------------------------------------------------------------------------\n\n#### Contact tracing\n\n- Contact tracing is used to identify exposed individuals, i.e., individuals who might been in contact with an infected/infectious individual.\n- It involves identifying, assessing, and managing people who have been exposed to a contagious disease to prevent further transmission.\n- It is a critical component of infectious disease surveillance and is often used in combination with other control measures.\n\n------------------------------------------------------------------------\n\n::: {.callout-caution collapse=\"true\" icon=\"false\"}\n### Discussion\n\n- How can we quantify the impact of a control measure?\n:::\n\n\n\n# Infectious disease models\n\n\n## What are infectious disease models?\n\n- [*Models*]{style=\"color:tomato;\"} generally refer to conceptual representations of an object or system.\n- [*Mathematical models*]{style=\"color:tomato;\"} use mathematics to describe the system. For example, the famous $E = mc^2$ is a mathematical model that describes the relationship between mass and energy.\n- [*Infectious disease models*]{style=\"color:tomato;\"} use mathematics/statistics to represent dynamics/spread of infectious diseases.\n\n------------------------------------------------------------------------\n\n- Mathematical models can be used to link the biological process of disease transmission and the emergent dynamics of infection at the population level.\n- Models require making some assumptions and abstractions.\n\n------------------------------------------------------------------------\n\n::: columns\n::: {.column width=\"60%\"}\n- By definition, [\"all models are wrong, but some are useful\"]{style=\"color:tomato\"} [@Box1979].\n - Good enough models are those that capture the [essential features]{style=\"color:tomato\"} of the system being studied.\n:::\n\n::: {.column width=\"40%\"}\n![George Box](images/GeorgeEPBox.jpeg)\n:::\n:::\n\n------------------------------------------------------------------------\n\n- What makes models \"wrong\" by definition?:\n - Simplifications of reality; not capturing all the complexities of the system being studied.\n\n------------------------------------------------------------------------\n\n## Factors that influence model formulation/choice\n\n- [Accuracy]{style=\"color:tomato\"}: how well does the model to reproduce observed data and predict future outcomes?\n- [Transparency]{style=\"color:tomato\"}: is it easy to understand and interpret the model and its outputs? (This is affected by the model's complexity)\n- [Flexibility]{style=\"color:tomato\"}: the ability of the model to be adapted to different scenarios.\n\n::: notes\nThese will be touched on in the scenario modelling lectures.\n:::\n\n------------------------------------------------------------------------\n\n## What are models used for?\n\n- Generally, models can be used to predict and understand/explain the dynamics of infectious diseases.\n\n::: {.callout-caution collapse=\"true\" icon=\"false\"}\n### Discussion\n\nHow are these two uses impacted by accuracy, transparency, and flexibility?\n:::\n\n------------------------------------------------------------------------\n\n### Prediction of the future course\n\n::: columns\n::: {.column width=\"40%\"}\n- Must be [accurate]{style=\"color:tomato;\"}.\n- \"But the estimate proved to be off. Way, way off. Like, 65 times worse than what ended up happening.\"\n:::\n\n::: {.column width=\"60%\"}\n![](images/wrong_ebola_deaths_estimate.png){fig-cap=\"[CDC’s top modeler courts controversy with disease estimate](https://apnews.com/domestic-news-domestic-news-fbb4fc8921d54201a1c5ca91e5b601f5)\"}\n:::\n:::\n\n------------------------------------------------------------------------\n\n\n\n\n\n\n\n### Understanding or explaining disease dynamics\n\n- Models can be used to understand how a disease spreads and how its spread can be controlled.\n- The insights gained from models can be used to:\n - inform public health policy and interventions.\n - design interventions to control the spread of the disease, for example, randomised controlled trials.\n - collect new data.\n - build predictive models.\n\n\n\n\n\n\n\n\n\n\n\n---\n\n## Limitations of infectious disease models\n\n- Host behaviour is often difficult to predict.\n- The pathogen often has unknown characteristics or known characteristics that are difficult to model.\n- Data is often not available or is of poor quality.\n\n------------------------------------------------------------------------\n\n## Summary\n\n- Models:\n - [Simplifications of reality]{style=\"color:tomato\"} and do not capture all the [complexities]{style=\"color:tomato\"} of the system being studied.\n - Only as good as the [data]{style=\"color:tomato\"} used to parameterize them.\n - Sensitive to the [assumptions]{style=\"color:tomato\"} made during their formulation.\n - [Computationally expensive]{style=\"color:tomato\"} and require a lot of data to run.\n - [Difficult to interpret]{style=\"color:tomato\"} and communicate to non-experts.\n\n\n\n# Introduction to compartmental models\n\n\n## What are compartmental models?\n\n- Compartmental models:\n - divide populations into compartments (or groups) based on the individual's infection status and track them through time [@Blackwood2018a].\n - are mechanistic, meaning they describe processes such the interaction between hosts, biological processes of pathogen, host immune response, and so forth.\n\n------------------------------------------------------------------------\n\nCompartmental models are different from statistical models, which are used to describe the relationship between variables.\n\n------------------------------------------------------------------------\n\n- Individuals in a compartment:\n - are assumed to have the same features (disease state, age, location, etc)\n - can only be in one compartment at a time.\n - move between compartments based on defined transition rates.\n\n------------------------------------------------------------------------\n\n::: columns\n::: {.column width=\"60%\"}\n- Common compartments:\n - Susceptible (S) - hosts are not infected but can be infected\n - Infected (I) - hosts are infected (and can infect others)\n - Removed (R) - hosts are no longer infected and cannot be re-infected\n:::\n\n::: {.column width=\"40%\"}\n![Infection timeline illustrating how a pathogen in a host interacts with the host's immune system (Source: Modelling Infectious Diseases of Humans and Animals)](images/infection_timeline.png)\n:::\n:::\n\n------------------------------------------------------------------------\n\n- Other compartments can be added to the model to account for important events or processes (e.g., exposed, recovered, vaccinated, etc.)\n\n- It is, however, important to keep the model simple, less computationally intensive, and interpretable.\n\n------------------------------------------------------------------------\n\n- Compartmental models either have *discrete* or *continuous* time scales:\n - [Discrete time scales]{style=\"color:tomato;\"}: time is divided into discrete intervals (e.g., days, weeks, months).\n - [Continuous time scales]{style=\"color:tomato;\"}: time is continuous and the model is described using differential equations.\n\n------------------------------------------------------------------------\n\n- Compartmental models can be *deterministic* or *stochastic*:\n - [Deterministic]{style=\"color:tomato;\"} models always return the same output for the same input.\n - [Stochastic]{style=\"color:tomato;\"} models account for randomness in the system and model output always varies. Hence, they are often run multiple times to get an average output.\n\n------------------------------------------------------------------------\n\n- The choice of model type depends on:\n - the research [question]{style=\"color:tomato\"},\n - [data]{style=\"color:tomato\"} availability,\n - [computational resources]{style=\"color:tomato\"},\n - modeller [skillset]{style=\"color:tomato\"}.\n- In this introduction, we will focus on [deterministic compartmental models with continuous time scales]{style=\"color:tomato;\"}.\n\n------------------------------------------------------------------------\n\n- Now, back to the models, we are going to consider infections that either confer immunity after recovery or not.\n- The simplest compartmental models for capturing this is the SIR model.\n\n------------------------------------------------------------------------\n\n\n\n## The Susceptible-Infected-Recovered (SIR) model\n\n\n![](/images/model_diagrams/model_diagrams.001.jpeg){width=\"40%\" fig-align=\"center\"}\n\nThis model groups individuals into three *disease states*:\n\n- [Susceptible (S)]{style=\"color:green;\"}: not infected but can be.\n\n- [Infected (I)]{style=\"color:tomato;\"}: infected & infectious.\n\n- [Recovered/removed (R)]{style=\"color:blue;\"}: recovered & immune.\n\n------------------------------------------------------------------------\n\n### How do individuals move between compartments?\n\n#### Process 1: Transmission\n\n![](images/model_diagrams/model_diagrams.002.jpeg){width=\"70%\"}\n\n[What drives transmission?]{style=\"color:red;\"}\n\n------------------------------------------------------------------------\n\n- Transmission is driven by several factors, including:\n - Disease prevalence, [$I$]{style=\"color:blue;\"}, i.e., number of infected individuals at the time.\n - The number of contacts, [$C$]{style=\"color:blue;\"}, susceptible individuals have with infected individual.\n - The probability, [$p$]{style=\"color:blue;\"}, a susceptible individual will become infected when they contact an infected individual.\n\n------------------------------------------------------------------------\n\n![](images/model_diagrams/model_diagrams.002.jpeg){width=\"70%\"}\n\nThe transmission term is often defined through the [force of infection (FOI), $\\lambda$]{style=\"color:tomato;\"}.\n\n------------------------------------------------------------------------\n\n### A tour of the force of infection (FOI)\n\n- FOI, $\\lambda$, is the [per capita rate]{style=\"color:tomato;\"} at which susceptible individuals become infected.\n\n::: {.callout-note collapse=\"true\" icon=\"false\"}\n\"Per capita\" means the rate of an event occurring per individual in the population per unit of time.\n:::\n\n- Given the rate per individual per time, FOI, the rate at which new infecteds are generated is given by [$\\lambda \\times S$]{style=\"color:blue;\"}, where $S$ is the number of susceptible individuals.\n\n------------------------------------------------------------------------\n\n- The force of infection is made up of the probabilities/rates that:\n - contacts happen, [$c$]{style=\"color:blue\"},\n - a given contact is with an infected individual, [$p$]{style=\"color:blue\"}, and\n - a contact results in successful transmission, [$v$]{style=\"color:blue\"}.\n\n------------------------------------------------------------------------\n\n- The FOI can be formulated in two ways, depending on how the contact rate is expected to change with the population size:\n - Frequency-dependent/mass action transmission\n - Density-dependent transmission\n\n------------------------------------------------------------------------\n\n#### Frequency-dependent/mass action transmission\n\nThe rate of contact between individuals is constant irrespective of the population density, [$\\dfrac{N}{A}$]{style=\"color:blue\"}, where [$N$]{style=\"color:blue\"} is the population size and [$A$]{style=\"color:blue\"} is the area occupied by the population.\n\n------------------------------------------------------------------------\n\n- Recall that transmission also depends on the probability of contact with an infected host, [$p$]{style=\"color:blue\"}, which is assumed to be [$\\dfrac{I}{N}$]{style=\"color:blue\"}.\n\n- Hence, the frequency-dependent mass action is given by [$\\lambda = \\beta \\times \\dfrac{I}{N}$]{style=\"color:blue\"}, where [$\\beta$]{style=\"color:blue\"} is the transmission rate.\n\n------------------------------------------------------------------------\n\n::: {.callout-caution collapse=\"true\" icon=\"false\"}\n#### Question\n\nWhy does the frequency-dependent transmission contain [$\\dfrac{1}{N}$]{style=\"color:blue\"} if it does not depend on the population density?\n:::\n\n------------------------------------------------------------------------\n\n- Assume that the rate of new infections is given by [$\\dfrac{dI}{dt} = S \\times c \\times p \\times v$]{style=\"color:blue\"} where [$S$]{style=\"color:blue\"} is the number of susceptible hosts, [$c$]{style=\"color:blue\"} is the contact rate, and [$p$]{style=\"color:blue\"} is the probability of contact with an infected host, and [$v$]{style=\"color:blue\"} is the probability of transmission per contact.\n\n------------------------------------------------------------------------\n\n- [$p$]{style=\"color:blue\"} is usually assumed to be the disease prevalence, [$\\dfrac{I}{N}$]{style=\"color:blue\"}.\n\n- Hence, the rate of new infections, [$\\dfrac{dI}{dt} = S \\times c \\times \\dfrac{I}{N} \\times v$]{style=\"color:blue;\"}.\n\n------------------------------------------------------------------------\n\n- In frequency dependent transmission, the contact rate [$c$]{style=\"color:blue\"} is also assumed to be constant, say [$c = \\eta$]{style=\"color:blue\"} irrespective of population density, [$\\dfrac{N}{A}$]{style=\"color:blue\"}, where [$N$]{style=\"color:blue\"} is the population size and [$A$]{style=\"color:blue\"} is the area occupied by the population.\n- Hence, [$\\dfrac{dI}{dt} = S \\times \\eta \\times v \\times \\dfrac{I}{N}$]{style=\"color:blue\"}\n- Therefore, [$\\dfrac{dI}{dt} = \\beta S \\times \\dfrac{I}{N}$]{style=\"color:blue\"}, where [$\\beta = \\eta \\times v$]{style=\"color:blue\"}, and [$\\lambda = \\beta \\times \\dfrac{I}{N}$]{style=\"color:blue\"}.\n\n------------------------------------------------------------------------\n\n- [*Frequency-dependent/mass action transmission*]{style=\"color:tomato;\"} is often used to model sexually-transmitted diseases and diseases with heterogeneity in contact rates.\n- Sexual transmission in this case does not depend on how many infected individuals are in the population.\n\n------------------------------------------------------------------------\n\n#### Density dependent transmission\n\n- The rate of contact between individuals depends on the population density, [$\\dfrac{N}{A}$]{style=\"color:blue\"}.\n\n- Transmission also depends on [$p$]{style=\"color:blue\"} - the probability that a given contact is with an infected individual, often taken to be [$\\dfrac{I}{N}$]{style=\"color:blue\"}.\n\n------------------------------------------------------------------------\n\n- The density-dependent transmission is therefore given as [$\\lambda = \\beta \\times \\dfrac{I}{A}$]{style=\"color:blue\"}.\n\n- Here, because transmission increases with the density of infected individuals, it is called density-dependent transmission.\n\n::: {.callout-note collapse=\"true\" icon=\"false\"}\n- Notice that [$\\lambda = \\beta \\times \\dfrac{I}{N} \\times \\dfrac{N}{A}$]{style=\"color:blue\"} and the $N's$ cancel out.\n\n- [$A$]{style=\"color:blue\"} is often ignored.\n:::\n\n------------------------------------------------------------------------\n\n- [*Density dependent transmission*]{style=\"color:tomato;\"} can be used to model airborne and directly transmitted diseases, for example, measles.\n\n------------------------------------------------------------------------\n\n::: {.callout-caution collapse=\"true\" icon=\"false\"}\n#### Density-dependent vs frequency dependent transmission\n\nThis is one of the most confused and debated concepts in disease modelling. Several studies have attempted to clarify it, including the brilliant work by @begon2002clarification. Most of the clarifications provided here are based on this paper.\n:::\n\n- We will only use the [density-dependent]{style=\"color:tomato;\"} formulation in this course.\n\n------------------------------------------------------------------------\n\n![](images/model_diagrams/model_diagrams.003.jpeg)\n\n------------------------------------------------------------------------\n\n#### Process 2: Recovery\n\n![](images/model_diagrams/model_diagrams.005.jpeg){width=\"60%\" fig-align=\"center\"}\n\n[Recovery]{style=\"color:tomato;\"}, governed by the recovery rate, $\\gamma$ (rate at which infected individuals recover and become immune).\n\n------------------------------------------------------------------------\n\n##### Some notes on the recovery process\n\n- If the duration of infection is [$\\dfrac{1}{\\gamma}$]{style=\"color:blue\"}, then the rate at which infected individuals recover is [$\\gamma$]{style=\"color:blue\"}.\n\n- The average infectious period is often [estimated from epidemiological data]{style=\"color:tomato;\"}.\n\n::: {.callout-note collapse=\"true\" icon=\"false\"}\nYou will learn about parameter estimation in the model fitting and calibration lectures.\n:::\n\n------------------------------------------------------------------------\n\n![Source: @anderson1982directly](images/epi_parameters.png)\n\n------------------------------------------------------------------------\n\n### Putting it all together\n\n![An SIR model with transmission rate, $\\beta$, and recovery rate, $\\gamma$.](images/model_diagrams/model_diagrams.006.jpeg){width=\"80%\"}\n\n------------------------------------------------------------------------\n\n### Formulating the model equations\n\n[Continuous time compartmental]{style=\"color:tomato;\"} models are formulated using [differential equations]{style=\"color:tomato;\"} that describe the change in the number of individuals in each compartment over time.\n\n------------------------------------------------------------------------\n\nThe SIR model can be formulated as:\n\n::::: columns\n::: {.column width=\"50%\"}\n![](images/model_diagrams/model_diagrams.006.jpeg){fig-align=\"center\"}\n:::\n\n::: {.column width=\"50%\"}\n\\begin{align*}\n\\frac{dS}{dt} & = \\dot{S} = \\color{orange}{-\\beta S I} \\\\\n\\frac{dI}{dt} & = \\dot{I} = \\color{orange}{\\beta S I} - \\color{blue}{\\gamma I} \\\\\n\\frac{dR}{dt} & = \\dot{R} = \\color{blue}{\\gamma I}\n\\end{align*}\n:::\n:::::\n\nwhere [$\\beta$]{style=\"color:blue;\"} is the transmission rate, and [$\\gamma$]{style=\"color:blue;\"} is the recovery rate.\n\n::: notes\n- We may or may not use the dot notation to denote the rate of change.\n- The terms are just **inflows** and **outflows**.\n- **Pause** for questions and clarifications.\n:::\n\n------------------------------------------------------------------------\n\nThe initial conditions are given by:\n\n\\begin{equation*}\n\\begin{aligned}\nS(0) & = N - 1,\\\\\nI(0) & = 1, \\text{and} \\\\\nR(0) & = 0.\n\\end{aligned}\n\\end{equation*}\n\nwhere $N$ is the total population size.\n\n------------------------------------------------------------------------\n\n::: {.callout-note collapse=\"true\" icon=\"false\"}\n- We represent the compartments as [population sizes]{style=\"color:tomato;\"}.:\n - Some modellers often use [proportions]{style=\"color:tomato;\"} instead of population sizes as a way to remove the dimensions from the equations.\n:::\n\n------------------------------------------------------------------------\n\n### Model assumptions\n\n- The population is closed: no births, deaths, or migration.\n - Implicitly: the epidemic occurs much faster than the time scale of births, deaths, or migration.\n- Individuals are infectious immediately after infection and remain infectious until they recover.\n\n------------------------------------------------------------------------\n\n- Mixing is *homogeneous*, i.e., [individuals mix randomly]{style=\"color:tomato;\"}:\n\n- Individuals have an equal probability of coming into contact with any other individual in the population.\n\n- Transition rates are constant and do not change over time.\n\n- Individuals acquire \"lifelong\" immunity after recovery.\n\n::: notes\nThe $R$ compartment is an absorbing state in this model.\n:::\n\n------------------------------------------------------------------------\n\n::: {.callout-caution collapse=\"true\" icon=\"false\"}\n#### Discussion\n\n- What diseases do you think the SIR model is appropriate for?\n:::\n\n------------------------------------------------------------------------\n\n- The SIR model is appropriate for diseases that confer immunity after recovery. For example, measles and chicken pox.\n- Popularised by Kermack and McKendrick in 1927 [@kermack1927contribution]\n - A must-read paper for budding infectious disease modellers.\n\n------------------------------------------------------------------------\n\n### What questions can we answer with the SIR model?\n\n- The SIR model can be used to understand the dynamics of an epidemic:\n - How long will the epidemic last?\n - How many individuals will be infected (final epidemic size)?\n - When will the epidemic reach its peak?\n\n------------------------------------------------------------------------\n\n## Solving the SIR model\n\n- Compartmental models cannot be solved analytically.\n\n- We often perform two types of analyses to understand the [long term dynamics]{style=\"color:tomato;\"} of the model:\n\n - Qualitative: threshold phenomena and analysis of equilibria (disease-free and endemic).\\\n - Numerical simulations.\n\n::: callout-note\n- For this introductory course, we will use focus on simulation.\n:::\n\n- But first, let's do some qualitative analysis of the SIR.\n\n------------------------------------------------------------------------\n\n### Threshold phenomena\n\n- Here, we study the conditions under which an epidemic will [grow or die out]{style=\"color:tomato;\"} using the model equations.\n\n------------------------------------------------------------------------\n\n- Consider the case where $I(0) = 1$ individual is introduced into a population of size $N$ at time $t = 0$.\n\n- That means in a completely susceptible population, we have $S(0) = N - 1$ susceptible individuals.\n\n------------------------------------------------------------------------\n\n- At time 0, the disease will not spread if the rate of change of infections is negative, that is [$\\dfrac{dI}{dt} < 0$]{style=\"color:blue;\"}.\n\n- Recall from the SIR model that [$\\dfrac{dI}{dt} = \\beta S I - \\gamma I$]{style=\"color:blue;\"}.\n\n- Let's solve this equation at $t = 0$ by setting $I = 1$, assuming [$\\dfrac{dI}{dt} < 0$]{style=\"color:blue;\"}.\n\n------------------------------------------------------------------------\n\nAt $t = 0$, we have\n\n\\begin{equation*}\n\\frac{dI}{dt} = \\beta S I - \\gamma I < 0 \\end{equation*}\n\nFactor out $I$, and we get\n\n\\begin{equation*}\nI (\\beta S - \\gamma) < 0\n\\end{equation*}\n\n------------------------------------------------------------------------\n\n- Since at $t=0$$, I > 0$, we have [$S < \\dfrac{\\gamma}{\\beta}$]{style=\"color:blue;\"}.\n\n- [$\\dfrac{\\gamma}{\\beta}$]{style=\"color:blue;\"} is the relative removal rate.\n\n------------------------------------------------------------------------\n\n- **Interpretation**:\n\n - At $t = 0$, $S$ must be less than $\\dfrac{\\gamma}{\\beta}$ for the epidemic to die out.\n - If the rate of removal/recovery is greater than the transmission rate, the epidemic will die out.\n - Any infection that cannot transmit to more than one host is going to die out.\n\n------------------------------------------------------------------------\n\nFor the SIR model, the quantity [$\\dfrac{\\beta}{\\gamma}$]{style=\"color:blue\"} is called the [reproduction number, $R0$]{style=\"color:tomato\"} (pronounced \"R naught\" or \"R zero\").\n\n------------------------------------------------------------------------\n\n#### The basic reproduction number, R0\n\n- The basic reproduction number, [$R0$]{style=\"color:blue\"}, is the average number of secondary infections generated by a [single primary infection]{style=\"color:tomato\"} in a [completely susceptible]{style=\"color:tomato\"} population.\n\n- The basic reproduction number is a key quantity in infectious disease epidemiology.\n\n------------------------------------------------------------------------\n\n- It is often represented as a single number or a range of high-low values.\n - For example, the $R0$ for measles is popularly known to be $12$ - $18$ [@guerra2017measlesR0].\n\n------------------------------------------------------------------------\n\n- $R0$ is often used to express the threshold phenomena in infectious disease epidemiology:\n - If $R0 > 1$, the epidemic will grow.\n - If $R0 < 1$, the epidemic will decline.\n- A pathogen's $R0$ value is determined by biological characteristics of the pathogen and the host's behaviour.\n\n------------------------------------------------------------------------\n\n- Conceptually, $R0$ is given by\n\n$$\nR0 \\propto \\dfrac{\\text{Infection}}{\\text{Contact}} \\times \\dfrac{\\text{Contact}}{\\text{Time}} \\times \\dfrac{\\text{Time}}{\\text{Infection}}\n$$\n\n- $R0$ is unitless and dimensionless.\n\n------------------------------------------------------------------------\n\n### Numerical simulations\n\n- Numerical simulations can be performed with any programming language.\n\n- This course focuses on the R programming language because:\n\n - It is a popular language for data analysis and statistical computing.\n - It has a rich ecosystem of packages for solving differential equations.\n - It is free and open-source.\n\n------------------------------------------------------------------------\n\n- In R, we can use the `{deSolve}` package to solve the differential equations.\n\n- To solve the model in R with `{deSolve}`, we will always need to define at least three things:\n\n - The model equations.\n - The initial parameter values.\n - The initial conditions (population sizes).\n\n------------------------------------------------------------------------\n\n#### Practicals\n\n- Let's do a code walk through in R using the script `sir.Rmd`.\n\n------------------------------------------------------------------------\n\n::: {.callout-caution collapse=\"true\" icon=\"false\"}\n#### Discussion\n\n- What happens if we increase or decrease the value of $R0$?\n- What happens if we increase or decrease the value of the infectious period?\n- How can we flatten the curve?\n:::\n\n::: notes\n- We can flatten the curve by reducing the value of $R0$.\n- In reality, we can reduce $R0$ by implementing control measures such as social distancing, wearing masks, and vaccination.\n- These control measures reduce the number of contacts between individuals or the probability of infection, which in turn reduces the transmission rate.\n:::\n\n------------------------------------------------------------------------\n\n\n\n## The Susceptible-Exposed-Infected-Recovered (SEIR) Model\n\n\n![Timeline of infection. Source: Keeling & Rohani, 2008](images/infection_timeline.png)\n\n------------------------------------------------------------------------\n\n::::: columns\n::: {.column width=\"30%\"}\n![The SARS-COV-2 virus](images/corona_virus.jpeg)\n\n![The Ebola virus](images/ebola_virus.jpeg)\n:::\n\n::: {.column width=\"70%\"}\n- Some diseases have an [latent/exposed period]{style=\"color:tomato;\"} during which individuals are [infected but not yet infectious]{style=\"color:tomato;\"}. Examples include pertussis, COVID-19, and Ebola.\n- Disease transmission does not occur during the latent period because of low levels of the virus in the host.\n:::\n:::::\n\n------------------------------------------------------------------------\n\n![](images/model_diagrams/model_diagrams.007.jpeg)\n\n------------------------------------------------------------------------\n\n::::: columns\n::: {.column width=\"50%\"}\n![](images/model_diagrams/model_diagrams.007.jpeg)\n:::\n\n::: {.column width=\"50%\"}\n- The SEIR model extends the SIR model to include an exposed compartment, [$E$]{style=\"color:blue;\"}.\n- [$E$]{style=\"color:blue;\"}: infected but are not yet infectious.\n- Individuals stay in [$E$]{style=\"color:blue;\"} for [$1/\\sigma$]{style=\"color:blue;\"} days before moving to $I$.\n:::\n:::::\n\n------------------------------------------------------------------------\n\n::::: columns\n::: {.column width=\"60%\"}\n![](images/model_diagrams/model_diagrams.008.jpeg){width=\"80%\"}\n:::\n\n::: {.column width=\"40%\"}\nModel equations: \\begin{align*}\n\\frac{dS}{dt} & = -\\beta S I \\\\\n\\frac{dE}{dt} & = \\beta S I - \\color{orange}{\\sigma E} \\\\\n\\frac{dI}{dt} & = \\color{orange}{\\sigma E} - \\gamma I \\\\\n\\frac{dR}{dt} & = \\gamma I\n\\end{align*}\n:::\n:::::\n\n------------------------------------------------------------------------\n\n### SEIR model with births and deaths\n\n- Let's relax the assumption about births and deaths in the population.\n\n- We will assume that the susceptible population is replenished with new individuals at a constant rate, $\\mu$.\n\n- We will also assume that everyone dies at a constant rate, $\\mu$.\n\n------------------------------------------------------------------------\n\nOur model schematic now looks like this:\n\n![](images/model_diagrams/model_diagrams.009.jpeg)\n\n::: notes\nExplain in terms of inflows and outflows\n:::\n\n------------------------------------------------------------------------\n\n::::: columns\n::: {.column width=\"50%\"}\n![](images/model_diagrams/model_diagrams.009.jpeg)\n:::\n\n::: {.column width=\"50%\"}\nThe model equations now become:\n\n\\begin{align}\n\\frac{dS}{dt} & = \\color{green}{\\mu N} - \\beta S I - \\color{blue}{\\mu} S \\\\\n\\frac{dE}{dt} & = \\beta S I - \\sigma E - \\color{blue}{\\mu} E \\\\\n\\frac{dI}{dt} & = \\sigma E - \\gamma I - \\color{blue}{\\mu} I \\\\\n\\frac{dR}{dt} & = \\gamma I - \\color{blue}{\\mu} R\n\\end{align}\n:::\n:::::\n\n\n\n\n\n\n\n------------------------------------------------------------------------\n\n::: {.callout-caution collapse=\"true\" icon=\"false\"}\n#### Discussion\n\nWhat is the $R0$ of the SEIR model?\n:::\n\n------------------------------------------------------------------------\n\n### The R0 of the SEIR Model\n\n- Beyond the SIR model, calculating $R0$ for more complex models can be challenging due to the presence of multiple compartments.\n\n- For complex models, we use the [next generation matrix]{style=\"color:tomato;\"} approach [@diekmann1990definition; @diekmann2010construction].\n\n::: {.callout-note collapse=\"true\" icon=\"false\"}\nUsing the next generation matrix approach, we can show that the SEIR model with constant births and deaths has $$R0 = \\dfrac{\\beta \\sigma}{(\\gamma + \\mu)(\\sigma + \\mu)}$$.\n:::\n\n------------------------------------------------------------------------\n\n\n\n\n\n### Numerical simulations\n\n#### R Practicals\n\n- We can use the same approach as the SIR model to simulate the SEIR model.\n\n- Modify the `sir.Rmd` script to simulate the SEIR model.\n\n\n\n# Modelling epidemic control\n\n\n::: callout-note\nFor a recap on the various control measures, refer to @sec-control-measures.\n:::\n\n------------------------------------------------------------------------\n\n## Vaccination\n\n::: {callout-note}\nFor a background on vaccination, refer to @sec-vaccination.\n:::\n\n------------------------------------------------------------------------\n\n::: columns\n::: {.column width=\"40%\"}\n![](images/vaccine.jpeg){width=\"100%\"}\n:::\n\n::: {.column width=\"60%\"}\n- Vaccination is one of the most effective ways to control infectious diseases.\n- Conceptually, vaccination works to reduce the number of susceptible individuals, $S$.\n:::\n:::\n\n------------------------------------------------------------------------\n\n- There are different types of vaccination strategies, including:\n\n - [pediatric]{style=\"color:tomato\"} vaccination: vaccinating children to prevent the spread of diseases.\n - [mass/random]{style=\"color:tomato\"} vaccination: vaccinating a large proportion of the population.\n - [targeted]{style=\"color:tomato\"} vaccination: vaccinating specific groups of individuals, example, healthcare workers.\n - [pulse]{style=\"color:tomato\"} vaccination: periodically vaccinating a large number of individuals.\n\n------------------------------------------------------------------------\n\n- Let's consider the case of mass/random vaccination.\n\n- Compartmental models can be extended to capture this by adding a new compartment, $V$.\n\n- Let's consider the SEIR model with vaccination.\n\n------------------------------------------------------------------------\n\n### The Susceptible-Exposed-Infected-Recovered-Vaccinated (SEIRV) Model\n\n![](images/model_diagrams/model_diagrams.010.jpeg)\n\n------------------------------------------------------------------------\n\n::: columns\n::: {.column width=\"40%\"}\n![](images/model_diagrams/model_diagrams.010.jpeg)\n:::\n\n::: {.column width=\"60%\"}\n- The SEIRV model is simply the SEIR model with a vaccinated compartment, $V$.\n- The vaccinated compartment represents previously susceptible individuals who have been vaccinated and are immune to the disease.\n:::\n:::\n\n------------------------------------------------------------------------\n\n- The vaccinated compartment is:\n\n - not infectious and does not move to the exposed or infectious compartments.\n\n - replenished by the rate of vaccination, $\\eta$.\n\n------------------------------------------------------------------------\n\nThe model diagram and equations are as follows:\n\n::: columns\n::: {.column width=\"40%\"}\n\n```{=tex}\n\\begin{align}\n\\frac{dS}{dt} & = -\\beta S I - \\eta S \\\\\n\\frac{dE}{dt} & = \\beta S I - \\sigma E \\\\\n\\frac{dI}{dt} & = \\sigma E - \\gamma I \\\\\n\\frac{dR}{dt} & = \\gamma I \\\\\n\\frac{dV}{dt} & = \\eta S\n\\end{align}\n```\n\n:::\n\n::: {.column width=\"60%\"}\n![](images/model_diagrams/model_diagrams.010.jpeg)\n:::\n:::\n\nwhere $\\eta$ is the rate of vaccination.\n\n------------------------------------------------------------------------\n\n::: {.callout-caution collapse=\"true\" icon=\"false\"}\n#### Discussion\n\n- What are some of the assumptions of the SEIRV model?\n\n- What are the implications of these assumptions for the model's predictions?\n:::\n\n------------------------------------------------------------------------\n\n### Numerical simulations\n\n#### R Practicals\n\n- We can use the same approach as the SIR and SEIR models to simulate the SEIRV model.\n\n- Modify the `seir.Rmd` script to simulate the SEIRV model.\n\n------------------------------------------------------------------------\n\n## Non-Pharmaceutical Interventions (NPIs)\n\n::: {callout-note}\nFor a background on non-pharmaceutical interventions, refer to @sec-npi.\n:::\n\n------------------------------------------------------------------------\n\n- Conceptually, NPIs usually act to either reduce the transmission rate, $\\beta$ or prevent infected individuals from transmitting.\n\n- NPIs like isolation, social distancing and movement restrictions can reduce the transmission rate, $\\beta$, by reducing the contact rate between susceptible and infectious individuals.\n\n- Hygiene measures reduce the probability of transmission per contact, thereby reducing the transmission rate, $\\beta$, since $\\beta = c \\times p$.\n\n------------------------------------------------------------------------\n\n- Let's consider two scenarios that will extend the SIR model to include NPIs:\n\n 1. Modifying the transmission rate, $\\beta$.\n 2. Preventing infected individuals from transmitting through isolation.\n\n------------------------------------------------------------------------\n\n### Modifying the transmission rate\n\n- NPIs such as social distancing, mask-wearing, and hand hygiene can reduce the transmission rate, $\\beta$.\n\n- We can model this by making the transmission rate a function of time, $\\beta (t)$.\n\n---\n\nThe modified SIR model with a reduced transmission rate is as follows:\n\n\n```{=tex}\n\\begin{align*}\n\\frac{dS}{dt} & = -\\beta (t) S I \\\\\n\\frac{dI}{dt} & = \\beta (t) S I - \\gamma I \\\\\n\\frac{dR}{dt} & = \\gamma I\n\\end{align*}\n```\n\n\n---\n\n- The simplest form is to reduce $\\beta$ by an NPI efficacy, say $\\epsilon$.\n\n- Assuming the NPI is implemented between $t_{\\text{npi\\_start}}$ and $t_{\\text{npi\\_end}}$, it means that $\\beta$ remains the same before that period and is modified to $(1- \\epsilon)\\beta$ during the period of the NPI, where $0 \\leq \\epsilon \\leq 1$.\n\n- With this knowledge, we can define $\\beta (t)$ mathematically as:\n\n\n```{=tex}\n\\begin{equation*}\n\\beta(t) = \\begin{cases}\n\\beta & \\text{if } t < t_{\\text{npi\\_start}} \\text{ or } t > t_{\\text{npi\\_end}} \\\\\n(1 - \\epsilon) \\beta & \\text{if } t_{\\text{npi\\_start}} \\le t \\le t_{\\text{npi\\_end}}\n\\end{cases}\n\\end{equation*}\n```\n\n\n------------------------------------------------------------------------\n\n#### R Practicals\n\n- Let's open the script file `sir_npi.R` and follow along.\n\n------------------------------------------------------------------------\n\n### NPIs as compartments\n\n- In the previous example, we retained the SIR model structure and modified the transmission rate.\n\n- We can also model NPIs as compartments in the model. This is useful when we want to treat individuals affected by the NPIs differently.\n\n------------------------------------------------------------------------\n\n- For example, isolation is an NPI that prevents infected individuals from transmitting the disease.\n\n- This means that infected individuals in isolation do not contribute to the transmission of the disease and need to be removed from the infected compartment.\n\n- Moving isolated individuals to a separate compartment allows us to track them separately in the model and apply relevant parameters.\n\n------------------------------------------------------------------------\n\n- We can model this by introducing a new compartment, $Q$, for isolating infected individuals.\n\n- Let's assume, infected individuals move to the isolated compartment at a rate, $\\delta$.\n\n- Infected individuals in the isolated compartment do not transmit the disease.\n\n------------------------------------------------------------------------\n\nThe modified SIR model with isolated is as follows:\n\n\n```{=tex}\n\\begin{align*}\n\\frac{dS}{dt} & = -\\beta S I \\\\\n\\frac{dI}{dt} & = \\beta S I - \\gamma I - \\delta I \\\\\n\\frac{dR}{dt} & = \\gamma I + \\tau Q \\\\\n\\frac{dQ}{dt} & = \\delta I - \\tau Q\n\\end{align*}\n```\n\nwhere $\\delta$ is the rate at which infected individuals move to the isolated compartment, and $\\tau$ is the rate at which individuals recover from isolation.\n\n------------------------------------------------------------------------\n\n##### R Practicals\n\n- We can use the same approach as the SIR model to simulate the model with isolation.\n- Modify the SIR model in `sir.Rmd` to incorporate the isolated compartment, $Q$ and the relevant parameters.\n\n\n\n# Brief notes on modelling host heterogeneity\n\n\n- The models we have discussed so far assume that all individuals in the population are identical.\n\n- However, in reality, individuals differ in their susceptibility to infection and their ability to transmit the disease.\n\n- It is essential to capture this heterogeneity in the models in order for the models to be more realistic and useful for decision-making.\n\n------------------------------------------------------------------------\n\n- This can be captured by incorporating heterogeneity into the models.\n\n- Heterogeneity is often captured by stratifying the population into different groups.\n\n------------------------------------------------------------------------\n\n## Age structure\n\n- For many infectious diseases, the risk of infection and the severity of the disease vary by age.\n\n- Hence, it is essential to capture age structure in the models.\n\n- To do this, we divide the population into different age groups and model the disease dynamics within each age group.\n\n- Let's extend the SIR model to include age structure.\n\n------------------------------------------------------------------------\n\n- We will divide the population into $n$ age groups.\n\n- Because the homogeneous model has 3 compartments, the age structured one will have $3n$ compartments: $S_1, I_1, R_1, S_2, I_2, R_2, ..., S_n, I_n, R_n$.\n\n------------------------------------------------------------------------\n\n- The (compact) model equations are as follows:\n\n\\begin{align*}\n\\dfrac{dS_i}{dt} &= -\\sum_{j=1}^{n} \\beta_{ji} S_i I_j \\\\\n\\dfrac{dI_i}{dt} &= \\sum_{j=1}^{n} \\beta_{ji} S_i I_j - \\gamma I_i \\\\\n\\dfrac{dR_i}{dt} &= \\gamma I_i\n\\end{align*}\n\n------------------------------------------------------------------------\n\n- The model can be used to study the impact of age structure on the dynamics of the epidemic.\n\n- For example, we can study the impact of vaccinating different age groups on the dynamics of the epidemic.\n\n------------------------------------------------------------------------\n\n## Other Heterogeneities\n\n- Other forms of heterogeneity that can be incorporated into the models include:\n - Spatial heterogeneity\n - Temporal heterogeneity\n - Contact heterogeneity\n - Heterogeneity in host behavior\n\n\n\n------------------------------------------------------------------------\n\n# Final Remarks\n\n## Takeaways\n\n\nIn the last two days, we have covered a lot of ground. Here are some key takeaways:\n\n- Infectious diseases are a major public health concern that can have devastating consequences.\n\n- Mathematical models are essential tools for studying the dynamics of infectious diseases and informing public health decision-making.\n\n- Models are simplifications of reality that help us understand complex systems.\n\n------------------------------------------------------------------------\n\n- We have discussed several compartmental models, including the SIR, SEIR, and SEIRV models.\n\n- The SIR model is a simple compartmental model that divides the population into three compartments: susceptible, infected, and recovered.\n\n- The SEIR model extends the SIR model by adding an exposed compartment.\n\n- We can model various pharmaceutical and non-pharmaceutical interventions (NPIs) by modifying the transmission rate or adding new compartments.\n\n------------------------------------------------------------------------\n\n- We have discussed the basic reproduction number, $R0$, which is a key parameter in infectious disease epidemiology.\n\n- $R0$ is the average number of secondary infections produced by a single infected individual in a completely susceptible population.\n\n- If $R0 > 1$, the disease will spread in the population; if $R0 < 1$, the disease will die out.\n\n------------------------------------------------------------------------\n\n- Deriving the basic reproduction number, $R0$, is an essential step in understanding the dynamics of infectious diseases.\n\n- Deriving $R0$ for the simple SIR model is simple as we just need to study the threshold phenomena.\n\n- For more complex models, we can use the next-generation matrix approach to derive $R0$.\n\n------------------------------------------------------------------------\n\n- Often, homogeneous models are not sufficient to capture the complexity of infectious diseases.\n\n- Incorporating heterogeneity into the models is essential for capturing the complexity of infectious diseases.\n\n- Age structure is a common form of heterogeneity that can be incorporated into the models.\n\n- Other forms of heterogeneity include spatial, temporal, and contact heterogeneity.\n\n\n\n------------------------------------------------------------------------\n\n## What skills are needed to build and use infectious disease models?\n\n\n![A non-exhaustive list of skills needed for modelling infectious diseases.](images/modelling_skills.jpeg)\n\n\n\n------------------------------------------------------------------------\n\n## Contact Information\n\n\n**James Mba Azam, PhD**\n\n[*Epiverse-TRACE Initiative, London School of Hygiene and Tropical Medicine, UK*](https://epiverse-trace.github.io/)\n\n**Email:** [james.azam\\@lshtm.ac.uk](mailto:james.azam@lshtm.ac.uk)\n\n**ORCID:** [0000-0001-5782-7330](https://orcid.org/0000-0001-5782-7330)\n\n**Social Media:**\n\n**LinkedIn:** [James Azam](https://www.linkedin.com/in/james-azam-phd-6b5b00176/)\n\n**Twitter:** [james_azam](https://twitter.com/james_azam)\n\n**GitHub:** [jamesmbaazam](https://github.com/jamesmbaazam)\n\n\n\n------------------------------------------------------------------------\n\n![](https://i.creativecommons.org/l/by/4.0/88x31.png) This presentation is made available through a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/)\n\n# List of Resources\n\n\n## Textbooks\n\n::: {layout-ncol=\"2\"}\n\n![Infectious Diseases of Humans: Dynamics and Control by Roy M. Anderson and Robert M. May](images/Anderson_and_May.jpeg){width=\"60%\"}\n\n![Infectious Disease Modelling by Emilia Vynnycky and Richard White](images/ID_modelling_Vynnycky_and_White.jpeg){width=\"60%\"}\n\n:::\n\n------------------------------------------------------------------------\n\n::: {layout-ncol=\"2\"}\n\n![Modeling Infectious Diseases in Humans and Animals by Matt Keeling and Pejman Rohani](images/Rohani_and_Keeling.jpeg){width=\"60%\"}\n\n![Epidemics: Models and Data Using R by Ottar N. Bjornstad](images/Epidemics_Ottar.jpg){width=\"60%\"}\n\n:::\n\n------------------------------------------------------------------------\n\n## Papers and Articles {.smaller}\n\n------------------------------------------------------------------------\n\n### Modelling infectious disease transmission\n\n- Grassly, N. C., & Fraser, C. (2008). Mathematical models of infectious disease transmission. Nature Reviews Microbiology, 6(6), 477–487. \n\n- Kirkeby, C., Brookes, V. J., Ward, M. P., Dürr, S., & Halasa, T. (2021). A practical introduction to mechanistic modeling of disease transmission in veterinary science. Frontiers in veterinary science, 7, 546651. \n\n------------------------------------------------------------------------\n\n- Blackwood, J. C., & Childs, L. M. (2018). An introduction to compartmental modeling for the budding infectious disease modeler. \n\n------------------------------------------------------------------------\n\n- Cobey, S. (2020). Modeling infectious disease dynamics. Science, 368(6492), 713–714. \n\n- Bjørnstad, O. N., Shea, K., Krzywinski, M., & Altman, N. (2020). Modeling infectious epidemics. Nature Methods, 17(5), 455–456. \n\n------------------------------------------------------------------------\n\n- Bodner, K., Brimacombe, C., Chenery, E. S., Greiner, A., McLeod, A. M., Penk, S. R., & Soto, J. S. V. (2021). Ten simple rules for tackling your first mathematical models: A guide for graduate students by graduate students. PLOS Computational Biology, 17(1), e1008539. \n\n- Mishra, S., Fisman, D. N., & Boily, M.-C. (2011). The ABC of terms used in mathematical models of infectious diseases. Journal of Epidemiology & Community Health, 65(1), 87–94. \n\n------------------------------------------------------------------------\n\n- James, L. P., Salomon, J. A., Buckee, C. O., & Menzies, N. A. (2021). The Use and Misuse of Mathematical Modeling for Infectious Disease Policymaking: Lessons for the COVID-19 Pandemic. 41(4), 379–385. \n\n- Holmdah, I., & Buckee, C. (2020). Wrong but useful—What COVID-19 epidemiologic models can and cannot tell us. New England Journal of Medicine. \n\n------------------------------------------------------------------------\n\n- Metcalf, C. J. E. E., Edmunds, W. J., & Lessler, J. (2015). Six challenges in modelling for public health policy. Epidemics, 10(2015), 93–96. \n\n- Roberts, M., Andreasen, V., Lloyd, A., & Pellis, L. (2015). Nine challenges for deterministic epidemic models. Epidemics, 10(2015), 49–53. \n\n------------------------------------------------------------------------\n\n### Deriving and Interpreting R0 {.smaller}\n\n- Jones, J. H. (2011). Notes On R0. Building, 1–19. \n\n- Diekmann, O., Heesterbeek, J. A. P., & Metz, J. A. J. (1990). On the definition and the computation of the basic reproduction ratio R0 in models for infectious diseases in heterogeneous populations. Journal of Mathematical Biology, 28(4), 365–382. \n\n------------------------------------------------------------------------\n\n- Diekmann, O., Heesterbeek, J. A. P., & Roberts, M. G. (2010). The construction of next-generation matrices for compartmental epidemic models. Journal of the Royal Society Interface, 7(47), 873–885. \n\n---\n\n## Code repositories {.smaller}\n\n- [epirecipes](http://epirecip.es/epicookbook/): Code for collate mathematical models of infectious disease transmission, with implementations in R, Python, and Julia.\n\n- [Modeling Infectious Diseases in Humans and Animals](http://www.modelinginfectiousdiseases.org/): Code for the labelled programs in the book \"Modeling Infectious Diseases in Humans and Animals\". They are generally available as C++, Fortran and Matlab files.\n\n\n\n# References\n\n::: {#refs}\n:::\n", "supporting": [ "slides_files" ], diff --git a/_freeze/slides/libs/revealjs/dist/theme/quarto.css b/_freeze/slides/libs/revealjs/dist/theme/quarto.css index 188073f..810736e 100644 --- a/_freeze/slides/libs/revealjs/dist/theme/quarto.css +++ b/_freeze/slides/libs/revealjs/dist/theme/quarto.css @@ -5,4 +5,4 @@ * we also add `bright-[color]-` synonyms for the `-[color]-intense` classes since * that seems to be what ansi_up emits * -*/.ansi-black-fg{color:#3e424d}.ansi-black-bg{background-color:#3e424d}.ansi-black-intense-black,.ansi-bright-black-fg{color:#282c36}.ansi-black-intense-black,.ansi-bright-black-bg{background-color:#282c36}.ansi-red-fg{color:#e75c58}.ansi-red-bg{background-color:#e75c58}.ansi-red-intense-red,.ansi-bright-red-fg{color:#b22b31}.ansi-red-intense-red,.ansi-bright-red-bg{background-color:#b22b31}.ansi-green-fg{color:#00a250}.ansi-green-bg{background-color:#00a250}.ansi-green-intense-green,.ansi-bright-green-fg{color:#007427}.ansi-green-intense-green,.ansi-bright-green-bg{background-color:#007427}.ansi-yellow-fg{color:#ddb62b}.ansi-yellow-bg{background-color:#ddb62b}.ansi-yellow-intense-yellow,.ansi-bright-yellow-fg{color:#b27d12}.ansi-yellow-intense-yellow,.ansi-bright-yellow-bg{background-color:#b27d12}.ansi-blue-fg{color:#208ffb}.ansi-blue-bg{background-color:#208ffb}.ansi-blue-intense-blue,.ansi-bright-blue-fg{color:#0065ca}.ansi-blue-intense-blue,.ansi-bright-blue-bg{background-color:#0065ca}.ansi-magenta-fg{color:#d160c4}.ansi-magenta-bg{background-color:#d160c4}.ansi-magenta-intense-magenta,.ansi-bright-magenta-fg{color:#a03196}.ansi-magenta-intense-magenta,.ansi-bright-magenta-bg{background-color:#a03196}.ansi-cyan-fg{color:#60c6c8}.ansi-cyan-bg{background-color:#60c6c8}.ansi-cyan-intense-cyan,.ansi-bright-cyan-fg{color:#258f8f}.ansi-cyan-intense-cyan,.ansi-bright-cyan-bg{background-color:#258f8f}.ansi-white-fg{color:#c5c1b4}.ansi-white-bg{background-color:#c5c1b4}.ansi-white-intense-white,.ansi-bright-white-fg{color:#a1a6b2}.ansi-white-intense-white,.ansi-bright-white-bg{background-color:#a1a6b2}.ansi-default-inverse-fg{color:#fff}.ansi-default-inverse-bg{background-color:#000}.ansi-bold{font-weight:bold}.ansi-underline{text-decoration:underline}:root{--quarto-body-bg: #fdf6e3;--quarto-body-color: #657b83;--quarto-text-muted: #b8c4c9;--quarto-border-color: #93a1a1;--quarto-border-width: 1px;--quarto-border-radius: 4px}table.gt_table{color:var(--quarto-body-color);font-size:1em;width:100%;background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_column_spanner_outer{color:var(--quarto-body-color);background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_col_heading{color:var(--quarto-body-color);font-weight:bold;background-color:rgba(0,0,0,0)}table.gt_table thead.gt_col_headings{border-bottom:1px solid currentColor;border-top-width:inherit;border-top-color:var(--quarto-border-color)}table.gt_table thead.gt_col_headings:not(:first-child){border-top-width:1px;border-top-color:var(--quarto-border-color)}table.gt_table td.gt_row{border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-width:0px}table.gt_table tbody.gt_table_body{border-top-width:1px;border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-color:currentColor}div.columns{display:initial;gap:initial}div.column{display:inline-block;overflow-x:initial;vertical-align:top;width:50%}.code-annotation-tip-content{word-wrap:break-word}.code-annotation-container-hidden{display:none !important}dl.code-annotation-container-grid{display:grid;grid-template-columns:min-content auto}dl.code-annotation-container-grid dt{grid-column:1}dl.code-annotation-container-grid dd{grid-column:2}pre.sourceCode.code-annotation-code{padding-right:0}code.sourceCode .code-annotation-anchor{z-index:100;position:relative;float:right;background-color:rgba(0,0,0,0)}input[type=checkbox]{margin-right:.5ch}:root{--mermaid-bg-color: #fdf6e3;--mermaid-edge-color: #999;--mermaid-node-fg-color: #657b83;--mermaid-fg-color: #657b83;--mermaid-fg-color--lighter: #7f949c;--mermaid-fg-color--lightest: #9cacb2;--mermaid-font-family: Lato, sans-serif;--mermaid-label-bg-color: #fdf6e3;--mermaid-label-fg-color: #468;--mermaid-node-bg-color: rgba(68, 102, 136, 0.1);--mermaid-node-fg-color: #657b83}@media print{:root{font-size:11pt}#quarto-sidebar,#TOC,.nav-page{display:none}.page-columns .content{grid-column-start:page-start}.fixed-top{position:relative}.panel-caption,.figure-caption,figcaption{color:#666}}.code-copy-button{position:absolute;top:0;right:0;border:0;margin-top:5px;margin-right:5px;background-color:rgba(0,0,0,0);z-index:3}.code-copy-button:focus{outline:none}.code-copy-button-tooltip{font-size:.75em}pre.sourceCode:hover>.code-copy-button>.bi::before{display:inline-block;height:1rem;width:1rem;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:1rem 1rem}pre.sourceCode:hover>.code-copy-button-checked>.bi::before{background-image:url('data:image/svg+xml,')}pre.sourceCode:hover>.code-copy-button:hover>.bi::before{background-image:url('data:image/svg+xml,')}pre.sourceCode:hover>.code-copy-button-checked:hover>.bi::before{background-image:url('data:image/svg+xml,')}.panel-tabset [role=tablist]{border-bottom:1px solid #93a1a1;list-style:none;margin:0;padding:0;width:100%}.panel-tabset [role=tablist] *{-webkit-box-sizing:border-box;box-sizing:border-box}@media(min-width: 30em){.panel-tabset [role=tablist] li{display:inline-block}}.panel-tabset [role=tab]{border:1px solid rgba(0,0,0,0);border-top-color:#93a1a1;display:block;padding:.5em 1em;text-decoration:none}@media(min-width: 30em){.panel-tabset [role=tab]{border-top-color:rgba(0,0,0,0);display:inline-block;margin-bottom:-1px}}.panel-tabset [role=tab][aria-selected=true]{background-color:#93a1a1}@media(min-width: 30em){.panel-tabset [role=tab][aria-selected=true]{background-color:rgba(0,0,0,0);border:1px solid #93a1a1;border-bottom-color:#fdf6e3}}@media(min-width: 30em){.panel-tabset [role=tab]:hover:not([aria-selected=true]){border:1px solid #93a1a1}}.code-with-filename .code-with-filename-file{margin-bottom:0;padding-bottom:2px;padding-top:2px;padding-left:.7em;border:var(--quarto-border-width) solid var(--quarto-border-color);border-radius:var(--quarto-border-radius);border-bottom:0;border-bottom-left-radius:0%;border-bottom-right-radius:0%}.code-with-filename div.sourceCode,.reveal .code-with-filename div.sourceCode{margin-top:0;border-top-left-radius:0%;border-top-right-radius:0%}.code-with-filename .code-with-filename-file pre{margin-bottom:0}.code-with-filename .code-with-filename-file{background-color:rgba(219,219,219,.8)}.quarto-dark .code-with-filename .code-with-filename-file{background-color:#555}.code-with-filename .code-with-filename-file strong{font-weight:400}.reveal.center .slide aside,.reveal.center .slide div.aside{position:initial}section.has-light-background,section.has-light-background h1,section.has-light-background h2,section.has-light-background h3,section.has-light-background h4,section.has-light-background h5,section.has-light-background h6{color:#222}section.has-light-background a,section.has-light-background a:hover{color:#2a76dd}section.has-light-background code{color:#4758ab}section.has-dark-background,section.has-dark-background h1,section.has-dark-background h2,section.has-dark-background h3,section.has-dark-background h4,section.has-dark-background h5,section.has-dark-background h6{color:#fff}section.has-dark-background a,section.has-dark-background a:hover{color:#42affa}section.has-dark-background code{color:#ffa07a}#title-slide,div.reveal div.slides section.quarto-title-block{text-align:center}#title-slide .subtitle,div.reveal div.slides section.quarto-title-block .subtitle{margin-bottom:2.5rem}.reveal .slides{text-align:left}.reveal .title-slide h1{font-size:1.6em}.reveal[data-navigation-mode=linear] .title-slide h1{font-size:2.5em}.reveal div.sourceCode{border:1px solid #93a1a1;border-radius:4px}.reveal pre{width:100%;box-shadow:none;background-color:#fdf6e3;border:none;margin:0;font-size:.55em}.reveal code{color:var(--quarto-hl-fu-color);background-color:rgba(0,0,0,0);white-space:pre-wrap}.reveal pre.sourceCode code{background-color:#fdf6e3;padding:6px 9px;max-height:500px;white-space:pre}.reveal pre code{background-color:#fdf6e3;color:#657b83}.reveal .column-output-location{display:flex;align-items:stretch}.reveal .column-output-location .column:first-of-type div.sourceCode{height:100%;background-color:#fdf6e3}.reveal blockquote{display:block;position:relative;color:#b8c4c9;width:unset;margin:var(--r-block-margin) auto;padding:.625rem 1.75rem;border-left:.25rem solid #b8c4c9;font-style:normal;background:none;box-shadow:none}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:block}.reveal .slide aside,.reveal .slide div.aside{position:absolute;bottom:20px;font-size:0.7em;color:#b8c4c9}.reveal .slide sup{font-size:0.7em}.reveal .slide.scrollable aside,.reveal .slide.scrollable div.aside{position:relative;margin-top:1em}.reveal .slide aside .aside-footnotes{margin-bottom:0}.reveal .slide aside .aside-footnotes li:first-of-type{margin-top:0}.reveal .layout-sidebar{display:flex;width:100%;margin-top:.8em}.reveal .layout-sidebar .panel-sidebar{width:270px}.reveal .layout-sidebar-left .panel-sidebar{margin-right:calc(0.5em*2)}.reveal .layout-sidebar-right .panel-sidebar{margin-left:calc(0.5em*2)}.reveal .layout-sidebar .panel-fill,.reveal .layout-sidebar .panel-center,.reveal .layout-sidebar .panel-tabset{flex:1}.reveal .panel-input,.reveal .panel-sidebar{font-size:.5em;padding:.5em;border-style:solid;border-color:#93a1a1;border-width:1px;border-radius:4px;background-color:#f8f9fa}.reveal .panel-sidebar :first-child,.reveal .panel-fill :first-child{margin-top:0}.reveal .panel-sidebar :last-child,.reveal .panel-fill :last-child{margin-bottom:0}.panel-input>div,.panel-input>div>div{vertical-align:middle;padding-right:1em}.reveal p,.reveal .slides section,.reveal .slides section>section{line-height:1.3}.reveal.smaller .slides section,.reveal .slides section.smaller,.reveal .slides section .callout{font-size:0.7em}.reveal.smaller .slides section section{font-size:inherit}.reveal.smaller .slides h1,.reveal .slides section.smaller h1{font-size:calc(2.5em/0.7)}.reveal.smaller .slides h2,.reveal .slides section.smaller h2{font-size:calc(1.6em/0.7)}.reveal.smaller .slides h3,.reveal .slides section.smaller h3{font-size:calc(1.3em/0.7)}.reveal .columns>.column>:not(ul,ol){margin-left:.25em;margin-right:.25em}.reveal .columns>.column:first-child>:not(ul,ol){margin-right:.5em;margin-left:0}.reveal .columns>.column:last-child>:not(ul,ol){margin-right:0;margin-left:.5em}.reveal .slide-number{color:#4ca2df;background-color:#fdf6e3}.reveal .footer{color:#b8c4c9}.reveal .footer a{color:#268bd2}.reveal .footer.has-dark-background{color:#fff}.reveal .footer.has-dark-background a{color:#7bc6fa}.reveal .footer.has-light-background{color:#505050}.reveal .footer.has-light-background a{color:#6a9bdd}.reveal .slide-number{color:#b8c4c9}.reveal .slide-number.has-dark-background{color:#fff}.reveal .slide-number.has-light-background{color:#505050}.reveal .slide figure>figcaption,.reveal .slide img.stretch+p.caption,.reveal .slide img.r-stretch+p.caption{font-size:0.7em}@media screen and (min-width: 500px){.reveal .controls[data-controls-layout=edges] .navigate-left{left:.2em}.reveal .controls[data-controls-layout=edges] .navigate-right{right:.2em}.reveal .controls[data-controls-layout=edges] .navigate-up{top:.4em}.reveal .controls[data-controls-layout=edges] .navigate-down{bottom:2.3em}}.tippy-box[data-theme~=light-border]{background-color:#fdf6e3;color:#657b83;border-radius:4px;border:solid 1px #b8c4c9;font-size:.6em}.tippy-box[data-theme~=light-border] .tippy-arrow{color:#b8c4c9}.tippy-box[data-placement^=bottom]>.tippy-content{padding:7px 10px;z-index:1}.reveal .callout.callout-style-simple .callout-body,.reveal .callout.callout-style-default .callout-body,.reveal .callout.callout-style-simple div.callout-title,.reveal .callout.callout-style-default div.callout-title{font-size:inherit}.reveal .callout.callout-style-default .callout-icon::before,.reveal .callout.callout-style-simple .callout-icon::before{height:2rem;width:2rem;background-size:2rem 2rem}.reveal .callout.callout-titled .callout-title p{margin-top:.5em}.reveal .callout.callout-titled .callout-icon::before{margin-top:1rem}.reveal .callout.callout-titled .callout-body>.callout-content>:last-child{margin-bottom:1rem}.reveal .panel-tabset [role=tab]{padding:.25em .7em}.reveal .slide-menu-button .fa-bars::before{background-image:url('data:image/svg+xml,')}.reveal .slide-chalkboard-buttons .fa-easel2::before{background-image:url('data:image/svg+xml,')}.reveal .slide-chalkboard-buttons .fa-brush::before{background-image:url('data:image/svg+xml,')}/*! light */.reveal ol[type=a]{list-style-type:lower-alpha}.reveal ol[type=a s]{list-style-type:lower-alpha}.reveal ol[type=A s]{list-style-type:upper-alpha}.reveal ol[type=i]{list-style-type:lower-roman}.reveal ol[type=i s]{list-style-type:lower-roman}.reveal ol[type=I s]{list-style-type:upper-roman}.reveal ol[type="1"]{list-style-type:decimal}.reveal ul.task-list{list-style:none}.reveal ul.task-list li input[type=checkbox]{width:2em;height:2em;margin:0 1em .5em -1.6em;vertical-align:middle}div.cell-output-display div.pagedtable-wrapper table.table{font-size:.6em}.reveal .code-annotation-container-hidden{display:none}.reveal code.sourceCode button.code-annotation-anchor,.reveal code.sourceCode .code-annotation-anchor{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;color:var(--quarto-hl-co-color);border:solid var(--quarto-hl-co-color) 1px;border-radius:50%;font-size:.7em;line-height:1.2em;margin-top:2px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none}.reveal code.sourceCode button.code-annotation-anchor{cursor:pointer}.reveal code.sourceCode a.code-annotation-anchor{text-align:center;vertical-align:middle;text-decoration:none;cursor:default;height:1.2em;width:1.2em}.reveal code.sourceCode.fragment a.code-annotation-anchor{left:auto}.reveal #code-annotation-line-highlight-gutter{width:100%;border-top:solid var(--quarto-hl-co-color) 1px;border-bottom:solid var(--quarto-hl-co-color) 1px;z-index:2}.reveal #code-annotation-line-highlight{margin-left:-8em;width:calc(100% + 4em);border-top:solid var(--quarto-hl-co-color) 1px;border-bottom:solid var(--quarto-hl-co-color) 1px;z-index:2;margin-bottom:-2px}.reveal code.sourceCode .code-annotation-anchor.code-annotation-active{background-color:var(--quarto-hl-normal-color, #aaaaaa);border:solid var(--quarto-hl-normal-color, #aaaaaa) 1px;color:#fdf6e3;font-weight:bolder}.reveal pre.code-annotation-code{padding-top:0;padding-bottom:0}.reveal pre.code-annotation-code code{z-index:3;padding-left:0px}.reveal dl.code-annotation-container-grid{margin-left:.1em}.reveal dl.code-annotation-container-grid dt{margin-top:.65rem;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;border:solid #657b83 1px;border-radius:50%;height:1.3em;width:1.3em;line-height:1.3em;font-size:.5em;text-align:center;vertical-align:middle;text-decoration:none}.reveal dl.code-annotation-container-grid dd{margin-left:.25em}.reveal .scrollable ol li:first-child:nth-last-child(n+10),.reveal .scrollable ol li:first-child:nth-last-child(n+10)~li{margin-left:1em}html.print-pdf .reveal .slides .pdf-page:last-child{page-break-after:avoid}.reveal .quarto-title-block .quarto-title-authors{display:flex;justify-content:center}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author{padding-left:.5em;padding-right:.5em}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:hover,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:visited,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:active{color:inherit;text-decoration:none}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-name{margin-bottom:.1rem}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-email{margin-top:0px;margin-bottom:.4em;font-size:.6em}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-orcid img{margin-bottom:4px}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-affiliation{font-size:.7em;margin-top:0px;margin-bottom:8px}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-affiliation:first{margin-top:12px}html *{color-profile:sRGB;rendering-intent:auto}/*# sourceMappingURL=f95d2bded9c28492b788fe14c3e9f347.css.map */ +*/.ansi-black-fg{color:#3e424d}.ansi-black-bg{background-color:#3e424d}.ansi-black-intense-black,.ansi-bright-black-fg{color:#282c36}.ansi-black-intense-black,.ansi-bright-black-bg{background-color:#282c36}.ansi-red-fg{color:#e75c58}.ansi-red-bg{background-color:#e75c58}.ansi-red-intense-red,.ansi-bright-red-fg{color:#b22b31}.ansi-red-intense-red,.ansi-bright-red-bg{background-color:#b22b31}.ansi-green-fg{color:#00a250}.ansi-green-bg{background-color:#00a250}.ansi-green-intense-green,.ansi-bright-green-fg{color:#007427}.ansi-green-intense-green,.ansi-bright-green-bg{background-color:#007427}.ansi-yellow-fg{color:#ddb62b}.ansi-yellow-bg{background-color:#ddb62b}.ansi-yellow-intense-yellow,.ansi-bright-yellow-fg{color:#b27d12}.ansi-yellow-intense-yellow,.ansi-bright-yellow-bg{background-color:#b27d12}.ansi-blue-fg{color:#208ffb}.ansi-blue-bg{background-color:#208ffb}.ansi-blue-intense-blue,.ansi-bright-blue-fg{color:#0065ca}.ansi-blue-intense-blue,.ansi-bright-blue-bg{background-color:#0065ca}.ansi-magenta-fg{color:#d160c4}.ansi-magenta-bg{background-color:#d160c4}.ansi-magenta-intense-magenta,.ansi-bright-magenta-fg{color:#a03196}.ansi-magenta-intense-magenta,.ansi-bright-magenta-bg{background-color:#a03196}.ansi-cyan-fg{color:#60c6c8}.ansi-cyan-bg{background-color:#60c6c8}.ansi-cyan-intense-cyan,.ansi-bright-cyan-fg{color:#258f8f}.ansi-cyan-intense-cyan,.ansi-bright-cyan-bg{background-color:#258f8f}.ansi-white-fg{color:#c5c1b4}.ansi-white-bg{background-color:#c5c1b4}.ansi-white-intense-white,.ansi-bright-white-fg{color:#a1a6b2}.ansi-white-intense-white,.ansi-bright-white-bg{background-color:#a1a6b2}.ansi-default-inverse-fg{color:#fff}.ansi-default-inverse-bg{background-color:#000}.ansi-bold{font-weight:bold}.ansi-underline{text-decoration:underline}:root{--quarto-body-bg: #fdf6e3;--quarto-body-color: #657b83;--quarto-text-muted: #b8c4c9;--quarto-border-color: #93a1a1;--quarto-border-width: 1px;--quarto-border-radius: 4px}table.gt_table{color:var(--quarto-body-color);font-size:1em;width:100%;background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_column_spanner_outer{color:var(--quarto-body-color);background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_col_heading{color:var(--quarto-body-color);font-weight:bold;background-color:rgba(0,0,0,0)}table.gt_table thead.gt_col_headings{border-bottom:1px solid currentColor;border-top-width:inherit;border-top-color:var(--quarto-border-color)}table.gt_table thead.gt_col_headings:not(:first-child){border-top-width:1px;border-top-color:var(--quarto-border-color)}table.gt_table td.gt_row{border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-width:0px}table.gt_table tbody.gt_table_body{border-top-width:1px;border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-color:currentColor}div.columns{display:initial;gap:initial}div.column{display:inline-block;overflow-x:initial;vertical-align:top;width:50%}.code-annotation-tip-content{word-wrap:break-word}.code-annotation-container-hidden{display:none !important}dl.code-annotation-container-grid{display:grid;grid-template-columns:min-content auto}dl.code-annotation-container-grid dt{grid-column:1}dl.code-annotation-container-grid dd{grid-column:2}pre.sourceCode.code-annotation-code{padding-right:0}code.sourceCode .code-annotation-anchor{z-index:100;position:relative;float:right;background-color:rgba(0,0,0,0)}input[type=checkbox]{margin-right:.5ch}:root{--mermaid-bg-color: #fdf6e3;--mermaid-edge-color: #999;--mermaid-node-fg-color: #657b83;--mermaid-fg-color: #657b83;--mermaid-fg-color--lighter: #7f949c;--mermaid-fg-color--lightest: #9cacb2;--mermaid-font-family: Lato, sans-serif;--mermaid-label-bg-color: #fdf6e3;--mermaid-label-fg-color: #468;--mermaid-node-bg-color: rgba(68, 102, 136, 0.1);--mermaid-node-fg-color: #657b83}@media print{:root{font-size:11pt}#quarto-sidebar,#TOC,.nav-page{display:none}.page-columns .content{grid-column-start:page-start}.fixed-top{position:relative}.panel-caption,.figure-caption,figcaption{color:#666}}.code-copy-button{position:absolute;top:0;right:0;border:0;margin-top:5px;margin-right:5px;background-color:rgba(0,0,0,0);z-index:3}.code-copy-button:focus{outline:none}.code-copy-button-tooltip{font-size:.75em}.code-copy-button>.bi::before{display:inline-block;height:1rem;width:1rem;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:1rem 1rem}.code-copy-button-checked>.bi::before{background-image:url('data:image/svg+xml,')}.code-copy-button:hover>.bi::before{background-image:url('data:image/svg+xml,')}.code-copy-button-checked:hover>.bi::before{background-image:url('data:image/svg+xml,')}.panel-tabset [role=tablist]{border-bottom:1px solid #93a1a1;list-style:none;margin:0;padding:0;width:100%}.panel-tabset [role=tablist] *{-webkit-box-sizing:border-box;box-sizing:border-box}@media(min-width: 30em){.panel-tabset [role=tablist] li{display:inline-block}}.panel-tabset [role=tab]{border:1px solid rgba(0,0,0,0);border-top-color:#93a1a1;display:block;padding:.5em 1em;text-decoration:none}@media(min-width: 30em){.panel-tabset [role=tab]{border-top-color:rgba(0,0,0,0);display:inline-block;margin-bottom:-1px}}.panel-tabset [role=tab][aria-selected=true]{background-color:#93a1a1}@media(min-width: 30em){.panel-tabset [role=tab][aria-selected=true]{background-color:rgba(0,0,0,0);border:1px solid #93a1a1;border-bottom-color:#fdf6e3}}@media(min-width: 30em){.panel-tabset [role=tab]:hover:not([aria-selected=true]){border:1px solid #93a1a1}}.code-with-filename .code-with-filename-file{margin-bottom:0;padding-bottom:2px;padding-top:2px;padding-left:.7em;border:var(--quarto-border-width) solid var(--quarto-border-color);border-radius:var(--quarto-border-radius);border-bottom:0;border-bottom-left-radius:0%;border-bottom-right-radius:0%}.code-with-filename div.sourceCode,.reveal .code-with-filename div.sourceCode{margin-top:0;border-top-left-radius:0%;border-top-right-radius:0%}.code-with-filename .code-with-filename-file pre{margin-bottom:0}.code-with-filename .code-with-filename-file{background-color:rgba(219,219,219,.8)}.quarto-dark .code-with-filename .code-with-filename-file{background-color:#555}.code-with-filename .code-with-filename-file strong{font-weight:400}.reveal.center .slide aside,.reveal.center .slide div.aside{position:initial}section.has-light-background,section.has-light-background h1,section.has-light-background h2,section.has-light-background h3,section.has-light-background h4,section.has-light-background h5,section.has-light-background h6{color:#222}section.has-light-background a,section.has-light-background a:hover{color:#2a76dd}section.has-light-background code{color:#4758ab}section.has-dark-background,section.has-dark-background h1,section.has-dark-background h2,section.has-dark-background h3,section.has-dark-background h4,section.has-dark-background h5,section.has-dark-background h6{color:#fff}section.has-dark-background a,section.has-dark-background a:hover{color:#42affa}section.has-dark-background code{color:#ffa07a}#title-slide,div.reveal div.slides section.quarto-title-block{text-align:center}#title-slide .subtitle,div.reveal div.slides section.quarto-title-block .subtitle{margin-bottom:2.5rem}.reveal .slides{text-align:left}.reveal .title-slide h1{font-size:1.6em}.reveal[data-navigation-mode=linear] .title-slide h1{font-size:2.5em}.reveal div.sourceCode{border:1px solid #93a1a1;border-radius:4px}.reveal pre{width:100%;box-shadow:none;background-color:#fdf6e3;border:none;margin:0;font-size:.55em}.reveal code{color:var(--quarto-hl-fu-color);background-color:rgba(0,0,0,0);white-space:pre-wrap}.reveal pre.sourceCode code{background-color:#fdf6e3;padding:6px 9px;max-height:500px;white-space:pre}.reveal pre code{background-color:#fdf6e3;color:#657b83}.reveal .column-output-location{display:flex;align-items:stretch}.reveal .column-output-location .column:first-of-type div.sourceCode{height:100%;background-color:#fdf6e3}.reveal blockquote{display:block;position:relative;color:#b8c4c9;width:unset;margin:var(--r-block-margin) auto;padding:.625rem 1.75rem;border-left:.25rem solid #b8c4c9;font-style:normal;background:none;box-shadow:none}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:block}.reveal .slide aside,.reveal .slide div.aside{position:absolute;bottom:20px;font-size:0.7em;color:#b8c4c9}.reveal .slide sup{font-size:0.7em}.reveal .slide.scrollable aside,.reveal .slide.scrollable div.aside{position:relative;margin-top:1em}.reveal .slide aside .aside-footnotes{margin-bottom:0}.reveal .slide aside .aside-footnotes li:first-of-type{margin-top:0}.reveal .layout-sidebar{display:flex;width:100%;margin-top:.8em}.reveal .layout-sidebar .panel-sidebar{width:270px}.reveal .layout-sidebar-left .panel-sidebar{margin-right:calc(0.5em*2)}.reveal .layout-sidebar-right .panel-sidebar{margin-left:calc(0.5em*2)}.reveal .layout-sidebar .panel-fill,.reveal .layout-sidebar .panel-center,.reveal .layout-sidebar .panel-tabset{flex:1}.reveal .panel-input,.reveal .panel-sidebar{font-size:.5em;padding:.5em;border-style:solid;border-color:#93a1a1;border-width:1px;border-radius:4px;background-color:#f8f9fa}.reveal .panel-sidebar :first-child,.reveal .panel-fill :first-child{margin-top:0}.reveal .panel-sidebar :last-child,.reveal .panel-fill :last-child{margin-bottom:0}.panel-input>div,.panel-input>div>div{vertical-align:middle;padding-right:1em}.reveal p,.reveal .slides section,.reveal .slides section>section{line-height:1.3}.reveal.smaller .slides section,.reveal .slides section.smaller,.reveal .slides section .callout{font-size:0.7em}.reveal.smaller .slides section section{font-size:inherit}.reveal.smaller .slides h1,.reveal .slides section.smaller h1{font-size:calc(2.5em/0.7)}.reveal.smaller .slides h2,.reveal .slides section.smaller h2{font-size:calc(1.6em/0.7)}.reveal.smaller .slides h3,.reveal .slides section.smaller h3{font-size:calc(1.3em/0.7)}.reveal .columns>.column>:not(ul,ol){margin-left:.25em;margin-right:.25em}.reveal .columns>.column:first-child>:not(ul,ol){margin-right:.5em;margin-left:0}.reveal .columns>.column:last-child>:not(ul,ol){margin-right:0;margin-left:.5em}.reveal .slide-number{color:#4ca2df;background-color:#fdf6e3}.reveal .footer{color:#b8c4c9}.reveal .footer a{color:#268bd2}.reveal .footer.has-dark-background{color:#fff}.reveal .footer.has-dark-background a{color:#7bc6fa}.reveal .footer.has-light-background{color:#505050}.reveal .footer.has-light-background a{color:#6a9bdd}.reveal .slide-number{color:#b8c4c9}.reveal .slide-number.has-dark-background{color:#fff}.reveal .slide-number.has-light-background{color:#505050}.reveal .slide figure>figcaption,.reveal .slide img.stretch+p.caption,.reveal .slide img.r-stretch+p.caption{font-size:0.7em}@media screen and (min-width: 500px){.reveal .controls[data-controls-layout=edges] .navigate-left{left:.2em}.reveal .controls[data-controls-layout=edges] .navigate-right{right:.2em}.reveal .controls[data-controls-layout=edges] .navigate-up{top:.4em}.reveal .controls[data-controls-layout=edges] .navigate-down{bottom:2.3em}}.tippy-box[data-theme~=light-border]{background-color:#fdf6e3;color:#657b83;border-radius:4px;border:solid 1px #b8c4c9;font-size:.6em}.tippy-box[data-theme~=light-border] .tippy-arrow{color:#b8c4c9}.tippy-box[data-placement^=bottom]>.tippy-content{padding:7px 10px;z-index:1}.reveal .callout.callout-style-simple .callout-body,.reveal .callout.callout-style-default .callout-body,.reveal .callout.callout-style-simple div.callout-title,.reveal .callout.callout-style-default div.callout-title{font-size:inherit}.reveal .callout.callout-style-default .callout-icon::before,.reveal .callout.callout-style-simple .callout-icon::before{height:2rem;width:2rem;background-size:2rem 2rem}.reveal .callout.callout-titled .callout-title p{margin-top:.5em}.reveal .callout.callout-titled .callout-icon::before{margin-top:1rem}.reveal .callout.callout-titled .callout-body>.callout-content>:last-child{margin-bottom:1rem}.reveal .panel-tabset [role=tab]{padding:.25em .7em}.reveal .slide-menu-button .fa-bars::before{background-image:url('data:image/svg+xml,')}.reveal .slide-chalkboard-buttons .fa-easel2::before{background-image:url('data:image/svg+xml,')}.reveal .slide-chalkboard-buttons .fa-brush::before{background-image:url('data:image/svg+xml,')}/*! light */.reveal ol[type=a]{list-style-type:lower-alpha}.reveal ol[type=a s]{list-style-type:lower-alpha}.reveal ol[type=A s]{list-style-type:upper-alpha}.reveal ol[type=i]{list-style-type:lower-roman}.reveal ol[type=i s]{list-style-type:lower-roman}.reveal ol[type=I s]{list-style-type:upper-roman}.reveal ol[type="1"]{list-style-type:decimal}.reveal ul.task-list{list-style:none}.reveal ul.task-list li input[type=checkbox]{width:2em;height:2em;margin:0 1em .5em -1.6em;vertical-align:middle}div.cell-output-display div.pagedtable-wrapper table.table{font-size:.6em}.reveal .code-annotation-container-hidden{display:none}.reveal code.sourceCode button.code-annotation-anchor,.reveal code.sourceCode .code-annotation-anchor{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;color:var(--quarto-hl-co-color);border:solid var(--quarto-hl-co-color) 1px;border-radius:50%;font-size:.7em;line-height:1.2em;margin-top:2px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none}.reveal code.sourceCode button.code-annotation-anchor{cursor:pointer}.reveal code.sourceCode a.code-annotation-anchor{text-align:center;vertical-align:middle;text-decoration:none;cursor:default;height:1.2em;width:1.2em}.reveal code.sourceCode.fragment a.code-annotation-anchor{left:auto}.reveal #code-annotation-line-highlight-gutter{width:100%;border-top:solid var(--quarto-hl-co-color) 1px;border-bottom:solid var(--quarto-hl-co-color) 1px;z-index:2}.reveal #code-annotation-line-highlight{margin-left:-8em;width:calc(100% + 4em);border-top:solid var(--quarto-hl-co-color) 1px;border-bottom:solid var(--quarto-hl-co-color) 1px;z-index:2;margin-bottom:-2px}.reveal code.sourceCode .code-annotation-anchor.code-annotation-active{background-color:var(--quarto-hl-normal-color, #aaaaaa);border:solid var(--quarto-hl-normal-color, #aaaaaa) 1px;color:#fdf6e3;font-weight:bolder}.reveal pre.code-annotation-code{padding-top:0;padding-bottom:0}.reveal pre.code-annotation-code code{z-index:3;padding-left:0px}.reveal dl.code-annotation-container-grid{margin-left:.1em}.reveal dl.code-annotation-container-grid dt{margin-top:.65rem;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;border:solid #657b83 1px;border-radius:50%;height:1.3em;width:1.3em;line-height:1.3em;font-size:.5em;text-align:center;vertical-align:middle;text-decoration:none}.reveal dl.code-annotation-container-grid dd{margin-left:.25em}.reveal .scrollable ol li:first-child:nth-last-child(n+10),.reveal .scrollable ol li:first-child:nth-last-child(n+10)~li{margin-left:1em}html.print-pdf .reveal .slides .pdf-page:last-child{page-break-after:avoid}.reveal .quarto-title-block .quarto-title-authors{display:flex;justify-content:center}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author{padding-left:.5em;padding-right:.5em}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:hover,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:visited,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:active{color:inherit;text-decoration:none}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-name{margin-bottom:.1rem}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-email{margin-top:0px;margin-bottom:.4em;font-size:.6em}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-orcid img{margin-bottom:4px}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-affiliation{font-size:.7em;margin-top:0px;margin-bottom:8px}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-affiliation:first{margin-top:12px}html *{color-profile:sRGB;rendering-intent:auto}/*# sourceMappingURL=f95d2bded9c28492b788fe14c3e9f347.css.map */ diff --git a/slides.html b/slides.html index 5722d1f..454b554 100644 --- a/slides.html +++ b/slides.html @@ -11,9 +11,10 @@ - + + Introduction to Infectious Disease Modelling @@ -32,71 +33,6 @@ margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ vertical-align: middle; } - /* CSS for syntax highlighting */ - pre > code.sourceCode { white-space: pre; position: relative; } - pre > code.sourceCode > span { line-height: 1.25; } - pre > code.sourceCode > span:empty { height: 1.2em; } - .sourceCode { overflow: visible; } - code.sourceCode > span { color: inherit; text-decoration: inherit; } - div.sourceCode { margin: 1em 0; } - pre.sourceCode { margin: 0; } - @media screen { - div.sourceCode { overflow: auto; } - } - @media print { - pre > code.sourceCode { white-space: pre-wrap; } - pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } - } - pre.numberSource code - { counter-reset: source-line 0; } - pre.numberSource code > span - { position: relative; left: -4em; counter-increment: source-line; } - pre.numberSource code > span > a:first-child::before - { content: counter(source-line); - position: relative; left: -1em; text-align: right; vertical-align: baseline; - border: none; display: inline-block; - -webkit-touch-callout: none; -webkit-user-select: none; - -khtml-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; - padding: 0 4px; width: 4em; - color: #aaaaaa; - } - pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } - div.sourceCode - { color: #003b4f; background-color: #f1f3f5; } - @media screen { - pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } - } - code span { color: #003b4f; } /* Normal */ - code span.al { color: #ad0000; } /* Alert */ - code span.an { color: #5e5e5e; } /* Annotation */ - code span.at { color: #657422; } /* Attribute */ - code span.bn { color: #ad0000; } /* BaseN */ - code span.bu { } /* BuiltIn */ - code span.cf { color: #003b4f; } /* ControlFlow */ - code span.ch { color: #20794d; } /* Char */ - code span.cn { color: #8f5902; } /* Constant */ - code span.co { color: #5e5e5e; } /* Comment */ - code span.cv { color: #5e5e5e; font-style: italic; } /* CommentVar */ - code span.do { color: #5e5e5e; font-style: italic; } /* Documentation */ - code span.dt { color: #ad0000; } /* DataType */ - code span.dv { color: #ad0000; } /* DecVal */ - code span.er { color: #ad0000; } /* Error */ - code span.ex { } /* Extension */ - code span.fl { color: #ad0000; } /* Float */ - code span.fu { color: #4758ab; } /* Function */ - code span.im { color: #00769e; } /* Import */ - code span.in { color: #5e5e5e; } /* Information */ - code span.kw { color: #003b4f; } /* Keyword */ - code span.op { color: #5e5e5e; } /* Operator */ - code span.ot { color: #003b4f; } /* Other */ - code span.pp { color: #ad0000; } /* Preprocessor */ - code span.sc { color: #5e5e5e; } /* SpecialChar */ - code span.ss { color: #20794d; } /* SpecialString */ - code span.st { color: #20794d; } /* String */ - code span.va { color: #111111; } /* Variable */ - code span.vs { color: #20794d; } /* VerbatimString */ - code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */ /* CSS for citations */ div.csl-bib-body { } div.csl-entry { @@ -422,40 +358,72 @@

Introduction to Infectious Disease Modelling

-James Mba Azam, PhD +James Mba Azam, PhD
+ +

+ Epiverse-TRACE Initiative, London School of Hygiene and Tropical Medicine, UK +

+
+

2024-10-12

+
+

An overview of infectious diseases

-
-

What are infectious diseasess

+
+

What are infectious diseases

+
+
+

+
+
+
+
+
-
+
-

Generic definition of a disease (source: Merriam Webster)

-
Generic definition of a disease (source: Merriam Webster)
+

A 3D graphical representation of Rotavirus virions.

+
A 3D graphical representation of Rotavirus virions.
-
-

Depending on what we care about, we can classify diseases according to:

+
+

Diseases can be classified according to:

    -
  • Cause (e.g., infectious, non-infectious)
  • -
  • Duration (e.g., acute, chronic)
  • -
  • Mode of transmission (direct or indirect)
  • -
  • Impact on the host (e.g., fatal, non-fatal)
  • +
  • Cause (e.g., infectious, non-infectious)
  • +
  • Duration (e.g., acute, chronic)
  • +
  • Mode of transmission (direct or indirect)
  • +
  • Impact on the host (e.g., fatal, non-fatal)
-

Note that these classifications are not mutually exclusive. Hence, a disease can be classified under more than one category at a time.

-
+
+ +

Note that these classifications are not mutually exclusive. Hence, a disease can be classified under more than one category at a time.

+
+

How are infectious diseases controlled?

  • In general, infectious disease control aims to reduce disease transmission.
  • @@ -482,24 +450,39 @@

    Pharmaceutical interventions (PIs)

    -

    Vaccination

    +

    Vaccination

    +
    +
    +

    +
      -
    • Most effective way to prevent infectious diseases.
    • Activates the host’s immune system to produce antibodies against the pathogen.
    • -
    • Generally applied prophylactically to susceptible individuals (before infection); this reduces the risk of infection and disease.
    • -
    • Challenges: +
    • Generally applied to reduce the risk of infection and disease.
    • +
    • The most effective way to prevent infectious diseases.
    • +
    +
    +
    +
    +
    + +
    Challenges with vaccination
    • Take time to develop for new pathogens
    • Never 100% effective and limited duration of protection
    • Adverse side effects
    • Some individuals cannot be vaccinated or refuce vaccination
    • Some pathogens mutate rapidly (e.g., influenza virus)
    • -
    +
  • Logistical challenges (e.g., cold chain requirements)
-

Non-pharmaceutical interventions (NPIs)

+

Non-pharmaceutical interventions (NPIs)

+
+
+

+

+
  • Non-pharmaceutical interventions are measures that do not involve medical interventions.

  • Examples:

    @@ -509,10 +492,12 @@

    Non-pharmaceutical interventions
  • Mask-wearing.
+
+
-

Quarantine

+

Quarantine

  • Isolation of individuals who may have been exposed to a contagious disease.
  • Advantage is that it’s simple and its effectiveness does not depend on the disease.
  • @@ -524,20 +509,30 @@

    Quarantine

  • Can lead to social stigma
-

What type of intervention is contact tracing?

-

Contact tracing

+

Contact tracing

    -
  • Contact tracing is not necessarily an NPI but is often used to identify likely infected individuals.
  • +
  • Contact tracing is used to identify exposed individuals, i.e., individuals who might been in contact with an infected/infectious individual.
  • It involves identifying, assessing, and managing people who have been exposed to a contagious disease to prevent further transmission.
  • It is a critical component of infectious disease surveillance and is often used in combination with other control measures.
-

How do we quantify the impact of a control measure?

+
+
+
+

Discussion

+
+
+
    +
  • How can we quantify the impact of a control measure?
  • +
+
+
+
@@ -547,9 +542,9 @@

Infectious disease models

What are infectious disease models?

    -
  • Models generally refer to conceptual representations of an object or system.
  • -
  • Mathematical models use mathematics to represent the description of the system.
  • -
  • Infectious disease models use mathematics/statistics to represent dynamics/spread of infectious diseases.
  • +
  • Models generally refer to conceptual representations of an object or system.
  • +
  • Mathematical models use mathematics to describe the system. For example, the famous \(E = mc^2\) is a mathematical model that describes the relationship between mass and energy.
  • +
  • Infectious disease models use mathematics/statistics to represent dynamics/spread of infectious diseases.
@@ -557,59 +552,94 @@

What are infectious disease models?

  • Mathematical models can be used to link the biological process of disease transmission and the emergent dynamics of infection at the population level.
  • Models require making some assumptions and abstractions.
  • -
  • By definition, “all models are wrong, but some are useful” (Box 1979). +
+
+
+ +
+
+
    +
  • By definition, “all models are wrong, but some are useful” (Box 1979).
      -
    • Good enough models are those that capture the essential features of the system being studied.
    • +
    • Good enough models are those that capture the essential features of the system being studied.
  • -
  • “Wrong” here means that models are simplifications of reality and do not capture all the complexities of the system being studied. It does not mean that models are useless.
+
+
+
+

George Box

+
George Box
+
+
+
+
-

<Insert example of some models and their assumptions and what makes them “wrong”>

+
    +
  • What makes models “wrong” by definition?: +
      +
    • Simplifications of reality; not capturing all the complexities of the system being studied.
    • +
  • +
-
-

(Conflicting) Factors that influence model formulation/choice

+
+

Factors that influence model formulation/choice

    -
  • Accuracy: how well does the model to reproduce observed data and predict future outcomes?
  • -
  • Transparency: is it easy to understand and interpret the model and its outputs? (This is affected by the model’s complexity)
  • -
  • Flexibility: the ability of the model to be adapted to different scenarios.
  • +
  • Accuracy: how well does the model to reproduce observed data and predict future outcomes?
  • +
  • Transparency: is it easy to understand and interpret the model and its outputs? (This is affected by the model’s complexity)
  • +
  • Flexibility: the ability of the model to be adapted to different scenarios.
+

What are models used for?

  • Generally, models can be used to predict and understand/explain the dynamics of infectious diseases.
-

How are these two uses impacted by accuracy, transparency, and flexibility?

+
+
+
+

Discussion

+
+
+

How are these two uses impacted by accuracy, transparency, and flexibility?

+
+
+
-

Modelling to predict the future course

+

Prediction of the future course

    -
  • Must be accurate else they will provide an incorrect outlook of the future.
  • -
  • Example of the prediction of Ebola deaths during the outbreak in West Africa in 2014/2015.
  • +
  • Must be accurate.
  • “But the estimate proved to be off. Way, way off. Like, 65 times worse than what ended up happening.”
-
-
-

Controversy over estimates of Ebola deaths

-
Controversy over estimates of Ebola deaths
-
+

-
-
-
- -

< Insert examples of models that have made accurate predictions of the future course of an outbreak >

-

Modelling to understand or explain

+ + + +

Understanding or explaining disease dynamics

  • Models can be used to understand how a disease spreads and how its spread can be controlled.
  • The insights gained from models can be used to: @@ -620,11 +650,11 @@

    Modelling to understand or explainbuild predictive models.

-
-
- -

< Insert examples of models that explain the spread and dynamics of infectious diseases >

-

< Insert examples of models that evaluate the impact of interventions and determine the next course of action >

+ + + + +

Limitations of infectious disease models

@@ -634,103 +664,66 @@

Limitations of infectious disease models

  • Data is often not available or is of poor quality.
  • -
    - +
    +

    Summary

    • Models:
        -
      • Simplifications of reality and do not capture all the complexities of the system being studied.
      • -
      • Only as good as the data used to parameterize them.
      • -
      • Can be sensitive to the assumptions made during their formulation.
      • -
      • Can be computationally expensive and require a lot of data to run.
      • -
      • Can be difficult to interpret and communicate to non-experts.
      • -
    • -
    -
    -
    -

    What skills are needed to build and use infectious disease models?

    -
      -
    • Mathematical and statistical skills: -
        -
      • Differential equations.
      • -
      • Probability and statistics.
      • -
      • Stochastic processes.
      • -
      • Numerical analysis
      • -
      • Time series analyses
      • -
      • Survival analysis
      • +
      • Simplifications of reality and do not capture all the complexities of the system being studied.
      • +
      • Only as good as the data used to parameterize them.
      • +
      • Sensitive to the assumptions made during their formulation.
      • +
      • Computationally expensive and require a lot of data to run.
      • +
      • Difficult to interpret and communicate to non-experts.
    -
    -
    +
    +
    +
    +

    Introduction to compartmental models

    +
    +
    +

    What are compartmental models?

      -
    • Programming skills: +
    • Compartmental models:
        -
      • Proficiency in at least one programming language (e.g., R, Python, Julia, C++).
      • -
      • Experience with version control (e.g., Git).
      • -
      • Experience with data manipulation and visualization.
      • +
      • divide populations into compartments (or groups) based on the individual’s infection status and track them through time (Blackwood and Childs 2018).
      • +
      • are mechanistic, meaning they describe processes such the interaction between hosts, biological processes of pathogen, host immune response, and so forth.
    -
      -
    • Domain knowledge in infectious diseases: -
        -
      • Immunology.
      • -
      • Epidemiology.
      • -
      • Virology.
      • -
      • Genomics
      • -
    • -
    +

    Compartmental models are different from statistical models, which are used to describe the relationship between variables.

      -
    • Other subject areas:

    • -
    • Communication skills:

      +
    • Individuals in a compartment:
        -
      • Ability to communicate complex ideas to non-experts.
      • -
      • Ability to write clear and concise reports.
      • -
      • Ability to present results to a diverse audience.
      • +
      • are assumed to have the same features (disease state, age, location, etc)
      • +
      • can only be in one compartment at a time.
      • +
      • move between compartments based on defined transition rates.
    • -
    • Public health.

    • -
    • Health economics.

    • -
    • Policy analysis.

    • -
    -
    -
    -
    -

    Introduction to compartmental models

    - -
    -
    -

    What are compartmental models?

    -
      -
    • Compartmental models divide populations into compartments (or groups) based on individual’s infection status (Blackwood and Childs 2018).
    • -
    • Individuals move between compartments based on defined transition quantities.
    • -
    • Any particular individual can only be in one compartment at a time.
    -
    +
      -
    • They divide the population into compartments based on the disease status of individuals.
    • -
    • The most common compartments are: +
    • Common compartments:
      • Susceptible (S) - hosts are not infected but can be infected
      • Infected (I) - hosts are infected (and can infect others)
      • Removed (R) - hosts are no longer infected and cannot be re-infected
    • -
    • In compartmental models, individuals move between compartments based on defined transition quantities.
    -
    +
    -

    Infection timeline illustrating how a pathogen in a host interacts with the host’s immune system (source: Modelling Infectious Diseases of Humans and Animals)

    -
    Infection timeline illustrating how a pathogen in a host interacts with the host’s immune system (source: Modelling Infectious Diseases of Humans and Animals)
    +

    Infection timeline illustrating how a pathogen in a host interacts with the host’s immune system (Source: Modelling Infectious Diseases of Humans and Animals)

    +
    Infection timeline illustrating how a pathogen in a host interacts with the host’s immune system (Source: Modelling Infectious Diseases of Humans and Animals)
    @@ -742,214 +735,113 @@

    What are compartmental models?

  • Other compartments can be added to the model to account for important events or processes (e.g., exposed, recovered, vaccinated, etc.)

  • It is, however, important to keep the model simple, less computationally intensive, and interpretable.

  • -
    -
    -
    -

    Some simple compartmental models

    -
      -
    • We are going to consider infections that either confer immunity after recovery or not.
    • -
    • The simplest compartmental models for capturing this are the SIS and SIR models.
    • -
    -
    -

    The Susceptible-Infected-Recovered model (SIR)

    +
    +
      -
    • SIR models are used to model diseases that confer immunity after recovery.

    • -
    • The SIR model groups individuals into three disease states:

      +
    • Compartmental models either have discrete or continuous time scales:
        -
      • Susceptible (S): individuals who are not infected and can be infected.
      • -
      • Infected (I): individuals who are infected and can infect others.
      • -
      • Removed (R): individuals who have recovered from the infection and are immune.
      • +
      • Discrete time scales: time is divided into discrete intervals (e.g., days, weeks, months).
      • +
      • Continuous time scales: time is continuous and the model is described using differential equations.
    • -
    • This framework was popularised by Kermack and McKendrick in 1927 (Kermack and McKendrick 1927)

      +
    +
    +
    + +
      +
    • Compartmental models can be deterministic or stochastic:
        -
      • A must-read paper for anyone interested in infectious disease modelling.
      • +
      • Deterministic models always return the same output for the same input.
      • +
      • Stochastic models account for randomness in the system and model output always varies. Hence, they are often run multiple times to get an average output.
    -
    -
    -

    Diagram of an SIR/SIRS model

    -
    Diagram of an SIR/SIRS model
    -
    -
    -
    -
    -

    Model equations

      -
    • The SIR model is described by the following set of differential equations:
    • -
    -\[\begin{aligned} -\frac{dS}{dt} & = \color{orange}{-\beta \frac{S I}{N}} \\ -\frac{dI}{dt} & = \color{orange}{\beta \frac{S I}{N}} - \color{cornflowerblue}{\gamma I} \\ -\frac{dR}{dt} & = \color{cornflowerblue}{\gamma I} -\end{aligned}\] -

    With initial conditions \(S(0) = S_0\), \(I(0) = I_0\), and \(R(0) = R_0\).

    -

    where:

    +
  • The choice of model type depends on:
      -
    • \(N\) is the total population size.
    • -
    • \(\beta\) is the transmission rate.
    • -
    • \(\gamma\) is the recovery rate.
    • +
    • the research question,
    • +
    • data availability,
    • +
    • computational resources,
    • +
    • modeller skillset.
    • +
  • +
  • In this introduction, we will focus on deterministic compartmental models with continuous time scales.
    • -
    • The model cannot be solved analytically, so numerical methods are used to solve the equations.

    • -
    • However, we can gain insights into the dynamics of the model by qualitatively analysing the equations.

    • +
    • Now, back to the models, we are going to consider infections that either confer immunity after recovery or not.
    • +
    • The simplest compartmental models for capturing this is the SIR model.
    -
    -

    Solving the SIR model in R

    -
      -
    • To solve the model in R, we will always need to define at least three things: -
        -
      • The model equations.
      • -
      • The parameter values.
      • -
      • The initial conditions.
      • -
    • -
    • We will need the deSolve package to solve the model.
    • -
    -
    -
    - -
      -
    • Let’s start by defining the model equations.
    • -
    -
    -
    # Define the SIR model
    -sir_model <- function(t, state, parameters) {
    -  with(as.list(c(state, parameters)), {
    -    dS <- -beta * S * I
    -    dI <- beta * S * I - gamma * I
    -    dR <- gamma * I
    -    return(list(c(dS, dI, dR)))
    -  })
    -}
    -
    -
    -
    - -

    Next, we will define the parameter values and initial conditions.

    -
    -
    # define parameters we know
    -N  <- 1000  
    -R0 <- 2
    -infectious_period <- 7
    -
    -# Remember gamma <- 1/ infectious_period as discussed earlier
    -gamma <- 1/infectious_period 
    -
    -# We will use R0 = beta N / gamma  instead because it is easier to interpret.
    -# beta is not directly interpretable.
    -
    -params <- c(beta = R0 * gamma / N, gamma = gamma)
    -
    -# Initial conditions for S, I, R
    -# Why is S = N - 1?
    -inits <- c(S = N - 1, I = 1, R = 0)
    -
    -# Time steps to return results
    -dt <- 1:150
    -
    -
    -
    - -

    Finally, we will solve the model using the ode function from the deSolve package.

    -
    -
    # Solve the model
    -results <- deSolve::ode(
    -  y = inits,
    -  times = dt,
    -  func = sir_model,
    -  parms = params
    -)
    -
    -# Make it a data.frame
    -results <- as.data.frame(results)
    -
    -
    -
    - -

    Now, let’s plot the results.

    -
    -
    # Load the necessary libraries
    -library(dplyr)
    -library(tidyr)
    -library(ggplot2)
    -# Create data for ggplot2 by reshaping
    -results_long <- results |> 
    -  pivot_longer(cols = c(2:4), names_to = "compartment", values_to = "value")
    -  
    -plot <- ggplot(data = results_long,
    -  aes(x = time, y = value, color = compartment)
    -  ) +
    -geom_line(linewidth = 1) +
    -labs(
    -  title = "SIR model",
    -  x = "Time",
    -  y = "Number of individuals"
    -) 
    -print(plot)
    -
    - -
    -
    -
    -
    +
    +

    The Susceptible-Infected-Recovered (SIR) model

    +
    -

    +

    -
    -
    -

    Model assumptions

    +

    This model groups individuals into three disease states:

      -
    • There are no inflows or outflows from the population, i.e., no births, deaths, or migration. This is often described as a closed population.

    • -
    • That is, the epidemic occurs much faster than the time scale of births, deaths, or migration.

    • -
    • Mixing is homogeneous, i.e., individuals mix randomly and have an equal probability of coming into contact with any other individual in the population.

    • -
    • Transition rates are constant and do not change over time.

    • -
    • When this assumption is “relaxed”/included, we get more complex models.

    • +
    • Susceptible (S): not infected but can be.

    • +
    • Infected (I): infected & infectious.

    • +
    • Recovered/removed (R): recovered & immune.

    -
    -

    Transitions between compartments

    +
    + +

    How do individuals move between compartments?

    +

    Process 1: Transmission

    +

    +

    What drives transmission?

    +
    +
    +
      -
    • There are two processes that govern the transitions between compartments: +
    • Transmission is driven by several factors, including:
        -
      • Transmission, governed by the transmission rate, \(\beta\) (rate at which susceptible individuals become infected).
      • -
      • Recovery, governed by the recovery rate, \(\gamma\) (rate at which infected individuals recover and become immune).
      • +
      • Disease prevalence, \(I\), i.e., number of infected individuals at the time.
      • +
      • The number of contacts, \(C\), susceptible individuals have with infected individual.
      • +
      • The probability, \(p\), a susceptible individual will become infected when they contact an infected individual.
    -

    Transmission

    -

    What factors drive transmission?

    +

    +

    The transmission term is often defined through the force of infection (FOI), \(\lambda\).

    +

    A tour of the force of infection (FOI)

      -
    • Transmission is driven by several factors: +
    • FOI, \(\lambda\), is the per capita rate at which susceptible individuals become infected.
    • +
    +
    +
    +
    +

    Note

    +
    +
    +

    “Per capita” means the rate of an event occurring per individual in the population per unit of time.

    +
    +
    +
      -
    • The prevalence, \(I\), i.e., number of infected individuals at the time.
    • -
    • The number of contacts, \(C\), susceptible individuals have with infected individual.
    • -
    • The probability, \(p\), a susceptible individual will become infected when they contact an infected individual.
    • -
    +
  • Given the rate per individual per time, FOI, the rate at which new infecteds are generated is given by \(\lambda \times S\), where \(S\) is the number of susceptible individuals.
    • -
    • The transmission term is often defined through the force of infection (FOI), \(\lambda\):

      +
    • The force of infection is made up of the probabilities/rates that:
        -
      • The force of infection is the per capita rate at which susceptible individuals become infected.
      • +
      • contacts happen, \(c\),
      • +
      • a given contact is with an infected individual, \(p\), and
      • +
      • a contact results in successful transmission, \(v\).
    • -
    • The rate at which new infecteds are generated is given by \(\lambda S\), where \(S\) is the number of susceptible individuals.

    • -
    • The force of infection is proportional to the number of infected individuals and the transmission rate, \(\beta\).

    • -
    • \(\beta\) is the product of the contact rate and the probability of transmission per contact.

    @@ -957,38 +849,32 @@

    Transmission

    • The FOI can be formulated in two ways, depending on how the contact rate is expected to change with the population size:
        -
      • Frequency-dependent/mass action transmission: The rate of contact between individuals is proportional to the population size. Here, \(\lambda = \beta \times \dfrac{I}{N}\).
      • -
      • Density dependent transmission: The rate of contact between individuals is independent of the population size. Here, \(\lambda = \beta \times I\).
      • +
      • Frequency-dependent/mass action transmission
      • +
      • Density-dependent transmission
    -
      -
    • Frequency-dependent transmission assumes that that the number of contacts an individual has is independent of the population size: -
        -
      • Often used to model vector-borned diseases and diseases with heterogeneity in contact rates.
      • -
    • -
    +

    Frequency-dependent/mass action transmission

    +

    The rate of contact between individuals is constant irrespective of the population density, \(\dfrac{N}{A}\), where \(N\) is the population size and \(A\) is the area occupied by the population.

      -
    • Density-dependent transmission assumes that the number of contacts an individual has is proportional to the population size: -
        -
      • Often used to model diseases that allow the safe assumption of random/homogenous mixing.
      • -
    • +
    • Recall that transmission also depends on the probability of contact with an infected host, \(p\), which is assumed to be \(\dfrac{I}{N}\).

    • +
    • Hence, the frequency-dependent mass action is given by \(\lambda = \beta \times \dfrac{I}{N}\), where \(\beta\) is the transmission rate.

    -
    +
    +
    + +
    -
    - -
    -

    Note

    +

    Question

    -

    The differences become important when dealing with population sizes that change significantly over time.

    +

    Why does the frequency-dependent transmission contain \(\dfrac{1}{N}\) if it does not depend on the population density?

    @@ -996,108 +882,1148 @@

    Transmission

      -
    • The recovery rate \(\gamma\) is the reciprocal of the average duration of the infection. That is, infected individuals spend \(1/\gamma\) days in the infected compartment before recovering.

    • -
    • The average infectious period is often estimated from epidemiological data.

    • +
    • Assume that the rate of new infections is given by \(\dfrac{dI}{dt} = S \times c \times p \times v\) where \(S\) is the number of susceptible hosts, \(c\) is the contact rate, and \(p\) is the probability of contact with an infected host, and \(v\) is the probability of transmission per contact.
    -
    -
    -
    -

    The Susceptible-Infected-Susceptible model (SIS)

    +
    +
    +
      -
    • The SIS model has two compartments: Susceptible (S) and Infected (I).
    • +
    • \(p\) is usually assumed to be the disease prevalence, \(\dfrac{I}{N}\).

    • +
    • Hence, the rate of new infections, \(\dfrac{dI}{dt} = S \times c \times \dfrac{I}{N} \times v\).

    -

    - - - - - +
    +
    +
      -
    • We assume that individuals are susceptible to infection, become infected, and then either recover become susceptible again or become immune.
    • +
    • In frequency dependent transmission, the contact rate \(c\) is also assumed to be constant, say \(c = \eta\) irrespective of population density, \(\dfrac{N}{A}\), where \(N\) is the population size and \(A\) is the area occupied by the population.
    • +
    • Hence, \(\dfrac{dI}{dt} = S \times \eta \times v \times \dfrac{I}{N}\)
    • +
    • Therefore, \(\dfrac{dI}{dt} = \beta S \times \dfrac{I}{N}\), where \(\beta = \eta \times v\), and \(\lambda = \beta \times \dfrac{I}{N}\).
    -

    What kinds of diseases can be modelled using the SIS and SIR models?

    -
    -
    -

    The Basic Reproduction Number

    - +
      +
    • Frequency-dependent/mass action transmission is often used to model sexually-transmitted diseases and diseases with heterogeneity in contact rates.
    • +
    • Sexual transmission in this case does not depend on how many infected individuals are in the population.
    • +
    +
    -
    -

    Analyzing Model Outputs and Dynamics

    +

    Density dependent transmission

    +
      +
    • The rate of contact between individuals depends on the population density, \(\dfrac{N}{A}\).

    • +
    • Transmission also depends on \(p\) - the probability that a given contact is with an infected individual, often taken to be \(\dfrac{I}{N}\).

    • +
    +
    +
    +
      +
    • The density-dependent transmission is therefore given as \(\lambda = \beta \times \dfrac{I}{A}\).

    • +
    • Here, because transmission increases with the density of infected individuals, it is called density-dependent transmission.

    • +
    +
    +
    +
    +

    Note

    +
    +
    +
      +
    • Notice that \(\lambda = \beta \times \dfrac{I}{N} \times \dfrac{N}{A}\) and the \(N's\) cancel out.

    • +
    • \(A\) is often ignored.

    • +
    +
    +
    +
    +
    -
    -

    Wrap-Up and Q&A

    +
      +
    • Density dependent transmission can be used to model airborne and directly transmitted diseases, for example, measles.
    • +
    +
    +
    +
    +
    +
    +

    Density-dependent vs frequency dependent transmission

    +
    +
    +

    This is one of the most confused and debated concepts in disease modelling. Several studies have attempted to clarify it, including the brilliant work by Begon et al. (2002). Most of the clarifications provided here are based on this paper.

    +
    +
    +
    +
      +
    • We will only use the density-dependent formulation in this course.
    • +
    +
    -
    -
    -

    List of Resources

    +

    +
    +
    +

    Process 2: Recovery

    +
    +
    +

    +
    +
    +

    Recovery, governed by the recovery rate, \(\gamma\) (rate at which infected individuals recover and become immune).

    -
    -

    Textbooks

    +
    + +
    Some notes on the recovery process
    -
    -
    -

    Papers and Articles

    -

    Modelling infectious disease transmission

    - -

    Deriving and Interpreting R0

    - -

    References

    -
    -
    -Blackwood, Julie C., and Lauren M. Childs. 2018. “An Introduction to Compartmental Modeling for the Budding Infectious Disease Modeler.” Letters in Biomathematics 5 (1): 195–221. https://doi.org/10.1080/23737867.2018.1509026. +
    +
    +
    +

    Note

    -
    -Box, GE. 1979. “All Models Are Wrong, but Some Are Useful.” Robustness in Statistics 202 (1979): 549. +
    +

    You will learn about parameter estimation in the model fitting and calibration lectures.

    -
    -Kermack, William Ogilvy, and Anderson G McKendrick. 1927. “A Contribution to the Mathematical Theory of Epidemics.” Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character 115 (772): 700–721.
    -
    -
    +
    +
    +
    +

    Source: Anderson and May (1982)

    +
    Source: Anderson and May (1982)
    +
    +
    +
    + +

    Putting it all together

    +
    +
    +

    An SIR model with transmission rate, \beta, and recovery rate, \gamma.

    +
    An SIR model with transmission rate, \(\beta\), and recovery rate, \(\gamma\).
    +
    - -
    - - +
    +
    - +

    Formulating the model equations

    +

    Continuous time compartmental models are formulated using differential equations that describe the change in the number of individuals in each compartment over time.

    +
    +
    + +

    The SIR model can be formulated as:

    +
    +
    +
    +
    +

    +
    +
    +
    +

    \[\begin{align*} +\frac{dS}{dt} & = \dot{S} = \color{orange}{-\beta S I} \\ +\frac{dI}{dt} & = \dot{I} = \color{orange}{\beta S I} - \color{blue}{\gamma I} \\ +\frac{dR}{dt} & = \dot{R} = \color{blue}{\gamma I} +\end{align*}\]

    +
    +
    +

    where \(\beta\) is the transmission rate, and \(\gamma\) is the recovery rate.

    + +
    +
    + +

    The initial conditions are given by:

    +

    \[\begin{equation*} +\begin{aligned} +S(0) & = N - 1,\\ +I(0) & = 1, \text{and} \\ +R(0) & = 0. +\end{aligned} +\end{equation*}\]

    +

    where \(N\) is the total population size.

    +
    +
    + +
    +
    +
    +

    Note

    +
    +
    +
      +
    • We represent the compartments as population sizes.: +
        +
      • Some modellers often use proportions instead of population sizes as a way to remove the dimensions from the equations.
      • +
    • +
    +
    +
    +
    +
    +
    + +

    Model assumptions

    +
      +
    • The population is closed: no births, deaths, or migration. +
        +
      • Implicitly: the epidemic occurs much faster than the time scale of births, deaths, or migration.
      • +
    • +
    • Individuals are infectious immediately after infection and remain infectious until they recover.
    • +
    +
    +
    + +
      +
    • Mixing is homogeneous, i.e., individuals mix randomly:

    • +
    • Individuals have an equal probability of coming into contact with any other individual in the population.

    • +
    • Transition rates are constant and do not change over time.

    • +
    • Individuals acquire “lifelong” immunity after recovery.

    • +
    + +
    +
    + +
    +
    +
    +

    Discussion

    +
    +
    +
      +
    • What diseases do you think the SIR model is appropriate for?
    • +
    +
    +
    +
    +
    +
    + +
      +
    • The SIR model is appropriate for diseases that confer immunity after recovery. For example, measles and chicken pox.
    • +
    • Popularised by Kermack and McKendrick in 1927 (Kermack and McKendrick 1927) +
        +
      • A must-read paper for budding infectious disease modellers.
      • +
    • +
    +
    +
    + +

    What questions can we answer with the SIR model?

    +
      +
    • The SIR model can be used to understand the dynamics of an epidemic: +
        +
      • How long will the epidemic last?
      • +
      • How many individuals will be infected (final epidemic size)?
      • +
      • When will the epidemic reach its peak?
      • +
    • +
    +
    +
    +

    Solving the SIR model

    +
      +
    • Compartmental models cannot be solved analytically.

    • +
    • We often perform two types of analyses to understand the long term dynamics of the model:

      +
        +
      • Qualitative: threshold phenomena and analysis of equilibria (disease-free and endemic).
        +
      • +
      • Numerical simulations.
      • +
    • +
    +
    +
    +
    +
    + +
    +

    Note

    +
    +
    +
      +
    • For this introductory course, we will use focus on simulation.
    • +
    +
    +
    +
    +
      +
    • But first, let’s do some qualitative analysis of the SIR.
    • +
    +
    +
    + +

    Threshold phenomena

    +
      +
    • Here, we study the conditions under which an epidemic will grow or die out using the model equations.
    • +
    +
    +
    + +
      +
    • Consider the case where \(I(0) = 1\) individual is introduced into a population of size \(N\) at time \(t = 0\).

    • +
    • That means in a completely susceptible population, we have \(S(0) = N - 1\) susceptible individuals.

    • +
    +
    +
    + +
      +
    • At time 0, the disease will not spread if the rate of change of infections is negative, that is \(\dfrac{dI}{dt} < 0\).

    • +
    • Recall from the SIR model that \(\dfrac{dI}{dt} = \beta S I - \gamma I\).

    • +
    • Let’s solve this equation at \(t = 0\) by setting \(I = 1\), assuming \(\dfrac{dI}{dt} < 0\).

    • +
    +
    +
    + +

    At \(t = 0\), we have

    +

    \[\begin{equation*} +\frac{dI}{dt} = \beta S I - \gamma I < 0 \end{equation*}\]

    +

    Factor out \(I\), and we get

    +

    \[\begin{equation*} +I (\beta S - \gamma) < 0 +\end{equation*}\]

    +
    +
    + +
      +
    • Since at \(t=0\)\(, I > 0\), we have \(S < \dfrac{\gamma}{\beta}\).

    • +
    • \(\dfrac{\gamma}{\beta}\) is the relative removal rate.

    • +
    +
    +
    + +
      +
    • Interpretation:

      +
        +
      • At \(t = 0\), \(S\) must be less than \(\dfrac{\gamma}{\beta}\) for the epidemic to die out.
      • +
      • If the rate of removal/recovery is greater than the transmission rate, the epidemic will die out.
      • +
      • Any infection that cannot transmit to more than one host is going to die out.
      • +
    • +
    +
    +
    + +

    For the SIR model, the quantity \(\dfrac{\beta}{\gamma}\) is called the reproduction number, \(R0\) (pronounced “R naught” or “R zero”).

    +
    +
    + +

    The basic reproduction number, R0

    +
      +
    • The basic reproduction number, \(R0\), is the average number of secondary infections generated by a single primary infection in a completely susceptible population.

    • +
    • The basic reproduction number is a key quantity in infectious disease epidemiology.

    • +
    +
    +
    + +
      +
    • It is often represented as a single number or a range of high-low values. +
        +
      • For example, the \(R0\) for measles is popularly known to be \(12\) - \(18\) (Guerra et al. 2017).
      • +
    • +
    +
    +
    + +
      +
    • \(R0\) is often used to express the threshold phenomena in infectious disease epidemiology: +
        +
      • If \(R0 > 1\), the epidemic will grow.
      • +
      • If \(R0 < 1\), the epidemic will decline.
      • +
    • +
    • A pathogen’s \(R0\) value is determined by biological characteristics of the pathogen and the host’s behaviour.
    • +
    +
    +
    + +
      +
    • Conceptually, \(R0\) is given by
    • +
    +

    \[ +R0 \propto \dfrac{\text{Infection}}{\text{Contact}} \times \dfrac{\text{Contact}}{\text{Time}} \times \dfrac{\text{Time}}{\text{Infection}} +\]

    +
      +
    • \(R0\) is unitless and dimensionless.
    • +
    +
    +
    + +

    Numerical simulations

    +
      +
    • Numerical simulations can be performed with any programming language.

    • +
    • This course focuses on the R programming language because:

      +
        +
      • It is a popular language for data analysis and statistical computing.
      • +
      • It has a rich ecosystem of packages for solving differential equations.
      • +
      • It is free and open-source.
      • +
    • +
    +
    +
    + +
      +
    • In R, we can use the {deSolve} package to solve the differential equations.

    • +
    • To solve the model in R with {deSolve}, we will always need to define at least three things:

      +
        +
      • The model equations.
      • +
      • The initial parameter values.
      • +
      • The initial conditions (population sizes).
      • +
    • +
    +
    +
    + +

    Practicals

    +
      +
    • Let’s do a code walk through in R using the script sir.Rmd.
    • +
    +
    +
    + +
    +
    +
    +

    Discussion

    +
    +
    +
      +
    • What happens if we increase or decrease the value of \(R0\)?
    • +
    • What happens if we increase or decrease the value of the infectious period?
    • +
    • How can we flatten the curve?
    • +
    +
    +
    +
    + +
    +
    +

    The Susceptible-Exposed-Infected-Recovered (SEIR) Model

    +
    +
    +

    Timeline of infection. Source: Keeling & Rohani, 2008

    +
    Timeline of infection. Source: Keeling & Rohani, 2008
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    The SARS-COV-2 virus

    +
    The SARS-COV-2 virus
    +
    +
    +
    +
    +

    The Ebola virus

    +
    The Ebola virus
    +
    +
    +
    +
      +
    • Some diseases have an latent/exposed period during which individuals are infected but not yet infectious. Examples include pertussis, COVID-19, and Ebola.
    • +
    • Disease transmission does not occur during the latent period because of low levels of the virus in the host.
    • +
    +
    +
    +
    +
    + +

    +
    +
    + +
    +
    +

    +
    +
      +
    • The SEIR model extends the SIR model to include an exposed compartment, \(E\).
    • +
    • \(E\): infected but are not yet infectious.
    • +
    • Individuals stay in \(E\) for \(1/\sigma\) days before moving to \(I\).
    • +
    +
    +
    +
    +
    + +
    +
    +

    +
    +

    Model equations: \[\begin{align*} +\frac{dS}{dt} & = -\beta S I \\ +\frac{dE}{dt} & = \beta S I - \color{orange}{\sigma E} \\ +\frac{dI}{dt} & = \color{orange}{\sigma E} - \gamma I \\ +\frac{dR}{dt} & = \gamma I +\end{align*}\]

    +
    +
    +
    +
    + +

    SEIR model with births and deaths

    +
      +
    • Let’s relax the assumption about births and deaths in the population.

    • +
    • We will assume that the susceptible population is replenished with new individuals at a constant rate, \(\mu\).

    • +
    • We will also assume that everyone dies at a constant rate, \(\mu\).

    • +
    +
    +
    + +

    Our model schematic now looks like this:

    +

    + +
    +
    + +
    +
    +

    +
    +

    The model equations now become:

    +

    \[\begin{align} +\frac{dS}{dt} & = \color{green}{\mu N} - \beta S I - \color{blue}{\mu} S \\ +\frac{dE}{dt} & = \beta S I - \sigma E - \color{blue}{\mu} E \\ +\frac{dI}{dt} & = \sigma E - \gamma I - \color{blue}{\mu} I \\ +\frac{dR}{dt} & = \gamma I - \color{blue}{\mu} R +\end{align}\]

    +
    +
    + + + +
    +
    + +
    +
    +
    +

    Discussion

    +
    +
    +

    What is the \(R0\) of the SEIR model?

    +
    +
    +
    +
    +
    + +

    The R0 of the SEIR Model

    + +
    +
    +
    +

    Note

    +
    +
    +

    Using the next generation matrix approach, we can show that the SEIR model with constant births and deaths has \[R0 = \dfrac{\beta \sigma}{(\gamma + \mu)(\sigma + \mu)}\].

    +
    +
    +
    +
    +
    + + + +

    Numerical simulations

    +

    R Practicals

    +
      +
    • We can use the same approach as the SIR model to simulate the SEIR model.

    • +
    • Modify the sir.Rmd script to simulate the SEIR model.

    • +
    +
    +
    +
    +

    Modelling epidemic control

    +
    +
    +
    +
    + +
    +

    Note

    +
    +
    +

    For a recap on the various control measures, refer to Section 1.2.

    +
    +
    +
    +
    +
    +

    Vaccination

    +
    +

    For a background on vaccination, refer to Section 1.2.1.1.

    +
    +
    +
    + +
    +
    +

    +
    +
      +
    • Vaccination is one of the most effective ways to control infectious diseases.
    • +
    • Conceptually, vaccination works to reduce the number of susceptible individuals, \(S\).
    • +
    +
    +
    +
    +
    + +
      +
    • There are different types of vaccination strategies, including:

      +
        +
      • pediatric vaccination: vaccinating children to prevent the spread of diseases.
      • +
      • mass/random vaccination: vaccinating a large proportion of the population.
      • +
      • targeted vaccination: vaccinating specific groups of individuals, example, healthcare workers.
      • +
      • pulse vaccination: periodically vaccinating a large number of individuals.
      • +
    • +
    +
    +
    + +
      +
    • Let’s consider the case of mass/random vaccination.

    • +
    • Compartmental models can be extended to capture this by adding a new compartment, \(V\).

    • +
    • Let’s consider the SEIR model with vaccination.

    • +
    +
    +
    + +

    The Susceptible-Exposed-Infected-Recovered-Vaccinated (SEIRV) Model

    +

    +
    +
    + +
    +
    +

    +
    +
      +
    • The SEIRV model is simply the SEIR model with a vaccinated compartment, \(V\).
    • +
    • The vaccinated compartment represents previously susceptible individuals who have been vaccinated and are immune to the disease.
    • +
    +
    +
    +
    +
    + +
      +
    • The vaccinated compartment is:

      +
        +
      • not infectious and does not move to the exposed or infectious compartments.

      • +
      • replenished by the rate of vaccination, \(\eta\).

      • +
    • +
    +
    +
    + +

    The model diagram and equations are as follows:

    +
    +
    +\[\begin{align} +\frac{dS}{dt} & = -\beta S I - \eta S \\ +\frac{dE}{dt} & = \beta S I - \sigma E \\ +\frac{dI}{dt} & = \sigma E - \gamma I \\ +\frac{dR}{dt} & = \gamma I \\ +\frac{dV}{dt} & = \eta S +\end{align}\] +
    +

    +
    +
    +

    where \(\eta\) is the rate of vaccination.

    +
    +
    + +
    +
    +
    +

    Discussion

    +
    +
    +
      +
    • What are some of the assumptions of the SEIRV model?

    • +
    • What are the implications of these assumptions for the model’s predictions?

    • +
    +
    +
    +
    +
    +
    + +

    Numerical simulations

    +

    R Practicals

    +
      +
    • We can use the same approach as the SIR and SEIR models to simulate the SEIRV model.

    • +
    • Modify the seir.Rmd script to simulate the SEIRV model.

    • +
    +
    +
    +

    Non-Pharmaceutical Interventions (NPIs)

    +
    +

    For a background on non-pharmaceutical interventions, refer to Section 1.2.2.

    +
    +
    +
    + +
      +
    • Conceptually, NPIs usually act to either reduce the transmission rate, \(\beta\) or prevent infected individuals from transmitting.

    • +
    • NPIs like isolation, social distancing and movement restrictions can reduce the transmission rate, \(\beta\), by reducing the contact rate between susceptible and infectious individuals.

    • +
    • Hygiene measures reduce the probability of transmission per contact, thereby reducing the transmission rate, \(\beta\), since \(\beta = c \times p\).

    • +
    +
    +
    + +
      +
    • Let’s consider two scenarios that will extend the SIR model to include NPIs:

      +
        +
      1. Modifying the transmission rate, \(\beta\).
      2. +
      3. Preventing infected individuals from transmitting through isolation.
      4. +
    • +
    +
    +
    + +

    Modifying the transmission rate

    +
      +
    • NPIs such as social distancing, mask-wearing, and hand hygiene can reduce the transmission rate, \(\beta\).

    • +
    • We can model this by making the transmission rate a function of time, \(\beta (t)\).

    • +
    +
    +
    + +

    The modified SIR model with a reduced transmission rate is as follows:

    +\[\begin{align*} +\frac{dS}{dt} & = -\beta (t) S I \\ +\frac{dI}{dt} & = \beta (t) S I - \gamma I \\ +\frac{dR}{dt} & = \gamma I +\end{align*}\] +
    +
    + +
      +
    • The simplest form is to reduce \(\beta\) by an NPI efficacy, say \(\epsilon\).

    • +
    • Assuming the NPI is implemented between \(t_{\text{npi\_start}}\) and \(t_{\text{npi\_end}}\), it means that \(\beta\) remains the same before that period and is modified to \((1- \epsilon)\beta\) during the period of the NPI, where \(0 \leq \epsilon \leq 1\).

    • +
    • With this knowledge, we can define \(\beta (t)\) mathematically as:

    • +
    +\[\begin{equation*} +\beta(t) = \begin{cases} +\beta & \text{if } t < t_{\text{npi\_start}} \text{ or } t > t_{\text{npi\_end}} \\ +(1 - \epsilon) \beta & \text{if } t_{\text{npi\_start}} \le t \le t_{\text{npi\_end}} +\end{cases} +\end{equation*}\] +
    +
    + +

    R Practicals

    +
      +
    • Let’s open the script file sir_npi.R and follow along.
    • +
    +
    +
    + +

    NPIs as compartments

    +
      +
    • In the previous example, we retained the SIR model structure and modified the transmission rate.

    • +
    • We can also model NPIs as compartments in the model. This is useful when we want to treat individuals affected by the NPIs differently.

    • +
    +
    +
    + +
      +
    • For example, isolation is an NPI that prevents infected individuals from transmitting the disease.

    • +
    • This means that infected individuals in isolation do not contribute to the transmission of the disease and need to be removed from the infected compartment.

    • +
    • Moving isolated individuals to a separate compartment allows us to track them separately in the model and apply relevant parameters.

    • +
    +
    +
    + +
      +
    • We can model this by introducing a new compartment, \(Q\), for isolating infected individuals.

    • +
    • Let’s assume, infected individuals move to the isolated compartment at a rate, \(\delta\).

    • +
    • Infected individuals in the isolated compartment do not transmit the disease.

    • +
    +
    +
    + +

    The modified SIR model with isolated is as follows:

    +\[\begin{align*} +\frac{dS}{dt} & = -\beta S I \\ +\frac{dI}{dt} & = \beta S I - \gamma I - \delta I \\ +\frac{dR}{dt} & = \gamma I + \tau Q \\ +\frac{dQ}{dt} & = \delta I - \tau Q +\end{align*}\] +

    where \(\delta\) is the rate at which infected individuals move to the isolated compartment, and \(\tau\) is the rate at which individuals recover from isolation.

    +
    +
    + +
    R Practicals
    +
      +
    • We can use the same approach as the SIR model to simulate the model with isolation.
    • +
    • Modify the SIR model in sir.Rmd to incorporate the isolated compartment, \(Q\) and the relevant parameters.
    • +
    +
    +
    +
    +

    Brief notes on modelling host heterogeneity

    +
      +
    • The models we have discussed so far assume that all individuals in the population are identical.

    • +
    • However, in reality, individuals differ in their susceptibility to infection and their ability to transmit the disease.

    • +
    • It is essential to capture this heterogeneity in the models in order for the models to be more realistic and useful for decision-making.

    • +
    +
    +
    + +
      +
    • This can be captured by incorporating heterogeneity into the models.

    • +
    • Heterogeneity is often captured by stratifying the population into different groups.

    • +
    +
    +
    +

    Age structure

    +
      +
    • For many infectious diseases, the risk of infection and the severity of the disease vary by age.

    • +
    • Hence, it is essential to capture age structure in the models.

    • +
    • To do this, we divide the population into different age groups and model the disease dynamics within each age group.

    • +
    • Let’s extend the SIR model to include age structure.

    • +
    +
    +
    + +
      +
    • We will divide the population into \(n\) age groups.

    • +
    • Because the homogeneous model has 3 compartments, the age structured one will have \(3n\) compartments: \(S_1, I_1, R_1, S_2, I_2, R_2, ..., S_n, I_n, R_n\).

    • +
    +
    +
    + +
      +
    • The (compact) model equations are as follows:
    • +
    +

    \[\begin{align*} +\dfrac{dS_i}{dt} &= -\sum_{j=1}^{n} \beta_{ji} S_i I_j \\ +\dfrac{dI_i}{dt} &= \sum_{j=1}^{n} \beta_{ji} S_i I_j - \gamma I_i \\ +\dfrac{dR_i}{dt} &= \gamma I_i +\end{align*}\]

    +
    +
    + +
      +
    • The model can be used to study the impact of age structure on the dynamics of the epidemic.

    • +
    • For example, we can study the impact of vaccinating different age groups on the dynamics of the epidemic.

    • +
    +
    +
    +

    Other Heterogeneities

    +
      +
    • Other forms of heterogeneity that can be incorporated into the models include: +
        +
      • Spatial heterogeneity
      • +
      • Temporal heterogeneity
      • +
      • Contact heterogeneity
      • +
      • Heterogeneity in host behavior
      • +
    • +
    +
    +
    + +
    +
    +
    +

    Final Remarks

    + +
    +
    +

    Takeaways

    +

    In the last two days, we have covered a lot of ground. Here are some key takeaways:

    +
      +
    • Infectious diseases are a major public health concern that can have devastating consequences.

    • +
    • Mathematical models are essential tools for studying the dynamics of infectious diseases and informing public health decision-making.

    • +
    • Models are simplifications of reality that help us understand complex systems.

    • +
    +
    +
    + +
      +
    • We have discussed several compartmental models, including the SIR, SEIR, and SEIRV models.

    • +
    • The SIR model is a simple compartmental model that divides the population into three compartments: susceptible, infected, and recovered.

    • +
    • The SEIR model extends the SIR model by adding an exposed compartment.

    • +
    • We can model various pharmaceutical and non-pharmaceutical interventions (NPIs) by modifying the transmission rate or adding new compartments.

    • +
    +
    +
    + +
      +
    • We have discussed the basic reproduction number, \(R0\), which is a key parameter in infectious disease epidemiology.

    • +
    • \(R0\) is the average number of secondary infections produced by a single infected individual in a completely susceptible population.

    • +
    • If \(R0 > 1\), the disease will spread in the population; if \(R0 < 1\), the disease will die out.

    • +
    +
    +
    + +
      +
    • Deriving the basic reproduction number, \(R0\), is an essential step in understanding the dynamics of infectious diseases.

    • +
    • Deriving \(R0\) for the simple SIR model is simple as we just need to study the threshold phenomena.

    • +
    • For more complex models, we can use the next-generation matrix approach to derive \(R0\).

    • +
    +
    +
    + +
      +
    • Often, homogeneous models are not sufficient to capture the complexity of infectious diseases.

    • +
    • Incorporating heterogeneity into the models is essential for capturing the complexity of infectious diseases.

    • +
    • Age structure is a common form of heterogeneity that can be incorporated into the models.

    • +
    • Other forms of heterogeneity include spatial, temporal, and contact heterogeneity.

    • +
    +
    +
    +

    What skills are needed to build and use infectious disease models?

    +
    +
    +

    A non-exhaustive list of skills needed for modelling infectious diseases.

    +
    A non-exhaustive list of skills needed for modelling infectious diseases.
    +
    +
    +
    +
    +

    Contact Information

    +

    James Mba Azam, PhD

    +

    Epiverse-TRACE Initiative, London School of Hygiene and Tropical Medicine, UK

    +

    Email: james.azam@lshtm.ac.uk

    +

    ORCID: 0000-0001-5782-7330

    +

    Social Media:

    +

    LinkedIn: James Azam

    +

    Twitter: james_azam

    +

    GitHub: jamesmbaazam

    +
    +
    + +

    This presentation is made available through a Creative Commons Attribution 4.0 International License

    +
    +
    +
    +

    List of Resources

    + +
    +
    +

    Textbooks

    +
    + +
    +
    +
    +
    +
    +
    +

    Infectious Diseases of Humans: Dynamics and Control by Roy M. Anderson and Robert M. May

    +
    Infectious Diseases of Humans: Dynamics and Control by Roy M. Anderson and Robert M. May
    +
    +
    +
    +
    +
    +
    +

    Infectious Disease Modelling by Emilia Vynnycky and Richard White

    +
    Infectious Disease Modelling by Emilia Vynnycky and Richard White
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +

    Modeling Infectious Diseases in Humans and Animals by Matt Keeling and Pejman Rohani

    +
    Modeling Infectious Diseases in Humans and Animals by Matt Keeling and Pejman Rohani
    +
    +
    +
    +
    +
    +
    +

    Epidemics: Models and Data Using R by Ottar N. Bjornstad

    +
    Epidemics: Models and Data Using R by Ottar N. Bjornstad
    +
    +
    +
    +
    +
    +
    +
    +

    Papers and Articles

    +
    +
    + +

    Modelling infectious disease transmission

    + +
    +
    + + +
    +
    + + +
    +
    + +
      +
    • Bodner, K., Brimacombe, C., Chenery, E. S., Greiner, A., McLeod, A. M., Penk, S. R., & Soto, J. S. V. (2021). Ten simple rules for tackling your first mathematical models: A guide for graduate students by graduate students. PLOS Computational Biology, 17(1), e1008539. https://doi.org/10.1371/journal.pcbi.1008539

    • +
    • Mishra, S., Fisman, D. N., & Boily, M.-C. (2011). The ABC of terms used in mathematical models of infectious diseases. Journal of Epidemiology & Community Health, 65(1), 87–94. https://jech.bmj.com/content/65/1/87

    • +
    +
    +
    + +
      +
    • James, L. P., Salomon, J. A., Buckee, C. O., & Menzies, N. A. (2021). The Use and Misuse of Mathematical Modeling for Infectious Disease Policymaking: Lessons for the COVID-19 Pandemic. 41(4), 379–385. https://doi.org/10.1177/0272989X21990391

    • +
    • Holmdah, I., & Buckee, C. (2020). Wrong but useful—What COVID-19 epidemiologic models can and cannot tell us. New England Journal of Medicine. https://doi.org/10.1056/nejmp2009027

    • +
    +
    +
    + + +
    +
    + +

    Deriving and Interpreting R0

    + +
    +
    + +
      +
    • Diekmann, O., Heesterbeek, J. A. P., & Roberts, M. G. (2010). The construction of next-generation matrices for compartmental epidemic models. Journal of the Royal Society Interface, 7(47), 873–885. https://doi.org/10.1098/rsif.2009.0386
    • +
    +
    +
    +

    Code repositories

    +
      +
    • epirecipes: Code for collate mathematical models of infectious disease transmission, with implementations in R, Python, and Julia.

    • +
    • Modeling Infectious Diseases in Humans and Animals: Code for the labelled programs in the book “Modeling Infectious Diseases in Humans and Animals”. They are generally available as C++, Fortran and Matlab files.

    • +
    +
    +
    +

    References

    +
    +
    +Anderson, Roy M, and Robert M May. 1982. “Directly Transmitted Infections Diseases: Control by Vaccination.” Science 215 (4536): 1053–60. +
    +
    +Begon, Michael, Malcolm Bennett, Roger G Bowers, Nigel P French, SM Hazel, and Joseph Turner. 2002. “A Clarification of Transmission Terms in Host-Microparasite Models: Numbers, Densities and Areas.” Epidemiology & Infection 129 (1): 147–53. +
    +
    +Blackwood, Julie C., and Lauren M. Childs. 2018. “An Introduction to Compartmental Modeling for the Budding Infectious Disease Modeler.” Letters in Biomathematics 5 (1): 195–221. https://doi.org/10.1080/23737867.2018.1509026. +
    +
    +Box, GE. 1979. “All Models Are Wrong, but Some Are Useful.” Robustness in Statistics 202 (1979): 549. +
    +
    +Diekmann, Odo, JAP Heesterbeek, and Michael G Roberts. 2010. “The Construction of Next-Generation Matrices for Compartmental Epidemic Models.” Journal of the Royal Society Interface 7 (47): 873–85. +
    +
    +Diekmann, Odo, Johan Andre Peter Heesterbeek, and Johan Anton Jacob Metz. 1990. “On the Definition and the Computation of the Basic Reproduction Ratio r 0 in Models for Infectious Diseases in Heterogeneous Populations.” Journal of Mathematical Biology 28: 365–82. +
    +
    +Guerra, Fiona M, Shelly Bolotin, Gillian Lim, Jane Heffernan, Shelley L Deeks, Ye Li, and Natasha S Crowcroft. 2017. “The Basic Reproduction Number (R0) of Measles: A Systematic Review.” The Lancet Infectious Diseases 17 (12): e420–28. +
    +
    +Kermack, William Ogilvy, and Anderson G McKendrick. 1927. “A Contribution to the Mathematical Theory of Epidemics.” Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character 115 (772): 700–721. +
    +
    +
    + +
    +
    + + + + @@ -1105,7 +2031,6 @@

    References

    - @@ -1253,7 +2178,7 @@

    References

    previewLinks: false, // Transition style (none/fade/slide/convex/concave/zoom) - transition: 'none', + transition: 'fade', // Transition speed (default/fast/slow) transitionSpeed: 'default', @@ -1298,7 +2223,7 @@

    References

    }, // reveal.js plugins - plugins: [QuartoLineHighlight, PdfExport, RevealMenu, RevealChalkboard, RevealTextResizer, QuartoSupport, + plugins: [QuartoLineHighlight, PdfExport, RevealMenu, RevealChalkboard, QuartoSupport, RevealMath, RevealNotes, @@ -1377,18 +2302,7 @@

    References

    } return false; } - const clipboard = new window.ClipboardJS('.code-copy-button', { - text: function(trigger) { - const codeEl = trigger.previousElementSibling.cloneNode(true); - for (const childEl of codeEl.children) { - if (isCodeAnnotation(childEl)) { - childEl.remove(); - } - } - return codeEl.innerText; - } - }); - clipboard.on('success', function(e) { + const onCopySuccess = function(e) { // button target const button = e.trigger; // don't keep focus @@ -1420,7 +2334,29 @@

    References

    }, 1000); // clear code selection e.clearSelection(); + } + const getTextToCopy = function(trigger) { + const codeEl = trigger.previousElementSibling.cloneNode(true); + for (const childEl of codeEl.children) { + if (isCodeAnnotation(childEl)) { + childEl.remove(); + } + } + return codeEl.innerText; + } + const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', { + text: getTextToCopy }); + clipboard.on('success', onCopySuccess); + if (window.document.getElementById('quarto-embedded-source-code-modal')) { + // For code content inside modals, clipBoardJS needs to be initialized with a container option + // TODO: Check when it could be a function (https://github.com/zenorocha/clipboard.js/issues/860) + const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', { + text: getTextToCopy, + container: window.document.getElementById('quarto-embedded-source-code-modal') + }); + clipboardModal.on('success', onCopySuccess); + } var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); var mailtoRegex = new RegExp(/^mailto:/); var filterRegex = new RegExp('/' + window.location.host + '/'); @@ -1428,7 +2364,7 @@

    References

    return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href); } // Inspect non-navigation links and adorn them if external - var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)'); + var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)'); for (var i=0; iReferences } }); - diff --git a/slides.qmd b/slides.qmd index e83a8b2..b5d38fd 100644 --- a/slides.qmd +++ b/slides.qmd @@ -11,21 +11,21 @@ date: "last-modified" execute: echo: true freeze: auto -format: - beamer: - navigation: horizontal - theme: metropolis - institute: Epiverse-TRACE Initiative, London School of Hygiene and Tropical Medicine, UK - orcid: 0000-0001-5782-7330 - email: james.azam@lshtm.ac.uk # format: -# revealjs: -# theme: [solarized, custom.scss] -# slide-number: true -# scrollable: true -# chalkboard: true -# toc: true -# toc-depth: 1 +# beamer: +# navigation: horizontal +# theme: metropolis + # institute: Epiverse-TRACE Initiative, London School of Hygiene and Tropical Medicine, UK + # orcid: 0000-0001-5782-7330 + # email: james.azam@lshtm.ac.uk +format: + revealjs: + theme: [solarized] + slide-number: true + scrollable: true + chalkboard: true + toc: true + toc-depth: 1 transition: fade lightbox: true progress: true diff --git a/slides_files/libs/revealjs/dist/theme/quarto.css b/slides_files/libs/revealjs/dist/theme/quarto.css index 188073f..810736e 100644 --- a/slides_files/libs/revealjs/dist/theme/quarto.css +++ b/slides_files/libs/revealjs/dist/theme/quarto.css @@ -5,4 +5,4 @@ * we also add `bright-[color]-` synonyms for the `-[color]-intense` classes since * that seems to be what ansi_up emits * -*/.ansi-black-fg{color:#3e424d}.ansi-black-bg{background-color:#3e424d}.ansi-black-intense-black,.ansi-bright-black-fg{color:#282c36}.ansi-black-intense-black,.ansi-bright-black-bg{background-color:#282c36}.ansi-red-fg{color:#e75c58}.ansi-red-bg{background-color:#e75c58}.ansi-red-intense-red,.ansi-bright-red-fg{color:#b22b31}.ansi-red-intense-red,.ansi-bright-red-bg{background-color:#b22b31}.ansi-green-fg{color:#00a250}.ansi-green-bg{background-color:#00a250}.ansi-green-intense-green,.ansi-bright-green-fg{color:#007427}.ansi-green-intense-green,.ansi-bright-green-bg{background-color:#007427}.ansi-yellow-fg{color:#ddb62b}.ansi-yellow-bg{background-color:#ddb62b}.ansi-yellow-intense-yellow,.ansi-bright-yellow-fg{color:#b27d12}.ansi-yellow-intense-yellow,.ansi-bright-yellow-bg{background-color:#b27d12}.ansi-blue-fg{color:#208ffb}.ansi-blue-bg{background-color:#208ffb}.ansi-blue-intense-blue,.ansi-bright-blue-fg{color:#0065ca}.ansi-blue-intense-blue,.ansi-bright-blue-bg{background-color:#0065ca}.ansi-magenta-fg{color:#d160c4}.ansi-magenta-bg{background-color:#d160c4}.ansi-magenta-intense-magenta,.ansi-bright-magenta-fg{color:#a03196}.ansi-magenta-intense-magenta,.ansi-bright-magenta-bg{background-color:#a03196}.ansi-cyan-fg{color:#60c6c8}.ansi-cyan-bg{background-color:#60c6c8}.ansi-cyan-intense-cyan,.ansi-bright-cyan-fg{color:#258f8f}.ansi-cyan-intense-cyan,.ansi-bright-cyan-bg{background-color:#258f8f}.ansi-white-fg{color:#c5c1b4}.ansi-white-bg{background-color:#c5c1b4}.ansi-white-intense-white,.ansi-bright-white-fg{color:#a1a6b2}.ansi-white-intense-white,.ansi-bright-white-bg{background-color:#a1a6b2}.ansi-default-inverse-fg{color:#fff}.ansi-default-inverse-bg{background-color:#000}.ansi-bold{font-weight:bold}.ansi-underline{text-decoration:underline}:root{--quarto-body-bg: #fdf6e3;--quarto-body-color: #657b83;--quarto-text-muted: #b8c4c9;--quarto-border-color: #93a1a1;--quarto-border-width: 1px;--quarto-border-radius: 4px}table.gt_table{color:var(--quarto-body-color);font-size:1em;width:100%;background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_column_spanner_outer{color:var(--quarto-body-color);background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_col_heading{color:var(--quarto-body-color);font-weight:bold;background-color:rgba(0,0,0,0)}table.gt_table thead.gt_col_headings{border-bottom:1px solid currentColor;border-top-width:inherit;border-top-color:var(--quarto-border-color)}table.gt_table thead.gt_col_headings:not(:first-child){border-top-width:1px;border-top-color:var(--quarto-border-color)}table.gt_table td.gt_row{border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-width:0px}table.gt_table tbody.gt_table_body{border-top-width:1px;border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-color:currentColor}div.columns{display:initial;gap:initial}div.column{display:inline-block;overflow-x:initial;vertical-align:top;width:50%}.code-annotation-tip-content{word-wrap:break-word}.code-annotation-container-hidden{display:none !important}dl.code-annotation-container-grid{display:grid;grid-template-columns:min-content auto}dl.code-annotation-container-grid dt{grid-column:1}dl.code-annotation-container-grid dd{grid-column:2}pre.sourceCode.code-annotation-code{padding-right:0}code.sourceCode .code-annotation-anchor{z-index:100;position:relative;float:right;background-color:rgba(0,0,0,0)}input[type=checkbox]{margin-right:.5ch}:root{--mermaid-bg-color: #fdf6e3;--mermaid-edge-color: #999;--mermaid-node-fg-color: #657b83;--mermaid-fg-color: #657b83;--mermaid-fg-color--lighter: #7f949c;--mermaid-fg-color--lightest: #9cacb2;--mermaid-font-family: Lato, sans-serif;--mermaid-label-bg-color: #fdf6e3;--mermaid-label-fg-color: #468;--mermaid-node-bg-color: rgba(68, 102, 136, 0.1);--mermaid-node-fg-color: #657b83}@media print{:root{font-size:11pt}#quarto-sidebar,#TOC,.nav-page{display:none}.page-columns .content{grid-column-start:page-start}.fixed-top{position:relative}.panel-caption,.figure-caption,figcaption{color:#666}}.code-copy-button{position:absolute;top:0;right:0;border:0;margin-top:5px;margin-right:5px;background-color:rgba(0,0,0,0);z-index:3}.code-copy-button:focus{outline:none}.code-copy-button-tooltip{font-size:.75em}pre.sourceCode:hover>.code-copy-button>.bi::before{display:inline-block;height:1rem;width:1rem;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:1rem 1rem}pre.sourceCode:hover>.code-copy-button-checked>.bi::before{background-image:url('data:image/svg+xml,')}pre.sourceCode:hover>.code-copy-button:hover>.bi::before{background-image:url('data:image/svg+xml,')}pre.sourceCode:hover>.code-copy-button-checked:hover>.bi::before{background-image:url('data:image/svg+xml,')}.panel-tabset [role=tablist]{border-bottom:1px solid #93a1a1;list-style:none;margin:0;padding:0;width:100%}.panel-tabset [role=tablist] *{-webkit-box-sizing:border-box;box-sizing:border-box}@media(min-width: 30em){.panel-tabset [role=tablist] li{display:inline-block}}.panel-tabset [role=tab]{border:1px solid rgba(0,0,0,0);border-top-color:#93a1a1;display:block;padding:.5em 1em;text-decoration:none}@media(min-width: 30em){.panel-tabset [role=tab]{border-top-color:rgba(0,0,0,0);display:inline-block;margin-bottom:-1px}}.panel-tabset [role=tab][aria-selected=true]{background-color:#93a1a1}@media(min-width: 30em){.panel-tabset [role=tab][aria-selected=true]{background-color:rgba(0,0,0,0);border:1px solid #93a1a1;border-bottom-color:#fdf6e3}}@media(min-width: 30em){.panel-tabset [role=tab]:hover:not([aria-selected=true]){border:1px solid #93a1a1}}.code-with-filename .code-with-filename-file{margin-bottom:0;padding-bottom:2px;padding-top:2px;padding-left:.7em;border:var(--quarto-border-width) solid var(--quarto-border-color);border-radius:var(--quarto-border-radius);border-bottom:0;border-bottom-left-radius:0%;border-bottom-right-radius:0%}.code-with-filename div.sourceCode,.reveal .code-with-filename div.sourceCode{margin-top:0;border-top-left-radius:0%;border-top-right-radius:0%}.code-with-filename .code-with-filename-file pre{margin-bottom:0}.code-with-filename .code-with-filename-file{background-color:rgba(219,219,219,.8)}.quarto-dark .code-with-filename .code-with-filename-file{background-color:#555}.code-with-filename .code-with-filename-file strong{font-weight:400}.reveal.center .slide aside,.reveal.center .slide div.aside{position:initial}section.has-light-background,section.has-light-background h1,section.has-light-background h2,section.has-light-background h3,section.has-light-background h4,section.has-light-background h5,section.has-light-background h6{color:#222}section.has-light-background a,section.has-light-background a:hover{color:#2a76dd}section.has-light-background code{color:#4758ab}section.has-dark-background,section.has-dark-background h1,section.has-dark-background h2,section.has-dark-background h3,section.has-dark-background h4,section.has-dark-background h5,section.has-dark-background h6{color:#fff}section.has-dark-background a,section.has-dark-background a:hover{color:#42affa}section.has-dark-background code{color:#ffa07a}#title-slide,div.reveal div.slides section.quarto-title-block{text-align:center}#title-slide .subtitle,div.reveal div.slides section.quarto-title-block .subtitle{margin-bottom:2.5rem}.reveal .slides{text-align:left}.reveal .title-slide h1{font-size:1.6em}.reveal[data-navigation-mode=linear] .title-slide h1{font-size:2.5em}.reveal div.sourceCode{border:1px solid #93a1a1;border-radius:4px}.reveal pre{width:100%;box-shadow:none;background-color:#fdf6e3;border:none;margin:0;font-size:.55em}.reveal code{color:var(--quarto-hl-fu-color);background-color:rgba(0,0,0,0);white-space:pre-wrap}.reveal pre.sourceCode code{background-color:#fdf6e3;padding:6px 9px;max-height:500px;white-space:pre}.reveal pre code{background-color:#fdf6e3;color:#657b83}.reveal .column-output-location{display:flex;align-items:stretch}.reveal .column-output-location .column:first-of-type div.sourceCode{height:100%;background-color:#fdf6e3}.reveal blockquote{display:block;position:relative;color:#b8c4c9;width:unset;margin:var(--r-block-margin) auto;padding:.625rem 1.75rem;border-left:.25rem solid #b8c4c9;font-style:normal;background:none;box-shadow:none}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:block}.reveal .slide aside,.reveal .slide div.aside{position:absolute;bottom:20px;font-size:0.7em;color:#b8c4c9}.reveal .slide sup{font-size:0.7em}.reveal .slide.scrollable aside,.reveal .slide.scrollable div.aside{position:relative;margin-top:1em}.reveal .slide aside .aside-footnotes{margin-bottom:0}.reveal .slide aside .aside-footnotes li:first-of-type{margin-top:0}.reveal .layout-sidebar{display:flex;width:100%;margin-top:.8em}.reveal .layout-sidebar .panel-sidebar{width:270px}.reveal .layout-sidebar-left .panel-sidebar{margin-right:calc(0.5em*2)}.reveal .layout-sidebar-right .panel-sidebar{margin-left:calc(0.5em*2)}.reveal .layout-sidebar .panel-fill,.reveal .layout-sidebar .panel-center,.reveal .layout-sidebar .panel-tabset{flex:1}.reveal .panel-input,.reveal .panel-sidebar{font-size:.5em;padding:.5em;border-style:solid;border-color:#93a1a1;border-width:1px;border-radius:4px;background-color:#f8f9fa}.reveal .panel-sidebar :first-child,.reveal .panel-fill :first-child{margin-top:0}.reveal .panel-sidebar :last-child,.reveal .panel-fill :last-child{margin-bottom:0}.panel-input>div,.panel-input>div>div{vertical-align:middle;padding-right:1em}.reveal p,.reveal .slides section,.reveal .slides section>section{line-height:1.3}.reveal.smaller .slides section,.reveal .slides section.smaller,.reveal .slides section .callout{font-size:0.7em}.reveal.smaller .slides section section{font-size:inherit}.reveal.smaller .slides h1,.reveal .slides section.smaller h1{font-size:calc(2.5em/0.7)}.reveal.smaller .slides h2,.reveal .slides section.smaller h2{font-size:calc(1.6em/0.7)}.reveal.smaller .slides h3,.reveal .slides section.smaller h3{font-size:calc(1.3em/0.7)}.reveal .columns>.column>:not(ul,ol){margin-left:.25em;margin-right:.25em}.reveal .columns>.column:first-child>:not(ul,ol){margin-right:.5em;margin-left:0}.reveal .columns>.column:last-child>:not(ul,ol){margin-right:0;margin-left:.5em}.reveal .slide-number{color:#4ca2df;background-color:#fdf6e3}.reveal .footer{color:#b8c4c9}.reveal .footer a{color:#268bd2}.reveal .footer.has-dark-background{color:#fff}.reveal .footer.has-dark-background a{color:#7bc6fa}.reveal .footer.has-light-background{color:#505050}.reveal .footer.has-light-background a{color:#6a9bdd}.reveal .slide-number{color:#b8c4c9}.reveal .slide-number.has-dark-background{color:#fff}.reveal .slide-number.has-light-background{color:#505050}.reveal .slide figure>figcaption,.reveal .slide img.stretch+p.caption,.reveal .slide img.r-stretch+p.caption{font-size:0.7em}@media screen and (min-width: 500px){.reveal .controls[data-controls-layout=edges] .navigate-left{left:.2em}.reveal .controls[data-controls-layout=edges] .navigate-right{right:.2em}.reveal .controls[data-controls-layout=edges] .navigate-up{top:.4em}.reveal .controls[data-controls-layout=edges] .navigate-down{bottom:2.3em}}.tippy-box[data-theme~=light-border]{background-color:#fdf6e3;color:#657b83;border-radius:4px;border:solid 1px #b8c4c9;font-size:.6em}.tippy-box[data-theme~=light-border] .tippy-arrow{color:#b8c4c9}.tippy-box[data-placement^=bottom]>.tippy-content{padding:7px 10px;z-index:1}.reveal .callout.callout-style-simple .callout-body,.reveal .callout.callout-style-default .callout-body,.reveal .callout.callout-style-simple div.callout-title,.reveal .callout.callout-style-default div.callout-title{font-size:inherit}.reveal .callout.callout-style-default .callout-icon::before,.reveal .callout.callout-style-simple .callout-icon::before{height:2rem;width:2rem;background-size:2rem 2rem}.reveal .callout.callout-titled .callout-title p{margin-top:.5em}.reveal .callout.callout-titled .callout-icon::before{margin-top:1rem}.reveal .callout.callout-titled .callout-body>.callout-content>:last-child{margin-bottom:1rem}.reveal .panel-tabset [role=tab]{padding:.25em .7em}.reveal .slide-menu-button .fa-bars::before{background-image:url('data:image/svg+xml,')}.reveal .slide-chalkboard-buttons .fa-easel2::before{background-image:url('data:image/svg+xml,')}.reveal .slide-chalkboard-buttons .fa-brush::before{background-image:url('data:image/svg+xml,')}/*! light */.reveal ol[type=a]{list-style-type:lower-alpha}.reveal ol[type=a s]{list-style-type:lower-alpha}.reveal ol[type=A s]{list-style-type:upper-alpha}.reveal ol[type=i]{list-style-type:lower-roman}.reveal ol[type=i s]{list-style-type:lower-roman}.reveal ol[type=I s]{list-style-type:upper-roman}.reveal ol[type="1"]{list-style-type:decimal}.reveal ul.task-list{list-style:none}.reveal ul.task-list li input[type=checkbox]{width:2em;height:2em;margin:0 1em .5em -1.6em;vertical-align:middle}div.cell-output-display div.pagedtable-wrapper table.table{font-size:.6em}.reveal .code-annotation-container-hidden{display:none}.reveal code.sourceCode button.code-annotation-anchor,.reveal code.sourceCode .code-annotation-anchor{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;color:var(--quarto-hl-co-color);border:solid var(--quarto-hl-co-color) 1px;border-radius:50%;font-size:.7em;line-height:1.2em;margin-top:2px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none}.reveal code.sourceCode button.code-annotation-anchor{cursor:pointer}.reveal code.sourceCode a.code-annotation-anchor{text-align:center;vertical-align:middle;text-decoration:none;cursor:default;height:1.2em;width:1.2em}.reveal code.sourceCode.fragment a.code-annotation-anchor{left:auto}.reveal #code-annotation-line-highlight-gutter{width:100%;border-top:solid var(--quarto-hl-co-color) 1px;border-bottom:solid var(--quarto-hl-co-color) 1px;z-index:2}.reveal #code-annotation-line-highlight{margin-left:-8em;width:calc(100% + 4em);border-top:solid var(--quarto-hl-co-color) 1px;border-bottom:solid var(--quarto-hl-co-color) 1px;z-index:2;margin-bottom:-2px}.reveal code.sourceCode .code-annotation-anchor.code-annotation-active{background-color:var(--quarto-hl-normal-color, #aaaaaa);border:solid var(--quarto-hl-normal-color, #aaaaaa) 1px;color:#fdf6e3;font-weight:bolder}.reveal pre.code-annotation-code{padding-top:0;padding-bottom:0}.reveal pre.code-annotation-code code{z-index:3;padding-left:0px}.reveal dl.code-annotation-container-grid{margin-left:.1em}.reveal dl.code-annotation-container-grid dt{margin-top:.65rem;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;border:solid #657b83 1px;border-radius:50%;height:1.3em;width:1.3em;line-height:1.3em;font-size:.5em;text-align:center;vertical-align:middle;text-decoration:none}.reveal dl.code-annotation-container-grid dd{margin-left:.25em}.reveal .scrollable ol li:first-child:nth-last-child(n+10),.reveal .scrollable ol li:first-child:nth-last-child(n+10)~li{margin-left:1em}html.print-pdf .reveal .slides .pdf-page:last-child{page-break-after:avoid}.reveal .quarto-title-block .quarto-title-authors{display:flex;justify-content:center}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author{padding-left:.5em;padding-right:.5em}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:hover,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:visited,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:active{color:inherit;text-decoration:none}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-name{margin-bottom:.1rem}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-email{margin-top:0px;margin-bottom:.4em;font-size:.6em}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-orcid img{margin-bottom:4px}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-affiliation{font-size:.7em;margin-top:0px;margin-bottom:8px}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-affiliation:first{margin-top:12px}html *{color-profile:sRGB;rendering-intent:auto}/*# sourceMappingURL=f95d2bded9c28492b788fe14c3e9f347.css.map */ +*/.ansi-black-fg{color:#3e424d}.ansi-black-bg{background-color:#3e424d}.ansi-black-intense-black,.ansi-bright-black-fg{color:#282c36}.ansi-black-intense-black,.ansi-bright-black-bg{background-color:#282c36}.ansi-red-fg{color:#e75c58}.ansi-red-bg{background-color:#e75c58}.ansi-red-intense-red,.ansi-bright-red-fg{color:#b22b31}.ansi-red-intense-red,.ansi-bright-red-bg{background-color:#b22b31}.ansi-green-fg{color:#00a250}.ansi-green-bg{background-color:#00a250}.ansi-green-intense-green,.ansi-bright-green-fg{color:#007427}.ansi-green-intense-green,.ansi-bright-green-bg{background-color:#007427}.ansi-yellow-fg{color:#ddb62b}.ansi-yellow-bg{background-color:#ddb62b}.ansi-yellow-intense-yellow,.ansi-bright-yellow-fg{color:#b27d12}.ansi-yellow-intense-yellow,.ansi-bright-yellow-bg{background-color:#b27d12}.ansi-blue-fg{color:#208ffb}.ansi-blue-bg{background-color:#208ffb}.ansi-blue-intense-blue,.ansi-bright-blue-fg{color:#0065ca}.ansi-blue-intense-blue,.ansi-bright-blue-bg{background-color:#0065ca}.ansi-magenta-fg{color:#d160c4}.ansi-magenta-bg{background-color:#d160c4}.ansi-magenta-intense-magenta,.ansi-bright-magenta-fg{color:#a03196}.ansi-magenta-intense-magenta,.ansi-bright-magenta-bg{background-color:#a03196}.ansi-cyan-fg{color:#60c6c8}.ansi-cyan-bg{background-color:#60c6c8}.ansi-cyan-intense-cyan,.ansi-bright-cyan-fg{color:#258f8f}.ansi-cyan-intense-cyan,.ansi-bright-cyan-bg{background-color:#258f8f}.ansi-white-fg{color:#c5c1b4}.ansi-white-bg{background-color:#c5c1b4}.ansi-white-intense-white,.ansi-bright-white-fg{color:#a1a6b2}.ansi-white-intense-white,.ansi-bright-white-bg{background-color:#a1a6b2}.ansi-default-inverse-fg{color:#fff}.ansi-default-inverse-bg{background-color:#000}.ansi-bold{font-weight:bold}.ansi-underline{text-decoration:underline}:root{--quarto-body-bg: #fdf6e3;--quarto-body-color: #657b83;--quarto-text-muted: #b8c4c9;--quarto-border-color: #93a1a1;--quarto-border-width: 1px;--quarto-border-radius: 4px}table.gt_table{color:var(--quarto-body-color);font-size:1em;width:100%;background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_column_spanner_outer{color:var(--quarto-body-color);background-color:rgba(0,0,0,0);border-top-width:inherit;border-bottom-width:inherit;border-color:var(--quarto-border-color)}table.gt_table th.gt_col_heading{color:var(--quarto-body-color);font-weight:bold;background-color:rgba(0,0,0,0)}table.gt_table thead.gt_col_headings{border-bottom:1px solid currentColor;border-top-width:inherit;border-top-color:var(--quarto-border-color)}table.gt_table thead.gt_col_headings:not(:first-child){border-top-width:1px;border-top-color:var(--quarto-border-color)}table.gt_table td.gt_row{border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-width:0px}table.gt_table tbody.gt_table_body{border-top-width:1px;border-bottom-width:1px;border-bottom-color:var(--quarto-border-color);border-top-color:currentColor}div.columns{display:initial;gap:initial}div.column{display:inline-block;overflow-x:initial;vertical-align:top;width:50%}.code-annotation-tip-content{word-wrap:break-word}.code-annotation-container-hidden{display:none !important}dl.code-annotation-container-grid{display:grid;grid-template-columns:min-content auto}dl.code-annotation-container-grid dt{grid-column:1}dl.code-annotation-container-grid dd{grid-column:2}pre.sourceCode.code-annotation-code{padding-right:0}code.sourceCode .code-annotation-anchor{z-index:100;position:relative;float:right;background-color:rgba(0,0,0,0)}input[type=checkbox]{margin-right:.5ch}:root{--mermaid-bg-color: #fdf6e3;--mermaid-edge-color: #999;--mermaid-node-fg-color: #657b83;--mermaid-fg-color: #657b83;--mermaid-fg-color--lighter: #7f949c;--mermaid-fg-color--lightest: #9cacb2;--mermaid-font-family: Lato, sans-serif;--mermaid-label-bg-color: #fdf6e3;--mermaid-label-fg-color: #468;--mermaid-node-bg-color: rgba(68, 102, 136, 0.1);--mermaid-node-fg-color: #657b83}@media print{:root{font-size:11pt}#quarto-sidebar,#TOC,.nav-page{display:none}.page-columns .content{grid-column-start:page-start}.fixed-top{position:relative}.panel-caption,.figure-caption,figcaption{color:#666}}.code-copy-button{position:absolute;top:0;right:0;border:0;margin-top:5px;margin-right:5px;background-color:rgba(0,0,0,0);z-index:3}.code-copy-button:focus{outline:none}.code-copy-button-tooltip{font-size:.75em}.code-copy-button>.bi::before{display:inline-block;height:1rem;width:1rem;content:"";vertical-align:-0.125em;background-image:url('data:image/svg+xml,');background-repeat:no-repeat;background-size:1rem 1rem}.code-copy-button-checked>.bi::before{background-image:url('data:image/svg+xml,')}.code-copy-button:hover>.bi::before{background-image:url('data:image/svg+xml,')}.code-copy-button-checked:hover>.bi::before{background-image:url('data:image/svg+xml,')}.panel-tabset [role=tablist]{border-bottom:1px solid #93a1a1;list-style:none;margin:0;padding:0;width:100%}.panel-tabset [role=tablist] *{-webkit-box-sizing:border-box;box-sizing:border-box}@media(min-width: 30em){.panel-tabset [role=tablist] li{display:inline-block}}.panel-tabset [role=tab]{border:1px solid rgba(0,0,0,0);border-top-color:#93a1a1;display:block;padding:.5em 1em;text-decoration:none}@media(min-width: 30em){.panel-tabset [role=tab]{border-top-color:rgba(0,0,0,0);display:inline-block;margin-bottom:-1px}}.panel-tabset [role=tab][aria-selected=true]{background-color:#93a1a1}@media(min-width: 30em){.panel-tabset [role=tab][aria-selected=true]{background-color:rgba(0,0,0,0);border:1px solid #93a1a1;border-bottom-color:#fdf6e3}}@media(min-width: 30em){.panel-tabset [role=tab]:hover:not([aria-selected=true]){border:1px solid #93a1a1}}.code-with-filename .code-with-filename-file{margin-bottom:0;padding-bottom:2px;padding-top:2px;padding-left:.7em;border:var(--quarto-border-width) solid var(--quarto-border-color);border-radius:var(--quarto-border-radius);border-bottom:0;border-bottom-left-radius:0%;border-bottom-right-radius:0%}.code-with-filename div.sourceCode,.reveal .code-with-filename div.sourceCode{margin-top:0;border-top-left-radius:0%;border-top-right-radius:0%}.code-with-filename .code-with-filename-file pre{margin-bottom:0}.code-with-filename .code-with-filename-file{background-color:rgba(219,219,219,.8)}.quarto-dark .code-with-filename .code-with-filename-file{background-color:#555}.code-with-filename .code-with-filename-file strong{font-weight:400}.reveal.center .slide aside,.reveal.center .slide div.aside{position:initial}section.has-light-background,section.has-light-background h1,section.has-light-background h2,section.has-light-background h3,section.has-light-background h4,section.has-light-background h5,section.has-light-background h6{color:#222}section.has-light-background a,section.has-light-background a:hover{color:#2a76dd}section.has-light-background code{color:#4758ab}section.has-dark-background,section.has-dark-background h1,section.has-dark-background h2,section.has-dark-background h3,section.has-dark-background h4,section.has-dark-background h5,section.has-dark-background h6{color:#fff}section.has-dark-background a,section.has-dark-background a:hover{color:#42affa}section.has-dark-background code{color:#ffa07a}#title-slide,div.reveal div.slides section.quarto-title-block{text-align:center}#title-slide .subtitle,div.reveal div.slides section.quarto-title-block .subtitle{margin-bottom:2.5rem}.reveal .slides{text-align:left}.reveal .title-slide h1{font-size:1.6em}.reveal[data-navigation-mode=linear] .title-slide h1{font-size:2.5em}.reveal div.sourceCode{border:1px solid #93a1a1;border-radius:4px}.reveal pre{width:100%;box-shadow:none;background-color:#fdf6e3;border:none;margin:0;font-size:.55em}.reveal code{color:var(--quarto-hl-fu-color);background-color:rgba(0,0,0,0);white-space:pre-wrap}.reveal pre.sourceCode code{background-color:#fdf6e3;padding:6px 9px;max-height:500px;white-space:pre}.reveal pre code{background-color:#fdf6e3;color:#657b83}.reveal .column-output-location{display:flex;align-items:stretch}.reveal .column-output-location .column:first-of-type div.sourceCode{height:100%;background-color:#fdf6e3}.reveal blockquote{display:block;position:relative;color:#b8c4c9;width:unset;margin:var(--r-block-margin) auto;padding:.625rem 1.75rem;border-left:.25rem solid #b8c4c9;font-style:normal;background:none;box-shadow:none}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:block}.reveal .slide aside,.reveal .slide div.aside{position:absolute;bottom:20px;font-size:0.7em;color:#b8c4c9}.reveal .slide sup{font-size:0.7em}.reveal .slide.scrollable aside,.reveal .slide.scrollable div.aside{position:relative;margin-top:1em}.reveal .slide aside .aside-footnotes{margin-bottom:0}.reveal .slide aside .aside-footnotes li:first-of-type{margin-top:0}.reveal .layout-sidebar{display:flex;width:100%;margin-top:.8em}.reveal .layout-sidebar .panel-sidebar{width:270px}.reveal .layout-sidebar-left .panel-sidebar{margin-right:calc(0.5em*2)}.reveal .layout-sidebar-right .panel-sidebar{margin-left:calc(0.5em*2)}.reveal .layout-sidebar .panel-fill,.reveal .layout-sidebar .panel-center,.reveal .layout-sidebar .panel-tabset{flex:1}.reveal .panel-input,.reveal .panel-sidebar{font-size:.5em;padding:.5em;border-style:solid;border-color:#93a1a1;border-width:1px;border-radius:4px;background-color:#f8f9fa}.reveal .panel-sidebar :first-child,.reveal .panel-fill :first-child{margin-top:0}.reveal .panel-sidebar :last-child,.reveal .panel-fill :last-child{margin-bottom:0}.panel-input>div,.panel-input>div>div{vertical-align:middle;padding-right:1em}.reveal p,.reveal .slides section,.reveal .slides section>section{line-height:1.3}.reveal.smaller .slides section,.reveal .slides section.smaller,.reveal .slides section .callout{font-size:0.7em}.reveal.smaller .slides section section{font-size:inherit}.reveal.smaller .slides h1,.reveal .slides section.smaller h1{font-size:calc(2.5em/0.7)}.reveal.smaller .slides h2,.reveal .slides section.smaller h2{font-size:calc(1.6em/0.7)}.reveal.smaller .slides h3,.reveal .slides section.smaller h3{font-size:calc(1.3em/0.7)}.reveal .columns>.column>:not(ul,ol){margin-left:.25em;margin-right:.25em}.reveal .columns>.column:first-child>:not(ul,ol){margin-right:.5em;margin-left:0}.reveal .columns>.column:last-child>:not(ul,ol){margin-right:0;margin-left:.5em}.reveal .slide-number{color:#4ca2df;background-color:#fdf6e3}.reveal .footer{color:#b8c4c9}.reveal .footer a{color:#268bd2}.reveal .footer.has-dark-background{color:#fff}.reveal .footer.has-dark-background a{color:#7bc6fa}.reveal .footer.has-light-background{color:#505050}.reveal .footer.has-light-background a{color:#6a9bdd}.reveal .slide-number{color:#b8c4c9}.reveal .slide-number.has-dark-background{color:#fff}.reveal .slide-number.has-light-background{color:#505050}.reveal .slide figure>figcaption,.reveal .slide img.stretch+p.caption,.reveal .slide img.r-stretch+p.caption{font-size:0.7em}@media screen and (min-width: 500px){.reveal .controls[data-controls-layout=edges] .navigate-left{left:.2em}.reveal .controls[data-controls-layout=edges] .navigate-right{right:.2em}.reveal .controls[data-controls-layout=edges] .navigate-up{top:.4em}.reveal .controls[data-controls-layout=edges] .navigate-down{bottom:2.3em}}.tippy-box[data-theme~=light-border]{background-color:#fdf6e3;color:#657b83;border-radius:4px;border:solid 1px #b8c4c9;font-size:.6em}.tippy-box[data-theme~=light-border] .tippy-arrow{color:#b8c4c9}.tippy-box[data-placement^=bottom]>.tippy-content{padding:7px 10px;z-index:1}.reveal .callout.callout-style-simple .callout-body,.reveal .callout.callout-style-default .callout-body,.reveal .callout.callout-style-simple div.callout-title,.reveal .callout.callout-style-default div.callout-title{font-size:inherit}.reveal .callout.callout-style-default .callout-icon::before,.reveal .callout.callout-style-simple .callout-icon::before{height:2rem;width:2rem;background-size:2rem 2rem}.reveal .callout.callout-titled .callout-title p{margin-top:.5em}.reveal .callout.callout-titled .callout-icon::before{margin-top:1rem}.reveal .callout.callout-titled .callout-body>.callout-content>:last-child{margin-bottom:1rem}.reveal .panel-tabset [role=tab]{padding:.25em .7em}.reveal .slide-menu-button .fa-bars::before{background-image:url('data:image/svg+xml,')}.reveal .slide-chalkboard-buttons .fa-easel2::before{background-image:url('data:image/svg+xml,')}.reveal .slide-chalkboard-buttons .fa-brush::before{background-image:url('data:image/svg+xml,')}/*! light */.reveal ol[type=a]{list-style-type:lower-alpha}.reveal ol[type=a s]{list-style-type:lower-alpha}.reveal ol[type=A s]{list-style-type:upper-alpha}.reveal ol[type=i]{list-style-type:lower-roman}.reveal ol[type=i s]{list-style-type:lower-roman}.reveal ol[type=I s]{list-style-type:upper-roman}.reveal ol[type="1"]{list-style-type:decimal}.reveal ul.task-list{list-style:none}.reveal ul.task-list li input[type=checkbox]{width:2em;height:2em;margin:0 1em .5em -1.6em;vertical-align:middle}div.cell-output-display div.pagedtable-wrapper table.table{font-size:.6em}.reveal .code-annotation-container-hidden{display:none}.reveal code.sourceCode button.code-annotation-anchor,.reveal code.sourceCode .code-annotation-anchor{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;color:var(--quarto-hl-co-color);border:solid var(--quarto-hl-co-color) 1px;border-radius:50%;font-size:.7em;line-height:1.2em;margin-top:2px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none}.reveal code.sourceCode button.code-annotation-anchor{cursor:pointer}.reveal code.sourceCode a.code-annotation-anchor{text-align:center;vertical-align:middle;text-decoration:none;cursor:default;height:1.2em;width:1.2em}.reveal code.sourceCode.fragment a.code-annotation-anchor{left:auto}.reveal #code-annotation-line-highlight-gutter{width:100%;border-top:solid var(--quarto-hl-co-color) 1px;border-bottom:solid var(--quarto-hl-co-color) 1px;z-index:2}.reveal #code-annotation-line-highlight{margin-left:-8em;width:calc(100% + 4em);border-top:solid var(--quarto-hl-co-color) 1px;border-bottom:solid var(--quarto-hl-co-color) 1px;z-index:2;margin-bottom:-2px}.reveal code.sourceCode .code-annotation-anchor.code-annotation-active{background-color:var(--quarto-hl-normal-color, #aaaaaa);border:solid var(--quarto-hl-normal-color, #aaaaaa) 1px;color:#fdf6e3;font-weight:bolder}.reveal pre.code-annotation-code{padding-top:0;padding-bottom:0}.reveal pre.code-annotation-code code{z-index:3;padding-left:0px}.reveal dl.code-annotation-container-grid{margin-left:.1em}.reveal dl.code-annotation-container-grid dt{margin-top:.65rem;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;border:solid #657b83 1px;border-radius:50%;height:1.3em;width:1.3em;line-height:1.3em;font-size:.5em;text-align:center;vertical-align:middle;text-decoration:none}.reveal dl.code-annotation-container-grid dd{margin-left:.25em}.reveal .scrollable ol li:first-child:nth-last-child(n+10),.reveal .scrollable ol li:first-child:nth-last-child(n+10)~li{margin-left:1em}html.print-pdf .reveal .slides .pdf-page:last-child{page-break-after:avoid}.reveal .quarto-title-block .quarto-title-authors{display:flex;justify-content:center}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author{padding-left:.5em;padding-right:.5em}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:hover,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:visited,.reveal .quarto-title-block .quarto-title-authors .quarto-title-author a:active{color:inherit;text-decoration:none}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-name{margin-bottom:.1rem}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-email{margin-top:0px;margin-bottom:.4em;font-size:.6em}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-author-orcid img{margin-bottom:4px}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-affiliation{font-size:.7em;margin-top:0px;margin-bottom:8px}.reveal .quarto-title-block .quarto-title-authors .quarto-title-author .quarto-title-affiliation:first{margin-top:12px}html *{color-profile:sRGB;rendering-intent:auto}/*# sourceMappingURL=f95d2bded9c28492b788fe14c3e9f347.css.map */