Modelling an epidemic using simulated networks

Conceptual basis

When the word “model” is used it is important to distinguish between theoretical and empirical models. Empirical models attempt to fit equations to emerging (or to well established) data. Theoretical models are underlying thought tools. They are used to think more deeply about an emerging epidemic than might be possible without the use of any model. However they do not produce quantitative results. In contrast an empirical model can make quantitative predictions, at least with respect to the short term future. Theoretical models are expressions of how the whole epidemic might “pan out”. The qualitative prediction of the pattern is predicated on assumptions being at least partially met In this sense, theoretical models are almost purposely designed to be “wrong”. As they are deliberately overly simplified they allow their simplified assumptions to be tested and opened to criticisism.

Conceptualising an epidemic

The response to the SARS-Cov-2 pandemic has been defined by the manner in which competing models have been defended as the “correct” way to regard the phenomena under investigation. In fact a very wide range of models may be produced using the same underlying framework. Some commentators have adopted models as representing the “true” nature of the epidemic. This is unhelpful. Using models within a heuristic (what if?) framework could have helped to produce a much less divisive approach to modelling. Heuristic models cannot make quantitative predictions. They simply predict patterns. The patterns can be matched with reality to evaluate the likely underlying processes producing them. As reality is a complex hybrid of multiple possible models, no single model can provide a precise match.

A bestiary of possible models

Panmixia

To reproduce the classic SIR results the model can be setup with long distance links between the nodes. This ensures that the epidemic can spread throughout the whole susceptible population. The notable result of complete panmixia is the speed at which the epidemic (outbreak) rises and falls. If the population is completely susceptible at the outset the epidemic ends when the whole population has become infected and subsequently removed from the pool of susceptible through either recovery with immunity or death. Such an epidemic typically lasts weeks rather than months.

Moving front

If long distance connections are removed the panmixia assumption is not met. The consequence of this is to add more structure into the spread of the epidemic. This structure may be spatial or more conceptual in nature, as the social connections may not be defined by strict geographical proximity. The outbreak now takes more time to move through the population, even with the same intrinsic transmission between linked individuals. Contact tracking and tracing would identify this form of spread and could potentially mitigate and/or supress it in the early stages.

Effective lockdown (rapid supression)

The model can reproduce the expected result of successful repression if links are removed early on the progression of the epidemic. This is simulated by a break point in which the network is rebuilt with many fewer linkages. The outbreak declines following this measure being adopted. However, this model assumes a successful lockdown. If lockdown measures are ineffective in completely suppressing the virus the subsequent results will simply follow one of the patterns shown by any other model with population of susceptible individuals “seeded” with infection.

Fast waning immunity

If immunity is assumed to be very short lived the model can reproduce multiple waves of infection that occur after the first outbreak. To reproduce this the assumption has to be made that almost all the population that were initially infected lose their immunity in a relatively short space of time. These waves do not occur if only a minority of those infected are restored to the susceptible population, as herd immunity prevents them from re-occurring.

Initial blocking immunity

If a substantial proportion of the population are initially immune the epidemic can only spread if transmission between linked individuals is very high. If this is not the case then herd immunity supresses all possibility of spread early on. With high levels of “blocking” immunity a highly transmissible virus eventually finds pathways to spread to the susceptible population, but the epidemic trajectory can be slower. In many respects this hard to distinguish from the pattern produced by an effective lockdown.

Implementation as Netlogo models

Netlogo provides a framework for heuristic (theoretical thought tool) modelling of a wide range of phenomena. Models built using netlogo represent a simplified reality. Within this context it is important to accept that a very wide range of possible outcomes can arise frome the same underlying model though alterations to parameters. This is distinct from empirical models where changes in parameters alter quantitative predictions. Changes in the parameters of a mechanistic model alter the whole behaviour, in unpredictable ways.

The model used here can be pulled from https://github.com/dgolicher/netlogomodels

This is a very simple extension of the epidemic model example included in the netlogo model library. Individuals agents in the netlogo model are linked together to form a network. This can be conceptualised as consisting of spatially explicit connections or links though a social network. The mean number of connections can be established at the outset of the model run. “Long distance” connections are those between non proximate agents. The consequences of lockdowns and other social distancing measures can be simulated by removing long distance connections and reducing the number of connections between neighbouring nodes on the network.

The classic SIR framework

The classic SIR model uses three compartments. A simple extension is to add a compartment representing exposed but not yet infectious (SEIR).

S = Susceptible fraction at risk
I = Infected and infectious fraction
R = Removed fraction (either dead or immune)

\(\frac {dS}{dt} = - \beta SI\)

\(\frac {dI}{dt} = \beta SI- \gamma\)

\(\frac {dR}{dt} = \gamma I\)

In the classic model \(\beta\) is a single parameter that represents transmissibility. The rate of “spread” is determined by proportion of the population that is susceptible multiplied by the proportion infected multiplied by \(\beta\). However this is clearly a gross simplification which makes the SIR a blunt instrument for predictive modelling. In the words of Sunetra Gupta \(\beta\) is a complex “jumble of parameters” that includes many unmeasurable elements. \(\beta\) is a “known unknown”. It is neither a single property of the virus causing the disease nor is it a single property of the affected population. The jumble of parameters are all acting in synergy. They are the result of the combined properties of both the virus and the population. All parameters vary over the course of an outbreak.

In order to at least think through some of the possible implications of the SIR, this complex \(\beta\) jumble can be broken down into two definable components. The probability of transmission is clearly some function of the number of contacts each person makes in the course of a model time step (day) and the probability that a contact leads to transmission. Let’s call these \(\beta_1\) (mixing) and \(\beta_2\) (transmissability)

