cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

coronavirus math

Fred_Kohlhepp
23-Emerald I

coronavirus math

I recall seeing a number of posts, someone developing the equations for the spread and decay of a disease.  Here we have a direct, practical use for this math.

 

Anybody?

1 ACCEPTED SOLUTION

Accepted Solutions
JeffH1
14-Alexandrite
(To:Fred_Kohlhepp)

So here is my SIR model of the novel corona virus outbreak.  It's built in Prime 6.0, but I've attached a PDF for those who don't have the latest version.  I welcome any constructive comments and corrections.  I pray that someone finds something wrong with this model, but fear that it is fairly accurate.  The results are disheartening.

View solution in original post

58 REPLIES 58

One old Mathcad-sheet

Epidemic.png

antivirus.png

Shouldn't Healthy plus Sick equal a constant 20,005 over the entire range?  Or, is too sensitive a subject right now to mention all the poor fictitious people who died? 😎

Yes, the original model for the development of the epidemic was the vector Dead. But we will not consider sad cases - and so there is a lot of sadness in the world now. We assume that the ill people have received immunity, no longer become infected and none of them died.

Epidemic-2.png

Sorry, I don't like this model, but it did give me a place to start.  Attached is my attempt, a Prime 6 file and the pdf of it.  Looks like we're in for a tough year!

Epidemic-Plot.png

Nice graph!

 

If you play with the "rate of infection," the number of people that each sick person infects per week, you can see why the health care professionals are begging us to "flatten the curve."  If the infection spreads more slowly the peak number of sick people is less so the hospitals don't get swamped.

CV2.JPGCV5.JPG

The timing of the pulse is also affected.  We can adjust these numbers as the data improves.

Update Prime six attached.

 

