Serving the Quantitative Finance Community

 
User avatar
Paul
Topic Author
Posts: 6598
Joined: July 20th, 2001, 3:28 pm

Models for Covid-19 - analytics

March 26th, 2020, 9:18 pm

Continuing on from the numerical analysis thread...

Can solve for [$]I_i[$]:

[$]I_i(t)=e^{-\lambda t}\left( \lambda \int_0^t e^{\lambda \tau}S_i(\tau)d\tau-e^{\lambda t}S_i(t)+S_i(0)+I_i(0) \right).[$]

And then

[$]\frac{dS_i}{dt}=\left(\alpha-\frac{\beta}{N} \right)S_i\left( S_i- \lambda \int_0^t e^{\lambda (\tau-t)}S_i(\tau)d\tau -e^{-\lambda t}(S_i(0)+I_i(0))\right)\\ \qquad + \frac{\beta}{N}S_i\left( S- \lambda \int_0^t e^{\lambda (\tau-t)}S(\tau)d\tau -e^{-\lambda t}(S(0)+I(0))\right). [$]

Observe where there are and aren't subscripts.

When [$]\beta=0[$] there is total lockdown and you can integrate each [$]S_i[$] a bit. (*) Then you need to sum over all [$]i[$] and you'll get [$]I[$] which feeds into the [$]H[$] and [$]D[$] equations. Messy. So that's solve first then sum over [$]i[$].

When [$]\alpha=\frac{\beta}{N}[$] there is no lockdown. You can sum the [$]S_i[$] equations over all [$]i[$] and get the same result as in (*) but for the sum instead of individual households. So that's sum over [$]i[$] then solve. (The other way around from above.)

For other cases you can't solve/sum in either order because of the [$]S_i^2[$] term.
 
User avatar
Paul
Topic Author
Posts: 6598
Joined: July 20th, 2001, 3:28 pm

Re: Models for Covid-19 - analytics

March 26th, 2020, 9:49 pm

Or in two lines if I was able to concentrate(!):