\(\beta =f(\beta_1,\beta_2)\)

The simplest function is to multiply the two components together to produce a joint probability.

\(\beta =\beta_1 \beta_2\)

To add to the complexity, each of these parameters should be described as a probability distribution for the population, rather than as a single number. The simple SIR model takes the mean value for the distribution. Unless this aspect is being considered the impact of heterogeneity, which leads to “super spreading”, is being ignored. A further layer of complexity is added when the nature of the network of contacts that lead to mixing is being considered.

The \(\gamma\) parameter has received curiously little attention during this pandemic. The factors directly influencing “spread” have been more directly addressed. However \(\gamma\) has just as much influence on \(R_0\) and the \(\beta\) jumble. \(\gamma\) represents the fraction of the infectious component being removed from “play” per time step. This is also highly complex. It is yet another jumble. Removals may occur through death, recovery or complete isolation from any possible contact with susceptibles. Note that partial isolation would in fact affect \(\beta_1\) under this framework for thought.

An intuitive manner to consider gamma is to use its reciprocal, 1/\(\gamma\) .This represents the number of day that an infectious individual remains infectious before removal, though recovery with immunity, complete isolation or death.

Under the classic (oversimplified) SIR model an approximation for \(R_0\) is available

\(R_0 \approx \frac{\beta}\gamma\)

As \(R_0\) depends on both the \(\beta\) and \(\gamma\) jumbles there is no single \(R_0\) for “the virus”. The \(R_0\) depends on the properties and behaviour of the population and on the characteristics of the virus. These are also highly mutable as an epidemic progresses. If individuals mix freely and frequently in environments in which transmission is likely then \(R_0\) will be high. If measures are taken to reduce contact then \(R_0\) falls. However this also depends on \(\beta_2\) and \(\gamma\). Any measures that alters the number of days that an infected individual can infect susceptible (\(\frac{1}\gamma\) ) will have an effect on \(R_0\).

It is also important to be aware of the key difference between \(R_0\) and the time variant rate of transmission \(\frac {dI}{dt}\), as some commentators on covid refer to this as R. \(R_0\) only applies for a totally susceptible population. The observed rate of transmission \(\frac {dI}{dt}\) changes in a fairly predictable manner as the epidemic progresses, as it is also a function of the fraction susceptible and the fraction infected. It can be observed and measured. In contrast \(R_0\) is not only unknown, it is unmeasurable. A very rough approximation of \(R_0\) can only be inferred through knowledge of the complete SIR parameter jumble. Expressions of certainty regarding the value of what has to be considered as a “known unknown” (and in fact a “known unknowable”) has been an unfortunate feature of the epidemic.

As all these parameters are unknown, then the herd immunity threshold is also unknown. Under the SIR it is commonly assumed to be

\(HIT = 1 - \frac 1 R_0\) where \(R_0 \approx \frac \beta \gamma\)

Despite the completely unquantifiable nature of all the parameters, the SIR does provide a framework for thought as it has an underlying mechanistic basis. However, this framework should not be used for quantitative predictions as it cannot be effectively paramaterised.

Transmissibility of a new variant

If a new variant arises during the course of an epidemic it is impossible to even consider its \(R_0\), unless it is assumed to be a completely novel virus acting de novo on a completely susceptible population. This is because a fraction of the population has already been infected, making \(R_0\) still more poorly defined. However, the current rate of infection (\(\frac {dI}{dt}\)) can be observed. If a fraction of the population previously considered to be removed now become susceptible again (partial immunity) then \(\frac {dI}{dt}\) will increase. It will also increase if any changes occur that affect \(beta_1\) (mixing), \(beta_2\) (transmission) or days spent infectious 1/\(\gamma\). However an increase in transmission does not imply increased virulence.

Consider a virus that is in fact more virulent. The correct sense of the term virulent is a more pathogenic organism that causes more severe illness.

A more virulent virus is quite unlikely to increase \(\beta_1\) (mixing), as an infected person is more likely to be aware of infection and thus self isolate. It could potentially increase \(\beta_2\) (transmission) by increasing viral load and viral shedding (maybe through more coughing and sneezing), but that effect may be counteracted by the increased probability of self isolation. It may increase the number of days infectious (\(\frac{1}\gamma\)) if removals are through recovery, but would be likely to decrease the number of days infectious if the major cause of removal is death. So, a mild increase in virulence could be accompanied by increased transmission, while a major increase in virulence is likely to decrease transmission.

Through the same reasoning a less virulent virus is likely to increase \(\beta_1\) (mixing), decrease \(\beta_2\) (transmission) and will have ambiguous effects on \(\frac{1}\gamma\). This if variants are competing for hosts they will tend to gravitate towards an evolutionary “sweet spot” of intermediate virulence, which causes mild enough symptoms to keep the host mobile and prevent rapid loss from the infected fraction though death or enforced complete isolation, while ensuring enough viral shedding by the host during the potentially infective phase to be passed on. Changes in host behaviour that are independent of viral virulence can alter the equilibrium towards which virulence gravitates. Total, complete isolation of symptomatic individuals favours a virus which produces mild, preferably totally undetectable, symptoms so keeping its host mobile (i.e. increased \(\beta_1\)). Partial isolation, which results in isolation from the bulk of the susceptible population (in the sense of susceptible to infection, not death), but which brings the infected person into contact with individuals with lowered immunity will favour enhanced virulence within the setting in which individuals are brought into contact (increase in nosocomial \(\beta_2\)).