A common model for spread of disease is known as the SIR (Susceptible, Infected, Recovered) model (see https://services.math.duke.edu/education/ccp/materials/diffcalc/sir/sir2.html for example).  In practice there are many variants of this.  A significant problem with the coronavirus outbreak is that the number of infected is not well known - the recorded values may differ by an order of magnitude or more from the actual values (because many people with mild symptoms are not recorded).

 

Alan

This work was sparked by the desire to understand the basic dynamics of the COVID-19 Pandemic. With the exception of the Sigmoidal Incidence Model that was created, this work is mostly a review of existing research. This is not a formal paper and attribution to sources are sketchy. Epidemiological models are commonly stochastic, diffusive-spatial, network based, with heterogeneous sub-populations. However, the parameters of Dynamic Equation Models, such as SIR and SEIR, are more directly related to and interpretable as physical processes. The intent of this work was to build a simple epidemiological "toy model" to estimate the period before the peak infection and the total number of infected cases. The methodology employed was, first, the application of Dynamic Deterministic Discrete SIRD and SEIR Models to characterize infection data from Wuhan China, USA, UK, Italy, Spain, N. Korea, NY, FL, New Orleans. Next, a Sigmoidal Incidence Function was used to give an Empirical Transmission Model that closely models China's and S. Korea's Mitigation Policies. The Levenberg-Marquardt Method was used to extract the Empirical Epidemiological Parameters of the Epidemic Isolation Policies that were successfully employed by China and S. Korea. The insights gained from analysis of these successful interventions were then used to Analyze and Predict Results for the Mitigation Policies of the US, NY, & UK.

FDS
12-Amethyst
12-Amethyst
(To:ThomasKotowski)

Dear Thomas, thank you so much for this adaptable model and the link to Kaggle. Would it be much trouble to add the txt files to your post as this prevents some digging into the huge Kaggle website. I am sure we can learn a lot by modelling.

FDS
12-Amethyst
12-Amethyst
(To:ThomasKotowski)

Sorry Thomas I overlooked that the txt files were available on your website. Thanks again for this beautiful worksheet!

Could someone please post a pdf of this file; those of us without version 15 would like to see the math.

 

Thanks

FDS
12-Amethyst
12-Amethyst
(To:Fred_Kohlhepp)

Fred see attachment

Pdf of COVID-19 SEIR & SIR Sigmoidal Models4.xmcd

 

Program and Files are at: VXPhysics.com/COVID-19

https://www.washingtonpost.com/graphics/2020/world/corona-simulator/  

  

Any interesting model of infection here.  Maybe one of the animation-minded members would like to reproduce in MC.

ValeryOchkov
24-Ruby IV
(To:DJF)

If my university is transferred to distance learning (and this is quite likely), then I will develop a digital pandemic double with my students.

Distance working is a lot easier than it used to be.

 

I moved my simple model to EXCEL to gain formatting improvement over plotting; there are some interesting things to be learned.

ValeryOchkov
24-Ruby IV
(To:DJF)

2-Eng.png

Epidemia.png

regcurry
13-Aquamarine
(To:ValeryOchkov)

👍

 

Don't know why I am fretting so much about MATHCAD.  I am 77 with asthma.  If I get it, it will most likely put me in the ground; however, I was hoping for a less painful and quicker exit.  🤣

 

My main winter hobbies are tinkering with Mathcad and digital art with Procreate.  It's my attempt to ward off boredom and dementia...especially during this period of sequestration.

 

Take care all and stay healthy.

Reg

Now you (and I, and everybody else) have a new hobby--"Stay the F*uck at home".  We "old codgers" have a double reason for social distancing.

 

"Do not go gentle into that good night,

. . .

Rage, rage against the dying of the light"   Dylan Thomas

👍👍
Reg

One of the problems I had with JeffH's original model was the number of people who died.  Supposed experts are estimating deaths to be between 100,000 and 200,000; the model predicts significantly (order of magnitude) higher numbers.  I researched the infected history in my country (USA) and used that to try to "fix" the model.

Capture.JPG

By manipulating equation 2, rate of infection, we can use this data to estimate Ro, (=b/g) .  Since gamma is reasonably estimated (most infections except the tragic ones tend to run about two weeks) we can improve the model.  (At least that was my assumption.  If we have N measurements by using the change between measurements to estimate the rate of change of infection, and have N-1 measurements:

Capture1.JPG

Two observations were made:

  1. At the start, where the infected numbers are very small, the computation fails, and
  2. At the end of the measurement list there appears to be a definite downward trend; this corresponds to my country finally recognizing that there's a problem we need to address.

Discarding the front data, and recognizing the trend, I "guesstimated" a time-changing function for Ro (and therefore beta):

Capture2.JPG 

The mean value estimated from the data is Ro = 4.2, the value computed for the last data point is 1.7.  If we take that as the best mitigation value that can be achieved, the plot looks like this (vertical scale is millions):

Capture3.JPG

With the mitigation we should expect almost 5 million deaths with a third of the population still left unexposed. And the Infection doesn't begin to subside until July, done by end of August.

 

STAY SAFE MY FRIENDS!

 

Fred,

Thanks.  I downloaded your Mathcad Express file and downloaded Mathcad Express.  I was hesitant because it did not have an odesolve Block; however, you reminded me that finite differencing works also.  Thanks again for that.  The PTC people assure me that I have a permanent and legal installation of Mathcad 15 even though it displays this.  I have both my license and my product code.  Both installation procedures produce this display.

BD61D726-DE55-4855-BC67-C667E8C213E8.jpeg
I still don't have access to the help files, but that is no big deal since I have used Mathcad for so many years and it did retain access to the tutorials and Quick Sheets.  PTC support is looking at this issue for me.

 

Back to COVID-19.  I am basically an old hermit so the sequestration doesn't bother me much, but the future looks awfully dim now.  I am still looking at your worksheet to remind me of finite differencing techniques.  I may as well start looking at Express; it's one more thing to keep me out of mischief.

 

Stay safe and healthy.

Reg

 

Thanks again.

Reg

Reg,

 

Express ain't bad, but after using Mathcad 15 running Prime is frustrating even after all the iterations and Express (while it's free and let's you see even solve blocks and higher level results as long as you don't change anything) is doubly frustrating!  And learning a new editor (at my age!) is maddening.  (Vector index subscripts are still "[", but I miss "." for literal subscripts--"cntrl -" seems so clunky!)

 

But it's free and keeps me connected.

 

Last evening my town   experienced its first covid-19 fatality (with 49 known infections.)  As the songs permeating the internet tell us, "Stay the f*ck at home!"

 

Stay safe!  

 

Fred 🙂

👍
Reg
JeffH1
14-Alexandrite
(To:Fred_Kohlhepp)

So here is my SIR model of the novel corona virus outbreak.  It's built in Prime 6.0, but I've attached a PDF for those who don't have the latest version.  I welcome any constructive comments and corrections.  I pray that someone finds something wrong with this model, but fear that it is fairly accurate.  The results are disheartening.

Fred_Kohlhepp
23-Emerald I
(To:JeffH1)

Jeff,

 

BEAUTIFUL!!

What a delightful analysis (as an exercise, as a predictor of the situation, you're right--we're in deep sh*t.)

 

I do have questions:

  • On page 2 you set your population size to a million  (N := 10^6).  On page 7, after we have followed China and set R = 0.5, you calculate a susceptible population of SASD(365 day) = 329.9 M persons.
  • Thought I had another, but I can't remember or find it!

Your analysis reinforces my (much more basic) efforts; thanks for doing such a beautiful exercise on such a terrible issue.

 

Fred

Top Tags