 Paul
Topic Author
Posts: 11276
Joined: July 20th, 2001, 3:28 pm

### Models for Covid-19 - analytics

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. Paul
Topic Author
Posts: 11276
Joined: July 20th, 2001, 3:28 pm

### Re: Models for Covid-19 - analytics

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. Paul
Topic Author
Posts: 11276
Joined: July 20th, 2001, 3:28 pm

### Re: Models for Covid-19 - analytics

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. Paul
Topic Author
Posts: 11276
Joined: July 20th, 2001, 3:28 pm

### Re: Models for Covid-19 - analytics

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.) Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Models for Covid-19 - analytics

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?
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl Paul
Topic Author
Posts: 11276
Joined: July 20th, 2001, 3:28 pm

### Re: Models for Covid-19 - analytics

Am still working on integers!

That was the initial infection in a household. Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Models for Covid-19 - analytics

I find this canonical output intuitive. The kind of behaviour to expect? "Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl ikicker
Posts: 21
Joined: June 8th, 2011, 12:19 am

### Re: Models for Covid-19 - analytics

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

I found this chart: 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)}
----

Blog: Www.ThinkerTinkerSolutions.com Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Models for Covid-19 - analytics

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 "Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl Paul
Topic Author
Posts: 11276
Joined: July 20th, 2001, 3:28 pm

### Re: Models for Covid-19 - analytics

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

I found this chart: 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. Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Models for Covid-19 - analytics

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.
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Models for Covid-19 - analytics

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??
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Models for Covid-19 - analytics

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
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl Cuchulainn
Posts: 64439
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: Models for Covid-19 - analytics

"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl zeta
Posts: 1973
Joined: September 27th, 2005, 3:25 pm
Location: Houston, TX
Contact:

### Re: Models for Covid-19 - analytics

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 ..