Orbiter-Forum  

Go Back   Orbiter-Forum > Far Side of the Moon > Math & Physics
Register Orbinauts List Social Groups FAQ Projects Mark Forums Read

Math & Physics Mathematical and physical problems of space flight and astronomy.

Reply
 
Thread Tools
Old 04-26-2020, 07:33 AM   #1
Thorsten
Orbinaut
 
Thorsten's Avatar
Default Numerical Epidemics

While we've currently being bombarded with arguments based on R0 and fear of exponential growth in the news media, I eventually got curious why we do not see exponential growth in any country. Could it really be that they're all equally effective in containment procedures such as to reduce R0 to exactly 1 and get a roughly constant daily number of new infections (and an ever-decreasing growth percentage). Or is there more at play?

As a result of a discussion I had, I did what I usually do when a problem bothers me - I start doing some theory to research it.

So here's a piece of GPL-licensed software where you can simulate the spread of an epidemic for a population on a square grid - and do things like limit social contacts to the local environment rather than assume they're all across the grid.


See here for the download and a (growing) tutorial.

It's not overly sophisticated (yet), but you can already do a nice range of instructive scenarios. Here's a few pictures:

Exponential growth followed by logistic turnover - what you're used to seeing:



Dramatic slowdown by restricting mobility (a person is only allowed 80 social contacts rather than 40.000)



Spatial propagation of infection hotspots on the grid:



(The answer to the initial question is - exponential growth on large scale can't happen because populations can't mix fast enough and the local social contacts saturate too quickly to sustain it - thus even with no or insufficient containment measures, the model predicts an ever-decreasing daily grows percentage and a roughly constant daily number of new infections after an initial rapid growth phase - but you don't need to believe me, you can simply inspect the code and run it yourself ).
Thorsten is offline   Reply With Quote
Old 04-26-2020, 10:55 AM   #2
Urwumpe
Not funny anymore
 
Urwumpe's Avatar

Default

That is why the R0 is now getting more important, the measurement how many people a contagious person can inject.

Also, that the number of new infections stays constant or drops is not automatically a good achievement, since this could also happen by other causes - for example lack of testing capacity.

A cellular automata could maybe also model this well, by including testing rules.
Urwumpe is offline   Reply With Quote
Old 04-26-2020, 01:09 PM   #3
Thorsten
Orbinaut
 
Thorsten's Avatar
Default

Quote:
That is why the R0 is now getting more important, the measurement how many people a contagious person can inject.
Actually in the model R0 turns out to be a bad measure - what happens is that you try to fit an exponential to a function which is not an exponential (something we should have learned to avoid when making any fit) - you get something like a local slope of course, but it ceases to have the original interpretation and predictive power.

Quote:
Also, that the number of new infections stays constant or drops is not automatically a good achievement, since this could also happen by other causes - for example lack of testing capacity.
You'd notice by comparing with the two-week shifted death rates whether that happens (assuming deaths are generally harder to miss). There's such consistency checks you can run on the raw data.

Last edited by Thorsten; 04-26-2020 at 01:17 PM.
Thorsten is offline   Reply With Quote
Old 04-28-2020, 05:08 PM   #4
Thorsten
Orbinaut
 
Thorsten's Avatar
Default

My major insight today - we all know that opening up completely after a lockdown gets us necessarily back to exponential growth and a second wave of infections, right?

Actually not.



it's a possible outcome, but there's many scenarios in which the propagation of the infection is fundamentally changed after the lockdown and never picks up the prior speed no matter that the restrictions are no longer in place.

(Currently I'm implementing temporary measures and restrictions to the software - that's not published yet, but I'll make it available soon )
Thorsten is offline   Reply With Quote
Old 04-28-2020, 05:54 PM   #5
Urwumpe
Not funny anymore
 
Urwumpe's Avatar

Default

Well - technically it is still exponential growth, but the size of the population got reduced, that still can be infected. Thus, the net reproduction rate should be much lower.

Measles for example have a base reproduction rate of 15-18, but vaccinating 94% of the population reduces the net reproduction rate to less than one.

Would of course get interesting, how the plot would look like, if the immunity against SARS-CoV-2 gets lost after 6 months, as feared.
Urwumpe is offline   Reply With Quote
Old 04-29-2020, 05:44 AM   #6
Thorsten
Orbinaut
 
Thorsten's Avatar
Default

Quote:
Well - technically it is still exponential growth,
No, it's almost always a power law. The growth isn't scale-invariant, there's an intrinsic scale set by the number of potential social contacts of a person. People don't have a million friends, acquaintances, colleagues and shop-owners they visit, the true number is much lower.

Which is why it doesn't make sense to fit a base reproduction number to a power law - wrong functional form.

Quote:
but the size of the population got reduced, that still can be infected.
As you can easily convince yourself from the plot, there's hardly any growth during the lockdown in the plot (it's the flat part of the curve starting from day 300), so the size of the population that can still be infected is - to a few % accurac -the same before and after the lockdown.

So that's not it - the reason has to do with the spatial (de-)correlation of immune people with respect to the active spreading front - you can't see that without a grid.

Quote:
Would of course get interesting, how the plot would look like, if the immunity against SARS-CoV-2 gets lost after 6 months, as feared.
I'm not sure who fears such a thing... at least we seem to have moved on from 'never immune' though... But even while you're never technically getting completely immune to Herpes, it gets transformed from something really painful to a nuisance you hardly notice.

Anyway, as you can also convince yourself, in a steep growth scenario most people have become immune only recently.
Thorsten is offline   Reply With Quote
Old 04-29-2020, 07:30 AM   #7
Urwumpe
Not funny anymore
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by Thorsten View Post
 No, it's almost always a power law. The growth isn't scale-invariant, there's an intrinsic scale set by the number of potential social contacts of a person. People don't have a million friends, acquaintances, colleagues and shop-owners they visit, the true number is much lower.

Still you describe an exponential function. Even if you assume that there is just a low number of contacts that an contagious person does not share with the person who infected it, it is still an exponential function and no polynomial. The base is (relatively) constant (of course it should drop when more people are getting infected), while the exponent is a function of time.
Urwumpe is offline   Reply With Quote
Old 04-29-2020, 08:42 AM   #8
4throck
Enthusiast !
 
4throck's Avatar
Default

You guys are discovering the difference between academical discussion and reality
Scientific projections are always a simplification and a worst case scenario.

And cumulative curves are misleading. Just imagine a cumulative curve for more than 100 years of flu, with reinfections. Probably to total of cases would be higher than the total population.
It would be better to only consider active cases.
4throck is offline   Reply With Quote
Old 05-03-2020, 06:38 AM   #9
Thorsten
Orbinaut
 
Thorsten's Avatar
Default

Quote:
Still you describe an exponential function. Even if you assume that there is just a low number of contacts that an contagious person does not share with the person who infected it, it is still an exponential function and no polynomial. The base is (relatively) constant (of course it should drop when more people are getting infected), while the exponent is a function of time.
I know an exponential when I see one and I know a power law when I see one. An exponential has for instance a constant daily increase percentage, a power law has not.

It's a very simple an testable criterion - and it says 'no exponential'.

You can also try to get a good fit with an exponential - you'll fail miserably.


Quote:
You guys are discovering the difference between academical discussion and reality
In what way?

The starting point for me was that there's no exponential seen in nature, so I was very curious what needs to be added to a model to see that non-exponential behavior.

Quote:
It would be better to only consider active cases.
You can do that using the software at the simple expense of plotting a different column, but at least for me this didn't bring any novel insight (and makes it generally harder to see what the underlying dynamics is).
Thorsten is offline   Reply With Quote
Old 05-03-2020, 07:33 AM   #10
RisingFury
OBSP developer
 
RisingFury's Avatar
Default

If the virus infected 25% of the population and the the cured could not get reinfected, the average distance between a sick person and a susceptible one is increased significantly, but currently only a few percent of the population got infected with the new virus and we're not even sure you can't get reinfected. If we behave as if the epidemic is over, exponential growth will return.

Well, except in Sweeden. They just let the epidemic infect everyone
RisingFury is offline   Reply With Quote
Old 05-03-2020, 08:45 AM   #11
Urwumpe
Not funny anymore
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by Thorsten View Post
 I know an exponential when I see one and I know a power law when I see one. An exponential has for instance a constant daily increase percentage, a power law has not.

So, you would say that the atmospheric density is a linear function of altitude, because the approximation works fine sometimes?
Urwumpe is offline   Reply With Quote
Old 05-03-2020, 05:26 PM   #12
Linguofreak
Orbinaut
Default

Quote:
Originally Posted by Thorsten View Post
 I know an exponential when I see one and I know a power law when I see one. An exponential has for instance a constant daily increase percentage, a power law has not.

It's a very simple an testable criterion - and it says 'no exponential'.

You can also try to get a good fit with an exponential - you'll fail miserably.
On a semi log plot of actual COVID data, one generally sees significant stretches on a semi-log plot that fit well to a straight line, with curved transitions between straight sections with different exponents. Now, trying to fit *any* function to the entire curve will fail, but the curve tends to look like a piecewise combination of exponentials.
Linguofreak is offline   Reply With Quote
Old 05-06-2020, 10:38 AM   #13
Thorsten
Orbinaut
 
Thorsten's Avatar
Default

Quote:
Now, trying to fit *any* function to the entire curve will fail, but the curve tends to look like a piecewise combination of exponentials.
A semi-log plot is an extremely tolerant thing for visual inspection... The US Coronavirus outbreak wiki page has that optical trick plotted.

Here's the derivative of the same data (the daily number of new infections) from the same wiki page:



That's a constant with statistical fluctuations. When you integrate it, you get an approximately linear increase.

Whereas the derivative of an exponential function would be... an exponential.


Anyway - I at least know how exponential growth and its derivative looks like, if people insist in calling something that's manifestly not exponential an exponential, then it's a bad use of my time to convince them otherwise.


Quote:
If the virus infected 25% of the population and the the cured could not get reinfected, the average distance between a sick person and a susceptible one is increased significantly, but currently only a few percent of the population got infected with the new virus and we're not even sure you can't get reinfected. If we behave as if the epidemic is over, exponential growth will return.
Again, I have yet to see exponential growth in the real data for more than a few days in a row - the growth is self-quenching, the data screams that at you. Even in Sweden the speed of the spread is decreasing.

And - people have strong antibody response after 3 months (that's how long cases have been tracked) - and according to the people tracking these cases, there's no reason to think the response will decay quickly (i.e. within the next months). So I've yet to see any evidence of re-infection or faulty immunity - people getting well again is because they get immune - both are other words for 'antibody kills virus''.

Coming back to the model (which is what this thread is about) - that says that once you've slowed the first wave with a hard intervention, any further spread will be permanently slowed - and can be stopped dead with a comparatively low-level intervention.



It also says a relatively low number of prior immunity level (or from a first wave) is sufficient to make a big effect.

So I'm going to venture the guess that if we haven't seen much exponential growth till now, it's unlikely to 'return' in any way - especially now that people are more aware of the disease and a significant fraction is more careful.

For anyone who wants to give it a try - here's version 0.2 of the code for download.
Thorsten is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 03:48 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.
X vBulletin 3.8.11 Debug Information
  • Page Generation 0.11968 seconds
  • Memory Usage 5,568KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (13)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (41)option
  • (13)postbit_legacy
  • (13)postbit_onlinestatus
  • (13)postbit_wrapper
  • (5)showthread_similarthreadbit
  • (1)showthread_similarthreads
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • tag_fetchbit_complete
  • showthread_similarthread_query
  • showthread_similarthreadbit
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete