This is the 2nd part of a multi-part series blog post on modeling in epidemiology.
The COVID-19 pandemic has brought a lot of attention to the study of epidemiology and more specifically to the various mathematical models that are used to inform public health policies. Everyone has been trying to understand the growth or slowing of new cases and trying to predict the necessary sanitary resources. This blog post attempts to explain the foundations for some of the most used models and enlighten the reader on two key points.
After introducing the concepts of compartmentalization and disease dynamics in the first blog post, this second part is focused on developing a deterministic numerical solution for the SEIR model discussed there.
While normally the goal is to use real-world data to infer characteristics of the underlying disease (as will be done in later blog posts), here we want to use simulate the spread of a COVID-19 like disease in a population of 10000, and look at the effects of the different parameters on the spread.
A lot of research is ongoing into the COVID-19 characteristics of \(\beta\), \(\sigma\), and \(\gamma\).
However, these are complex studies that require a lot of data and so far we have little information to go on.
The literature suggests the following:
\(\underline{T_{Incubation}}\):
The mean is 5-6 days but it can range anywhere from 2-14 days 12
Another paper reports a mean incubation period of 5.2 days and the 95th percentile at 12.5 days 3.
There are reports of pre-symptomatic infections4, but these are reportedly rare 5 so in the following models we will assume: \[T_{Incubation} = T_{Latent}\] And so: \[\sigma = \frac{1}{5.2} days^{-1}\]
\(\underline{T_{Infectious}}\):
Again it is very difficult to say for sure and the period of communicability is very uncertain for COVID-19.
Research suggests a median of 20 days of viral shedding after onset of symptoms 6.
Ranging from 8 to 37 days in survivors.
While it is noted PCR positivity does not necessarily reflect the infectious period (virus may not be viable but the PCR amplification will result in a positive), for the purpose of this blog post we will assume the following: \[T_{Infectious} = T_{Clinical}\] To obtain an exponential distribution with median M, the scale A is calculated as follows: \[A = \frac{M}{\ln2} = \frac{20}{\ln2}\] This results in \[\gamma = \frac{\ln2}{20} = \frac{1}{28.85}\ days^{-1}\] * \(\underline{Beta= \beta}\):
While difficult to estimate this parameter as there is a lot of variation between countries, cultures, societal norms, etc.. a little thought experiment can help us evaluate the value for \(\beta = r\rho\) in Switerland or France for example.
If no control measures are put in place and people do not change habits (as is the case in this blog post), we can expect the following:
Qualitative analysis of \(\beta\), \(\sigma\), and \(\gamma\)
Effect of \(\sigma\) (\(T_{Latent}\))
Let’s have a look at the effect of \(\sigma\) (or inversely, the latent period) on the SEIR simulation.
A higher \(\sigma\) means shorter average latent period, and vice-versa.
Code
## Let's try to see how the model changes days =1000N =10000init =1-1/N, 1/N, 0, 0sigma_high =1# 1 --> Average 1 day from E --> I (ressembles SIR model)sigma_low =1/100#10 days on average, twice as long as COVID-19sigma_covid =1/5.2beta =0.5gam =1/28.85parms_fastEI = sigma_high, beta, gamparms_slowEI = sigma_low, beta, gamparms_avg = sigma_covid, beta, gam# Run simulationresults_fastEtoI = seir_model(init, parms_fastEI, days)results_slowEtoI = seir_model(init, parms_slowEI, days)results_avg = seir_model(init, parms_avg, days)
We notice a few things from the plot above on the impact of the average time from E → I:
The shorter the latent period:
the faster the epidemic propogates in the population
the higher the peak of infected individuals will be (meaning a higher chance hospital resources will be saturated)
However, the latent period has no impact on the total number of individuals infected over the entire time of the epidemic.
Effect of \(\beta = r~\rho\)
Let’s have a look at the effect of \(\beta\) on the SEIR simulation.
A higher \(\beta\) can either mean a higher average number of contacts per day (\(r\)) in the population and/or a higher probability of transmission of disease from I → S.
The opposite holds also.
Code
## Let's try to see how the model changes days =500N =10000init =1-1/N, 1/N, 0, 0sigma_avg =1/5.2beta_avg =0.5beta_noepi =1/30beta_low =0.1beta_high =4gam =1/28.85parms_avg = sigma_avg, beta_avg, gamparms_noepi = sigma_avg, beta_noepi, gam parms_low = sigma_avg, beta_low, gamparms_high = sigma_avg, beta_high, gam# Run simulationresults_avg = seir_model(init, parms_avg, days)results_noepi = seir_model(init, parms_noepi, days)results_low = seir_model(init, parms_low, days)results_high = seir_model(init, parms_high, days)
We notice a few things from the plot above on the impact of the infectious period:
The longer the infectious period:
the faster the epidemic propogates in the population
the higher the peak of infectious individuals will be and the longer it will last (meaning a higher chance hospital resources will be saturated)
As opposed to the latent period above, but similarly as \(\beta\), the infectious period has an impact on the total number of individuals infected over the entire time of the epidemic
With no epidemic if \(\gamma > \beta\)
Discussion
So we can see the latent and infectious periods, along with the value of \(\beta\) are critical components in how the model will react.
Worth noting also is that the higher \(R_0\) is, the faster the epidemic spreads and the higher the peak of infectious individuals will be (see further blog posts for some nuance on this).
Notably, and as predicted in part 1 of the blog series, no epidemic occurs if: \[R_0 < 1\] In other words, no epidemic if: \[\beta < \gamma\]
There are major flaws with this model however. While this model is deterministic and uses average time to model \(\sigma\) and \(\gamma\), this is a major flaw and does not represent the reality for most diseases.
Part 3 of this blog series will discuss this further.