Modelling Coronavirus

One should always be cautious of entering a field you know nothing about! However I wanted to understand better how epidemic models work since these are now the primary driver affecting government policy during the Coronavirus emergency.

The classic model of infectious diseases  dates back to the 1920s and is called the SIR  (Susceptible, Infectious & Recovered) model. This is well described in this article plus.maths.org on  which I base this post. Here is my (probably naive) interpretation of the SIR model:

During any  epidemic there are 3 groups of persons within a population.

S – Susceptible persons to infection

I – Those sick and infectious to others

R – Those who have recovered from infection or died

The rate of change of each group is as given by the following differential equations.

\frac{DS}{DT} = B - \beta \times S \times I - D \times S

\frac{DI}{DT} = \beta \times S \times I - g \times I - D \times I

\frac{DR}{DT} = g \times I - D \times R

where

B is the birth rate (births/day)

g is the recovery rate so that

\frac{1}{g}   is the infectious period in number of days

\beta is the contact rate (people/day)

D is the death rate (deaths/day)

One important number describes overall how serious any outbreak becomes – the basic reproduction rate – R_0 , which is equal to the average number of new infections passed on by each infected person at the beginning of an outbreak. This value naturally changes as the epidemic evolves.  It can also be changed by taking such measures as quarantining, and Social Distancing to reduce the contact rate, as currently imposed in the UK.

R_0 = \frac{\beta}{g}

If R_0 is > 1 then the disease will spread rapidly at first but will then peter out when  R_0 <1 .  Note that as more people get infected the initially large susceptible group reduces and as a consequence so does R_0 until it eventually falls below zero and the peak quickly decays.  That is why eventually epidemics will always end.

So let’s try to run this model for the UK under different scenarios. To make life easy we assume that the birth rate B and death rate D can be ignored as they are small compared to the overall population (60 million). We assume.

First infected person arrived in the UK say on February 1st 2020

  1. The infectious period is 5 day
  2. The contact rate is 0.5/day
  3. Therefore R_0 is 2.5

I coded up this model and started the simulation from day 1. I used Python even though I hate it. This is so that anyone else can run a simulation. Here are the initial results.

Fig 1: Coronavirus epidemic curve of infected cases and deaths per day for the UK population without mitigation efforts (days after first case) for the scenario described.

There is a rapid exponential rise in cases following an initial long quiet stage. The peak of the epidemic occurs about 62 days after the first cases but then rapidly collapses as the number of susceptible people quickly decline. The final number of deaths reaches a total of 271,500. At the end of the epidemic most of the population would have been infected but some lucky people remain unscathed by the virus. Out of a population of 60 million people about 5 million might escape being infected at all.

Fig 3. Change in susceptible and recovered  populations. Infections and deaths are per day. About 5 million people probably would escape coronavirus infection for a UK population of 60 million

Now suppose the government imposes a near lockdown in order to suppress the epidemic at day 30. This reduces the contact rate to 0.15/day shifting R_0 < 1. This has a dramatic effect on new cases but the long tail of infections is extended for several months. This means that any relaxation of lockdown measures will simply increase R_0 again within the next month thereby triggering a second epidemic and inducing a second lockdown etc.

Fig 4. Lockdown imposed at day 30 causes a rapid mitigation in cases – but for how long?

Can our economies survive such a series of stop go epidemic lockdowns until a vaccine becomes available in optimistically 10 months from now ?

Let’s hope that our governments actions  are based on far better scientific advice than mine, because otherwise their only alternative exit strategy is to simply let the epidemic run its course, but yet more painfully slowly by turning on and off lockdowns.

P.S. I hope I am totally wrong on this !

One possible motivation for lockdowns is to buy time in order to deploy more effective anti-viral drugs to greatly reduce the death rate.

This entry was posted in Health and tagged , . Bookmark the permalink.