[$]\left( \frac{S_i'}{S_i} \right)'+\lambda \frac{S_i'}{S_i}=\left(\alpha-\frac{\beta}{N} \right)S_i'+\frac{\beta}{N}S'.[$]

So

[$]\frac{S_i'}{S_i} +\lambda \ln(S_i)=\left(\alpha-\frac{\beta}{N} \right)S_i+\frac{\beta}{N}S +c_i,[$]

where

[$]c_i=\lambda \ln(S_i(0))-\left(\alpha-\frac{\beta}{N}\right) \left(S_i(0)+I_i(0)  \right)-\frac{\beta}{N}\left(S(0)+I(0)  \right).[$]

From this

[$](\ln(S_i/S_i(0)))'+\lambda \ln(S_i/S_i(0))=\\ \qquad\left(\alpha-\frac{\beta}{N} \right)S_i+\frac{\beta}{N}S-\left(\alpha-\frac{\beta}{N}\right) \left(S_i(0)+I_i(0)  \right)-\frac{\beta}{N}\left(S(0)+I(0)  \right).[$]

Which can (almost) be solved for those two extreme cases.
 
User avatar
Paul
Topic Author
Posts: 6598
Joined: July 20th, 2001, 3:28 pm

Re: Models for Covid-19 - analytics

March 26th, 2020, 11:15 pm

PROBABLY ERRORS IN ALL THIS

Simple case: [$]n[$] households infected the same [$]S^{(1)}[$] and the rest uninfected [$]S^{(0)}[$].

[$](\ln(S^{(0)}))'+\lambda \ln(S^{(0)})=\\ \qquad\left(\alpha-\frac{\beta}{N} \right)S^{(0)}+\frac{\beta}{N}\left(nS^{(1)}+(N-n)S^{(0)} \right)-\alpha.[$]

[$](\ln(S^{(1)}/(1-I^*)))'+\lambda \ln(S^{(1)}/(1-I^*))=\\ \qquad\left(\alpha-\frac{\beta}{N} \right)S^{(1)}+\frac{\beta}{N}\left(nS^{(1)}+(N-n)S^{(0)} \right)-\alpha.[$]

Rescaling [$]S^{(1)}=(1-I^*)\bar{S}^{(1)}[$] so that both (new) [$]S[$]s start at 1:

[$](\ln(S^{(0)}))'+\lambda \ln(S^{(0)})=\\ \qquad\left(\alpha-\frac{\beta}{N} \right)S^{(0)}+\frac{\beta}{N}\left(n(1-I^*)\bar{S}^{(1)}+(N-n)S^{(0)} \right)-\alpha.[$]

[$](\ln(\bar{S}^{(1)}))'+\lambda \ln(\bar{S}^{(1)})=\\ \qquad (1-I^*)\left(\alpha-\frac{\beta}{N} \right)\bar{S}^{(1)}+\frac{\beta}{N}\left(n(1-I^*)\bar{S}^{(1)}+(N-n)S^{(0)} \right)-\alpha.[$]

Two coupled ODEs.
 
User avatar
Paul
Topic Author
Posts: 6598
Joined: July 20th, 2001, 3:28 pm

Re: Models for Covid-19 - analytics

March 28th, 2020, 4:30 pm

Random thoughts:

Is it better to have simpler model for in-household infection? Integers? Or assume everyone infected? So only two types of household? Depends on timescales (in-house and outhouse).

In our household only one person goes out to shop. Suggests to me that there is an optimum household size. (Will depend on how many currently infected.)
 
User avatar
Cuchulainn
Posts: 20203
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Models for Covid-19 - analytics

March 30th, 2020, 6:50 pm

Random thoughts:

Is it better to have simpler model for in-household infection? Integers? Or assume everyone infected? So only two types of household? Depends on timescales (in-house and outhouse).

In our household only one person goes out to shop. Suggests to me that there is an optimum household size. (Will depend on how many currently infected.)
Does this mean that you can set [$]N=2[$]? 

BTW is [$]I^*[$] an equilibrium value?
 
User avatar
Paul
Topic Author
Posts: 6598
Joined: July 20th, 2001, 3:28 pm

Re: Models for Covid-19 - analytics

March 30th, 2020, 7:47 pm

Am still working on integers!

That was the initial infection in a household. 
 
User avatar
Cuchulainn
Posts: 20203
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Models for Covid-19 - analytics

April 2nd, 2020, 8:41 am

I find this canonical output intuitive. The kind of behaviour to expect?

Image
 
User avatar
ikicker
Posts: 30
Joined: June 8th, 2011, 12:19 am

Re: Models for Covid-19 - analytics

April 5th, 2020, 1:19 pm

I'm better with Google than I am with Lambda calculus. Mathematics Association of America: solution

I found this chart: Image

It expresses in terms of fractions of the population:

s(t) = the susceptible fraction of individuals,
i(t) = the fraction of infected individuals, and
r(t) = is the fraction of recovered individuals.

They solve using Eulers Method for solving Systems

You can use a solver to solve for the max{i(t)}
----
Undergraduate: accounting, finance, information systems; Graduate: MBA/finance; Graduate certificates: data science, applied statistics, advanced valuation; PhD candidate - data science

Blog: Www.ThinkerTinkerSolutions.com
 
User avatar
Cuchulainn
Posts: 20203
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Models for Covid-19 - analytics

April 5th, 2020, 3:25 pm

The problem with Euler'e method is that [$]\Delta t[$] must be very small for stiff, nonlinear systems, Just use off-the-shelf solvers.

I hope they don't put it into production! The authors should have included a health warning.

Still, it's a very nice post :-)
 
User avatar
Paul
Topic Author
Posts: 6598
Joined: July 20th, 2001, 3:28 pm

Re: Models for Covid-19 - analytics

April 5th, 2020, 5:12 pm

I'm better with Google than I am with Lambda calculus. Mathematics Association of America: solution

I found this chart: Image

It expresses in terms of fractions of the population:

s(t) = the susceptible fraction of individuals,
i(t) = the fraction of infected individuals, and
r(t) = is the fraction of recovered individuals.

They solve using Eulers Method for solving Systems

You can use a solver to solve for the max{i(t)}
The problem with all of these is not solving them. (If I can do it then anyone can!) It's in knowing which is the right model. Almost all of these type of models give the same curves. 

Some (as the ones considered here) have more dependent variables to capture more features. And anyone can play that game, make the model more complex, interesting, etc. But is it more realistic? Probably not. 

We don't know the parameters for any of these models. We don't even know if we can believe any of the data.
 
User avatar
Cuchulainn
Posts: 20203
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Models for Covid-19 - analytics

April 5th, 2020, 8:00 pm

Most scientists are probably more comfortable with ODEs, so they add more dependent variables. Sometimes you see extra independent variables for age etc. and you get 1st order pdes.
The underlying maths is  also kinda basic, no?
Last edited by Cuchulainn on April 5th, 2020, 8:05 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20203
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Models for Covid-19 - analytics

April 5th, 2020, 8:02 pm

We don't know the parameters for any of these models. We don't even know if we can believe any of the data.

How many [$]$$$$[$] is being spent on this research??
 
User avatar
Cuchulainn
Posts: 20203
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Models for Covid-19 - analytics

April 6th, 2020, 11:10 am

If anything, this should be viewed as a dynamical system and not as  a simplisch set of ODEs. There'not not much you can ask ODEs to do.

https://en.wikipedia.org/wiki/Dynamical_system
 
User avatar
Cuchulainn
Posts: 20203
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Models for Covid-19 - analytics

April 6th, 2020, 12:52 pm

 
User avatar
zeta
Posts: 26
Joined: September 27th, 2005, 3:25 pm
Location: Houston, TX
Contact:

Re: Models for Covid-19 - analytics

April 10th, 2020, 4:34 pm

Wolfram fans might like his analysis from a stream last month : https://www.wolframcloud.com/obj/s.wolfram/Published/COVID-19-Livestream-March-24.nb

The last plot is particularly telling ..