Vensim SIR modeling primer

I’ve added an SIR modeling primer video to the Vensim coronavirus page, where you can download the models and the software.

This illustrates most of the foundations of the community coronavirus model. Feel free to adapt any of these tools for education or other purposes (but please respect the free Vensim PLE educational license and buy a paid copy if you’re doing commercial work).


9 thoughts on “Vensim SIR modeling primer”

  1. Many thanks Tom. Very helpful and instructive, indeed. I checked the model assumptions (v8) with and the discussion of their base assumptions after yesterday’s update.

    R0: 2.4 – 3.3 The 3.3 is considered to be probably too high (They state that 3.3 requires 66% reduction in contacts is needed to stop the spread which is exactly how the model reacts when changing “Potential Isolation Effectiveness”)
    Incubation time: 1 – 14, median 5.5 which confirms the model (5 days)

    There are three areas where I think more structure would be beneficial to capture the specific properties of the coronavirus:
    – Age cohorts and herd immunity.
    So far, especially the data from Italy shows a clear dependency of mortality on age:
    age 0-29: 0%
    30-49: 0.1%
    50-59: 0.6%
    60-69: 2.7%
    70-79: 9.6%
    80-89: 16.6%
    90+: 19%
    Policies to specifically inhibit interaction with the elderly (contact density) should make a difference re mortality, while the recovered younger ones drive herd immunity up. I think the ratio of recovered in the total population drive should drive down the transmission rate or more indirectly R0.

    – The hospital strain is the key factor everyone seems to be managing against. The model currently simplifies the challenge by measuring on one Strain, where actually there is an aging chain with strain levels at each step. RKI provides the following times to calculate hospital load:
    4 days from infection to pneumonia
    3 days from pneumonia to hospital admission
    1 day hospital admission to ICU/ARDS
    for a total 8 days, some studies put the total up to 10 days.
    Total stay in hospital: 7-14 (median 10) WHO: medium cases median 14, severe 21-42 days but all cases usually do not need ICU/ARDS for more than 4-5 days.
    Key constraint are the ARDS units. Theoretical hospital capacity for Germany would be 500 but for ICU 25 and for ventilators 30. (US if I get the numbers correct 350, 30 and 20. How much of this is actually free for CV patients once ops are readjusted is to be seen, from my modeling work in hospitals I would say more than people expect.

    – After infection people are infectious for four days, at maximum eight. I think this is different to sars and makes it much easier to push patients after ARDS to even decentral stations, for instance from the civil defense infrastructure. In the model Infection Duration is set at seven which is high but at the same time underestimates the load on the hospitals.

    The Fraction Requiring Hospitalization is set at .1 in the model. This seems to be an area of significant uncertainty. They are quoting studies from .03 to .15 (hospitalization equals some ARDS), probably at the lower end. Problem is that too many of the easy cases are not caught due to lack of proper testing. Indication is that globally about 80% of infections currently are not recorded. For Germany due to abundance of testing they do not see this currently as a relevant number but will change to statistical estimates from their flu models once tracking of case chains cannot be done any more. Fraction requiring ICU/ARDS is .01 to .06 with the same problem of figuring out the total case load.
    As long as testing is not done reliably, there is a hidden stream of cases which distorts parameter settings but not consistently so that is an issue especially as it makes comparing numbers between countries even more difficult.

    Lastly, in the default setting the model produces a pronounced peak. The RKI expects a peak load from June to August which might point to a lower R0 or that they know which behavior changing policies they will tell the government to implement.

    Lastly, but this is far beyond the scope of the model, personnel shortages will impose further restrictions and it is not clear if enough consumables will be available.

  2. BTW the proportion of recovered in the population does implicitly drive down the transmission rate in the SIR framework. Since Susc = Pop – Inf – Recov, and infections = b*Inf*Susc/Pop, high recov implies low susc. Initially, the transmission rate is ~= b, since Susc/Pop ~= 1, but later it falls to b*Susc/Pop < b. If I lower R0 to 2.2, I get a peak July 18. When you say hospital capacity in Germany = 500, is that 500k persons in treatment?

  3. Many thanks for pointing this out – I missed Fraction Susceptible. Looking at models after midnight I also forgot to point out that the numbers they provide come with a pincher of salt as they are heavily influenced by initial Chinese studies and are not yet confirmed by European or American studies.

    I was rebasing the German numbers to the 100k population size. 500 would be the number of beds in hospitals currently used for treatments, 600 the number of beds available. How much of those can be freed would give you Hospital Capacity (as defined in the variable description). I know the hospital system did recently process a load of 400 Serious Cases of flu in three months during normal operations.

  4. Got it. You have >twice the beds we do, I guess due to more aggresive shifting of load to outpatient procedures, which won’t help us much now.

    Re R0 – thought I posted this thought already but can’t find it – I think this is a good study:
    Time-varying estimates of R0, from a deep dive into the timing of individual case reports:
    Values vary, but pre-intervention tends to be high for Europe. Strangely low for US.

    Here’s one point from Wuhan:
    Evolving Epidemiology and Impact of Non-pharmaceutical Interventions on the Outbreak of Coronavirus Disease 2019 in Wuhan, China
    “The effective reproductive number dropped from 3.86 (95% credible interval 3.74 to 3.97) before interventions to 0.32 (0.28 to 0.37) post interventions. “

    The testing biases make it pretty hard to know. I fit the model to Italy and Switzerland time series, which gives R0=5. That’s alarming, but I think a lot of it is an illusion from test expansion.

  5. Many thanks for links. Alas, I contacted the author of the first to reconfirm the numbers for Germany. I think there is a glitch.

    R0, cross-border travel and testing comprehensiveness: Austria did not close two ski resorts for two weeks which caused about half of the Norwegian cases… Austria itself is currently reporting fewer cases than Norway.

    1. Good to know of the glitch. Do you think it’s general, or Germany-specific?

      Our ski areas just closed yesterday. That feels early to people here, with only 5 cases in Montana, but probably was late.

  6. There seems to be another important factor which is not represented in the model which is testing. The way the model is set-up the status of all subjects is known. Which unfortunately is not the case. As soon as not all infected and all their direct contacts are known, tested and quarantined, there is a stock of Unknown Infected and then Unknown Recovered and Unknown Exposed. These Unknowns will reduce the effectiveness of isolation measures (Isolation effectiveness). (If isolation measures include lock-downs of regions then Contact Density Decline would need to be impacted simultaneously). Diagnostic testing as described above will only capture Unknowns if they have been a direct contact of a known, only severe Unknown cases show up at the hospital. Surveillance testing is required to get some understanding of the true account of Infected and Recovered in society which then impacts the Transmission Rate.

    As an aside I am not sure that the name Isolation Effectiveness conveys the effect of the node best. The descriptions mentions a fractional reduction but if I am not mistaken, the reduction is always so significant that it pushes the peak of the infections out in time but not in strength or shape. Public Health Capacity Sensitivity seems to have no impact.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.