34 Responses to Modelling Coronavirus

  1. alsomaninthemirror says:

    Clive, being as uninformed in these matters as you but not with your statistical prowess, from all the articles I have read, and there have been numerous, your final statements and the questions they pose, become most relevant. I doesn’t need me to point out that once a Government has taken the decision to let the virus “have its way” with the population and resorted to taking sensible measures only— protect the vulnerable, hand washing, social distancing, etcetera, the Politicians have been vilified by the Mass Media and branded “murders” and “uncaring” and have folded to the these accusations and changed to the “lock down” strategy. One end of these courses of action is seen in South Korea- test, test, test and lock down, producing a very flat graph. The other end is the Netherlands and Sweden who are seeing steeply rising “infection” rates and concomitant deaths and it will be a “race to the peak of the graph” whether these Governments fold and accept the “lock down” course of action. The supporters of each camp feel they are right and only time will tell…… BTW as you in this and other scenarios, computer modeling, used in isolation, as you point out is a really dodgy tool to base confident courses of action, as there is no real reliable data and much is based on assumption. Trying times. We shall see what transpires over the next 12 to 18 months. One hopes it’s not a deep economic depression or civil disobedience….

    • J Martin says:

      How steep the infection rate is doesn’t matter if the country concerned can handle the flow into its hospitals.

  2. Jonathan Martin says:

    The country to watch in my view is the Netherlands. They are going with a no lockdown approach. They have worked out that they need to increase their number of icu beds from 1100 to 2400 and are doing so. If this proves to be correct then the UK will only need about 8500 icu beds.

    As a result, the dutch will come out of this before many other countries, with a largely intact economy and with no more deaths than those countries using lockdowns and imploding economies.

  3. J Martin says:

    I see that my earlier comment with my full name is on hold, but my later comment with just my initial posts immediately.

  4. Clive, if you are ignoring D, how are you modelling the number of deaths in your red curve?

    • Clive Best says:

      I am only ignoring the small effect it has on the total massive groups of unaffected (Susceptible) and recovered groups. I think it can be included but with a small effect.

      Don’t forget that annual natural death rates in the UK are about 650,000 per year or over 50,000 per month.

      • Ah, OK, so you include D in the I equation but not in the other 2 equations. That makes sense if you want to look at the number of coronavirus deaths. But of course a lot depends on the value you choose for D.

        • Clive Best says:

          Exactly, and we have no idea on what D really is. However if you only test people in hospital then you will get a biased result. S. Korea and Germany imply a value of 1%, but it could even be lower.

  5. Hi Clive, it’s very good to hear from you and you’ve answered a lot of my practical questions. I know this is not what your article is about, and your model will probably work well for the next few weeks/months but I believe that the situation is more complicated in an important way. Covid is a respiratory virus, and, strangely, they all (except one) have one thing in common: they are much more common in winter than in summer.

    There’s something else. Epidemiologists and virologists almost all ignore an even more remarkable fact: these illnesses are more common in the Tropics year-round than they are in summers in eg Europe and N America.

    Here is a comment that I pasted below a couple of YouTube videos about S-I-R:

    Hi Supersimple, if you look at any common respiratory virus, it’s incredibly obvious that R, if it is to have meaning, must be affected by outdoor temperature. Many studies have shown this – Lidwell J. Hyg., Camb. (1965), 63, 427 was an early {and good} one. Does it make sense to use a model that doesn’t include temperature for any respiratory virus? And is there any other way to explain seasonality? (I say no!) See e.g. the pic of colds in the Netherlands 1925-26 plotted beside outdoor temp: https://oldwivesandvirologists.blog/epidemiology-of-respiratory-illness/

    Also see https://oldwivesandvirologists.blog/predicting-the-seasonality-of-covid/

    • Clive Best says:

      I think you are right. Normal flu and cold infections fall off rapidly in summer months. I suspect coronavirus should do the same. Interestingly the infection rate in the southern hemisphere (summer there) during February seemed to be much lower than the northern hemisphere. This may be changing as they enter Autumn and Winter.

      Why should they be more common in the Tropics ?

      • Clive, what we need is a good dataset to look at this whole question. There was a very good report at the end of last year in Nature, but the analysis is pretty much just describing in words what their graphs show – which is not very helpful.

        I’ve asked the authors for their datasets, which they say are available on any reasonable request, but I haven’t had a reply (in spite of their citing my paper!). You could possibly ask for it too, or get someone else to ask for it – maybe they would reply to you.

        Thx Patrick

      • Cytokinin says:

        The tropics have a moist atmosphere, so anything that is airborne in droplet form status around longer than in a dry atmosphere. This virus doesn’t seem to survive being dry to long.

        • Cytokinin, why should droplets stay airborne longer in a moist atmosphere? The opposite can happen, namely quite large droplets are produced in dry air, but they shrink and so stay airborne for long periods. This is also a function of the osmolytes in the drops which attract/retain a certain amount of water, so the drops stop shrinking once equilibrium is reached.

          But I don’t think there is any reason why droplets will stay airborne for longer in moist air.

          There are lots of papers about the stability of viruses in air – I’ve listed quite a few here:

          My point about the Tropics is fundamental – we need to explain the winter seasonality of ALL respiratory viruses (except parainfluenza type 3) before we can say anythnig sensible about Covid-19. Tropical observations rule out the main conventional explanations of seasonality.

    • Ron Clutz says:

      An important study of our experience with the covid19 pandemic shows that warmer, more humid weather works against transmission of the disease.  The paper is High Temperature and High Humidity Reduce the Transmission of COVID-19 by Jingyuan Wang, Ke Tang, Kai Feng and Weifeng Lv.
      My synopsis:https://rclutz.wordpress.com/2020/03/25/fight-coronavirus-with-global-warming/

      • Hi Ron, we know that high temperature and high humidity also reduce the transmission of influenza. Nevertheless, influenza is common in the Tropics. In fact, it circulates continuously in East and Southeast Asia, and spreads to temperate regions from this network. Moreover rhinovirus is more stable in humid conditions, but it also has clear winter seasonality, and is active in the Tropics.

        It seems that viruses can adapt pretty quickly to different climates.

        • Ron Clutz says:

          Thanks Patrick for points well taken. I am speaking in the context of nations at higher latitudes that are in equilibrium relative to infectious diseases, but vulnerable to outbreaks of new viruses. Where I live in Canada, we have winter outbreaks every year, but are protected by a combination of sanitary practices, health care system and annual vaccines, contributing to herd immunity.
          For example, 2018-19 was a slightly higher than typical year, with this pattern:

          A total of 946 hospitalizations were reported by CIRN-SOS sentinels this season (age ?16).

          A total of 137 (14%) ICU admissions and 65 (7%) deaths were reported.
          The seasonality is obvious, as is the social resilience, when we have the antibodies in place.
          I don’t know so much about seasonality of diseases in tropical places, except to note they tend more to wet/dry changes rather than hot/cold.
          More Canadian flu stats at
          https://www.canada.ca/en/public-health/services/publications/diseases-conditions/fluwatch/2018-2019/annual-report.html

        • Ron Clutz says:

          For comparison with Covid19, as of today Canada has

          10,019 Currently Infected Patients (Active Cases)

          9,899 (99%) in Mild Condition

          120 (1%) Serious or Critical

          ?resize=219%2C219

  6. Peter Mott says:

    Link to a tweet that has chart of infection in Beijing. Beijing is now about 2/3rd back to normal according to Michael Pettis a finance prof. who lives there. There was small resurgence but it has been sat upon. Of course Chinese data needs to be taken with a pinch of salt. https://twitter.com/peter_mott/status/1246012627324743680?s=20

    • Clive Best says:

      I don’t understand why COVID-19 hasn’t spread already across China like it has done everywhere else. Did they stop all travel – railways, air and road between cities for over 2 months, and why hasn’t it re-emerged again now that the lockdown has been loosened?

      • Data from China is extraordinary. Only 3 deaths yesterday. I can imagine that central government has said to local government “there must not be any more deaths from Covid. You will be held responsible for any deaths and dealt with appropriately”. The rational response is to say this old man died of a weak heart, this woman had asthma, this person fell down the stairs.

        On the other hand there is a serious point here: this is partly a harvesting effect of bringing forward the deaths of people who are already seriously sick.

        At this time of year I have heard that we expect around 10,500 people to die in the UK every week. Covid deaths are now hovering at around 40% of this level, so we are, so far, only a bit above the noise level.

        Asian flu is estimated to have killed 14,000 people in the UK by early 1958.

        (Sorry to be UK-centric but I happen to have some numbers for this country!)

  7. Hi Clive, to use an analogy that might work for you, to study respiratory viruses when you can’t properly explain their seasonality is like studying climate change when you can’t explain the ice ages (glacials).

    I’ve been trying to answer your question above for the last 9 years (evenings and weekends only). See the links above for my detailed conclusions, but briefly:

    It’s far warmer in the Tropics than e.g. here in the UK in the summer.

    Yet these bugs disappear from here in the summer, but not from there all the year around.

    If you were to say e.g. our immune systems are stronger here in the summer – then why aren’t they also stronger in the Tropics?

    Answer: the bugs are more more aggressive (read: less temperature sensitive) in the Tropics because they have to be to survive.

    Note that strains diverge in response to different selective pressures very quickly. Eg a paper in Nature a couple of days ago showed that there were different virus lineages in the lungs and in the throat within one patient! https://www.nature.com/articles/s41586-020-2196-x

  8. mdgreig says:

    Clive. This is a link to a paper on an SIR model for coronavirus fro Oxford University epidemiologists. They use distributions rather than fixed values for some of the model parameters. https://www.dropbox.com/s/oxmu2rwsnhi9j9c/Draft-COVID-19-Model%20%2813%29.pdf?dl=0

    • Clive Best says:

      Thanks – I have now read it. Their main point I believe is that they are saying we are much further down this epidemic than Neil Ferguson & co assume. In this case there are very many asymptotic cases such that he UK already has several million in the “recovered” group. That would mean the death rate is very small – a fraction of 1% and that we are already near the peak, in which case a lockdown is unnecessary.

      However, both groups have long running rivalry and past history.

      • Kevin says:

        Hi Clive, I am a relative newcomer to your blog – I really appreciate your informative posts on climate physics etc.

      • Kevin E says:

        Hi Clive
        As a newcomer to your blog, I really appreciate your posts on the physics of climate science. Many thanks for all the hard work.

        Regarding CV19, I started off by trying to match a simple SIR model to recorded deaths in various countries. This was nothing more than curious ‘fiddling’ but I could not match the data unless I had really small IFR (D) rates of fractions of 1%.

        Then I came across the Oxford group paper which has done formally the task I was attempting. They attempted to fit an SIR model to data from Italy and UK for 15 days following the 1st reported death. What strikes me about this is that their ‘best fits’ is that in the UK at 16th March, between 30 and 50% of the population in the UK would have already been infected. Niall Ferguson (Imperial), in a radio interview a few days ago, suggested a figure of about 3%. This is a huge difference with profound implications. If Oxford are ‘right’ then CV19 has a low IFR, and as you’ve pointed out the lockdown and subsequent destruction of the economy was not warranted. However, if Imperial is ‘right’ then CV19 has a high IFR and we are in this for a very long time.

        https://aatishb.com/covidtrends/ has produced a very nice tool that plots log weekly case or death rate against log cumulative case or death rate. Obviously, for the exponential growth rate phase of the virus, this would form a straight line.

        What I think is interesting is that the slope of the line, and thus (I assume) Ro is common to nearly all countries. It appears that China, Spain and Italy have ‘rolled over’. If we assume that the China data are mostly from Wu Han province where the population is about 10 million, then zero gradient peak occurred at about 2000 deaths or about 0.2% population. Italy and Spain both have populations of around 60 million, and the peaks in these cases were at about 12000 deaths – again about 0.2% population. If this apparent pattern is repeated in the UK, then we still have a week or 2 to go before the peak.
        If the UK, France and other countries also see this peak at about 0.2% population, does this provide any clues regarding whether the lock down is actually effective?

        Obviously, there are significant biases in both the reported cases and reported deaths. Reported cases are biased because only people with symptoms have been tested. Reported deaths are biased because we know test for CV. In the past, similar deaths would often have been reported as ‘old age’ or pneumonia (https://www.spectator.co.uk/article/The-evidence-on-Covid-19-is-not-as-clear-as-we-think). But I think it is the best data we have.
        ?

      • KevinE says:

        Hi Clive
        As a newcomer to your blog, I really appreciate your posts on the physics of climate science. Many thanks for all the hard work.
        Regarding CV19, I started off by trying to match a simple SIR model to recorded deaths in various countries. This was nothing more than curious ‘fiddling’ but I could not match the data unless I had really small IFR (D) rates of fractions of 1%.

        Then I came across the Oxford group paper which has done formally the task I was attempting. They attempted to fit an SIR model to data from Italy and UK for 15 days following the 1st reported death. What strikes me about this is that their ‘best fits’ is that in the UK at 16th March, between 30 and 50% of the population in the UK would have already been infected. Niall Ferguson (Imperial), in a radio interview a few days ago, suggested a figure of about 3%. This is a huge difference with profound implications. If Oxford are ‘right’ then CV19 has a low IFR, and as you’ve pointed out the lockdown and subsequent destruction of the economy was not warranted. However, if Imperial is ‘right’ then CV19 has a high IFR and we are in this for a very long time.

        https://aatishb.com/covidtrends/ has produced a very nice tool that plots log weekly case or death rate against log cumulative case or death rate. Thus for the exponential growth rate phase of the virus, this would form a straight line.

        There are significant biases in both the reported cases and reported deaths. Reported cases are biased because only people with symptoms have been tested. Reported deaths are biased because we know test for CV. In the past, similar deaths would often have been reported as ‘old age’ or pneumonia (https://www.spectator.co.uk/article/The-evidence-on-Covid-19-is-not-as-clear-as-we-think
        Given these caveats, what I find interesting is that the slope of the line, and thus (I assume) Ro is common to nearly all countries. It appears that China, Spain and Italy have ‘rolled over’. If we assume that the China data are mostly from Wu Han province where the population is about 10 million, then zero gradient peak occurred at about 2000 deaths or about 0.2% population. Italy and Spain both have populations of around 60 million, and the peaks in these cases were at about 12000 deaths – again about 0.2% population. If this apparent pattern is repeated in the UK, then we still have a week or 2 to go before the peak.
        If the UK, France and other countries also see this peak at about 0.2% population, does this provide any clues regarding whether the lock down is actually effective?
        ?

        • Clive Best says:

          Thanks Kevin,

          The Oxford paper is interesting but seems to have been ignored by the government who are focusing policy on the Imperial group. The key data are the number of people who have been infected without showing significant symptoms. This is the only way that there could be as many of 30% of UK population who have had CV-19. That is the reason we need the anti-body tests. However in the daily briefing just now Chris Witty stated that anti-bodies may only show up 3 weeks after the person “recovers”.

          However for the first time in Europe a test has been done on a sample of locals in a town in Lombardy. They found about 14% of those tested had anti-bodies. So this is a lower limit on the real figure – so maybe 20-30% may indeed be the real figure.

          Regarding IFR (D) these are he results that I calculated from the data based on declared cases and deaths for a sample of countries. Those that test the most have the lowest IFR.

          There is a huge range of values but the lower ones must be nearer the true IFR.

  9. Finn McCool says:

    Clive
    You are weeks behind the times in looking at SIR models 🙂
    Have a look at Kaggle.
    From a different perspective:
    If SARS-CoV-2 had not been identified, would anyone have noticed an increase in mortality rates?
    What exactly constitutes a ‘case’?.
    Is a ‘case’ based on a certain test?
    What is the test?
    As an aside, an infection of 5% of the population with a sensitivity of 99% and specificity of 94% would give a probability of 0.46 of testing positive and actually having a disease.
    An RT-PCR test costs roughly $300 and according to Lab Corp has a turnaround of 3 – 5 days. Are UK labs capable of using this test given volumes and costs to the NHS? How much cross-contamination will there be?
    Are then patients exhibiting Covid symptoms being misdiagnosed?
    Are patient moralities being misdiagnosed?
    Why was the status of Covid reduced from HCID by the UK Government?
    Why do UK mortality figures look anomalous compare to other countries?
    How do social distancing measures work when millions of us go to the supermarket every day and spread viruses through unwashed hands?
    Apologies if I sound sarcastic. But these are just a few questions I would ask before they cut off my Gas and Electric and throw me on the street for non-payment of rent.

    • Cytokinin says:

      In many ways you identify the problems with trying to model this epidemic. All data that I have seen are flawed in their collection, analysis and presentation. This is a classic case of rubbish in and rubbish out. In the UK, we do not accurately test. People who suspect they have the virus are not tested unless they are in hospital. I have two friends who both displayed all the correct symptoms and were very ill. Neither of them was sampled. I have also heard this from other sources. We are not routinely sampling random sections of the population to determine the baseline level of infection, so really have nothing on which to build a model except guesswork. It is as if we have been given a few pieces of a jigsaw puzzle and told to guess what the picture is.

      Another problem is death statistics. In the UK is we are now counting all deaths where the patient is covid-19 positive as having died of the virus. Car crash and covid19 positive is death by the virus? The figures for Scotland jumped by fifty percent when this method of counting was adopted. The previous figures did not distinguish between deaths where the primary cause was covid19 and deaths where this was a contributory factor. This may overestimate deaths from the virus by about 60%. The true death rate from the virus is probably about a quarter of that which is now recorded, but again it is impossible to say without more explanation accompanying the figures.

      The South Koreans with their extensive testing seem to provide the best figures for feeding into a model, but caution needs to be exercised, since their sampling probably underestimates the number of people who are covid19 positive, since a large percentage of the population seem to be virtually asymptomatic. Another problem is that Orientals seem to be more resistant to this virus than Caucasians, so any model based on their data is not going to accurately predict what happens in Europe.

      Yet another problem with trying to make a model is that the model assumes a single source was the instigating point for the epidemic, however a recent paper says that the virus almost certainly originated as a contamination from an as yet unidentified animal. Horseshoe bat has been implicated as an intermediary host. Had the virus nicely escaped from a lab then this would have been a one of event. However if the virus came from a wild or domestic animal population, then there is the possibility that it will continue to drip into the human population. This would affect the level of immunity that is needed to build up population immunity, since even when there are sufficient immune people in the population, non immune people will still be able to become infected from the animal population.

      The other day we learned of covid-19 infection in a tiger. We know that transmission from human to mouse, pig, bat, tiger and civet, can happen with the possibility of transmission to pets. We do not know if this could return to humans from these sources, but again this would complicate any model. It may also mean that in the absence of a vaccine, 100% of the population could eventually be infected. You might like to adjust your models to investigate these factors.

      In Scotland, the biting midges are famous in the warm wet Scottish summer. These insects, in their thousands, suck the blood of all passers-bye. They are also the preferred evening meal of the pipistrelle bats. So I will be interested to see if there is transmission in either direction. Will the bats warn each other off a dangerous zoonosis and stay indoors?

      I don’t know if this helps with anyone’s modelling. For the time being, I am sticking to the back of an envelope.

Leave a Reply