Wednesday, September 9, 2020

SI Pandemic Model and the Logistic Equation

 

  One can produce a very simple model for a pandemic involving just infecteds and susceptibles, the haves and the have nots, with the infection rate being proportional to rate of interaction between individuals with complete mixing. It is almost trivial to show that the changes for the two compartments follow the Logistic Equation.



We might call this the SI Model since there is no removed compartment for those who have recovered and are no longer infectious and those who have died and no longer interact with others.


Tuesday, September 8, 2020

Theory Versus Reality

 

  I tried to do a more accurate version of Lotka's fit of US population growth. The data used came from Appendex A of the US Census publication Measuring America. Since the day of the year that the census was taken on has not been constant I computed the number of days from the beginning of 1790 and divided by 365.25, the number of days in a Julian year and used that as the time scale. The growth appears to be approximately geometric until about 1930 and may have been affected by the Depression, WWII and the Cold War as well as government domestic and immigration policy. 





The second plot shows the deviation from geometric growth. Lotka's measured time with t'=t-t0 with t0 being the time of peak growth which he gave as Apr 1, 1914. The values I got were the following.






The formula for the time of peak rate of change is determined as follows,



The population growth of the US appears to have been slowing down. The last plot of the rate of change in population growth appears to be symmetrical. So if one uses this model to predict the number of future Covid-19 cases of infections one is likely to be off since the coronavirus tends to linger. The SIR model is a better predictor since it can match an asymmetric curve. For an accurate prediction we need both an accurate model and an accurate fit.

Supplemental (Sep 8): If the data points are not evenly spaced the formula that has to be solved to determine A for the 3 point fit is f=α1(A)-α2(A)=0 or,



Supplemental (Sep 10): Lotka's solution for the integral of the logistic equation is exact. dx/x(a+bx) is a standard integral and gives the same solution.

Standard Integrals


Sunday, September 6, 2020

Comparison of 3 point and NLS predictions

 

  A comparison of the 3 point fit, the nonlinear least squares fit (NLS) and historical statistics up to 1960 is shown in the following plot. It's debatable which is the better predictor but the Depression and WWII may have lowered population growth.


Saturday, September 5, 2020

Lotka's 3 point fit

 

  The trick for doing Lotka's 3 point fit is deriving a formula that we can solve for the unknown value of A after the other variables have been eliminated. We start by deriving formulas for B and α involving the X values. 

The expression for α is true for all values of X so we can use two data points to eliminate it resulting in one equation with one unknown.

If the data points used are evenly spaced we can eliminate Δt to get a function whose zero value gives us A. Assuming a value for A we can use Newton's method to compute the corrections dA. The convergence is fairly rapid so only a few iterations are needed to arrive at the value for A.

 One gets less known error if one assumes the fit is exact for 3 data points but that ignores any error that may be associated with these points and if the 3 point fit is used for predictions the risk is that the results will be slightly off.


Friday, September 4, 2020

Correction Eqns for the Logistic Eqn


  The Logistic Function is simple enough to illustrate the computation of corrections to the assumed coefficients. One starts by computing δ, the difference between the calculated value of X and the observed value. Then one computes the two fit functions, φ0 and φ1, as well as the single auxiliary function, φ2, forming an array of numbers.

This first array is used to compute a reduced array for the data which is in turn used to solve for the coefficients using worksheet functions to solve a set of linear equations as shown above. The corrections are then added to the assumed values. Using copy and paste to replace the assumed values repeats the process.


Lotka's Logistic Equation

 

  An NIH webpage discusses the use of Lotka's Logistic Equation for Covid-19 forecasting. This equation is found in Lotka, Elements of Physical Biology, p. 65. Lotka's assumes the general growth equation can be expanded as the sum of individual factors and the product of their powers. For a simple quadratic growth function the solution is a geometric function which he sums with using the usual formula for the sum of a geometric series. The resulting formula is applied to the growth in the US population between 1790 and 1910. I tried to see if I could improve on his fit using correction equaton method. My first attempt failed but the fit indicated that the value for the year 1860 was an outlier so that data point was eliminated from the fit. Here are some images showing my fit.





So the correction equations succeeded in finding a better fit to the US population growth. Losses during the American Civil War may have affected the data after 1860. δ is the difference between calculated and observed values.

Supplemental (Sep 5): Lotka's fit is slightly better than the fit using the nonlinear least squares correction equatons. Lotka's standard deviation is 325781 while my fit had a stdev of 384743 and that was without the 1860 data point.

Supplemental (Sep 5): Lotka appears to have done a three point fit of the derived equaton. A similar fit produced these results.


Monday, August 10, 2020

Alchemy and the Fifth Essence


A recent Twitter tweet on the efficacy of consuming distilled elixirs led to a Google search that turned up Tillmann Taape, Distilling Reliable Remedies, which is a review of an earlier alchemist's influence on Hieronymus BrunschwigLiber de arte distillandi (1500). Both books discuss distillation as it was known to alchemists of the Middle Ages. The earlier book touches on quintessence, the hypocritical 5th Element of Greek philosophy, which is aether or spirit. Both books are are available in Middle English.


The vertuose boke of distyllacyon

(transliteration of the description)

The virtuous book

Of Distillation of the waters of of all manner of Herbes/with the figures of the stillatories/first made and compiled by the thirty years study and labour of the most cunning and famous master of pitsiae/Master Therom [Jerome?] Brunschwig And now newly translate out of German into English/Not only to the singular help and profit of the Surgeons/Physicians/and Apothecaries But also of all manner of people/Perfectly and in due time and order to learn to by still all manner of Herbes/to the Profit/cure/and Remedy of all manner of diseases and Infirmities Apparant and not apparant. And ye shall understand that the waters be better than the Herbes/as Avincenna testefieth in his fourth Canon saying that all manner medicines bled with their substance/feebleth and maketh aged/and weak.

The earlier book is by John of Rupescissa. Furnivall appears to have published a Middle English version.

Hermes, The Book of quinte essence

The 5th Essence was touted as a cure for pestilencial fever

The margin notes detail the contents.


16th. Med.

     ______

To cure Pestilential Fever (when it is not sent as a punishment by God.)

     ______

God says in Deuteronomy xxviii. that if men will not hear His voice and obey His commandments. pestilence shall come on them.

These plagues a man would be a great fool to presume to cure;

but all other pestilences

from evil planets may be cured by our Quinte [Nota bene.] Essence with Aloes, Euphorbium, &c., [*Fol. 25b.]

and a laxative Quinte Essence that will send the patient to stool once a day.

He must also take every morning an egg-shell-ful of Burning Water, and 2 or 3 pestilence pills in our Quinte Essence, and smoke his house with frankincense &c.

Here is an end of this most sovereign of all secrets.

What ills will befall if it gets in tyrants' and reprobates' hands and prolongs their life in evil. I will keep it for holy men alone; and I commend it to Christ's keeping now and ever.

Some modern versions of burning waters:

eau de vie

cognac (brandy)

Christian Brothers Brandy

Supplemental (Aug 12): Couldn't find a translation for pitsiae, pytsiae but it could be related to pizza, πίσσα, pyx, pitch, pith in the sense of residue from something heated in an oven. Pithy matters?