Thursday, April 16, 2020

CoViD-19: Not Much More Real Data, But Enough to Figure With...

So I'm sure you've seen the report about women checking in to a maternity ward in NYC (story here). While it is always dangerous to give any one bit of data too much credence, this one seems worth following to it's logical conclusion...

First a quick summary: a hospital tested every woman entering the hospital to give birth for CoViD-19. They collected the data over the two weeks (14 days) March 22 - April 4. There were 215 admissions and 33 of them tested positive for the virus. Of them only 4 "had symptoms".

The first question that came to mind was "Had four non-pregnant women called their doctors and described their symptoms, how many would have gotten tested?"
I can't know for sure, but I know from my son (who lives in New York City, NYC) that when he called in with the basic symptoms and a low grade fever, they did not give him a test. So let's guess that maybe 1 would have been tested. In that case, out of the sample of 215, there would have been 1 confirmed case.

The second question, aiming at the same number, would be "Well if we drew 215 random people from NYC, how many would be from among the Confirmed cases?"
We know that NYC reported a total of 62,230 new cases during that time period (see data on the excellent NYC CoViD-19 website). NYC's population is given (Google search) as various numbers from 8.4 million to 8.7 million. Let's use 8.6 million. Further, data suggests that for all but the most severe cases the recovery period is about ten days. So we'd expect to be drawing 215 random people from 8.6 million, of which each day there about 44,450 active confirmed cases (44,450 = 62,230 X 10 / 14). A slightly incorrect but close enough answer is: 44,450 * 215 / 8,600,000 = 1.1 Hence, we'd expect about 1 Confirmed Case.

Those two estimates are not in bad agreement. So let's assume that there really would have been 1.

That leads to another question, "If we see 33 actual cases in the 215, when we'd expect 1 confirmed case, then how many actual cases would we expect there to be in the city?" Well, the ratio of Confirmed to Actual cases in the 215 is 1:33, there would be about 62,230 X 33 ~ 2,000,000 total new cases during that 14 day period. Now extend that to the total time the cases have been running through the city. That means we take the total number of confirmed cases, which is 117,565 (and still climbing!) and do the same multiplication. That works out to something like 4 million. That's nearly half the population!

Further, there is data from Vo, Italy and some hints from Chicago that the ratio of total cases to confirmed cases is in the range 100:1 to 200:1 (see the previous two posts). If you believe those (and the data from the pregnant women don't really exclude these given the small numbers of them tested), then we are talking numbers so big that essentially everyone in NYC has had CoViD-19. If true, we can expect the number of new cases there to absolutely crash over the next week to 10 days. It will be interesting to see. On the other hand, if the numbers don't crash, then I'll have to toss my existing models out and start again with a reduced ratio like 33.






Tuesday, April 14, 2020

CoViD-19: A Follow Up

Words of Caution:


See the post below.  They all still stand!

Background:


Last week I presented some results from a quick and dirty model, utilizing the best parameters I could find, and the simplest assumptions that allowed me to fit the data.  Well it's been an interesting week, to say the least.  I have had to make a few changes to fit the new data.  So without any further ado...

Data:


I am still using the same data sources for cases and deaths as I did last week.  I just can't find anything that even remotely seems better.  I now have enough CDC death numbers that I'm showing those as well.

Results:


There are four plots below that graphically show the fits.  I am satisfied that while they are some what ad hoc, they agree to a more than adequate extent.

A                                                                              B
Figures 1A and B. Two plots of the Worldometer and CDC Data and the Model results (the one on right, B, being a blow up of the y-axis to show the quality of the agreement at large numbers).


Figure 2. Plots of the Day-to-Day cases numbers.  Note that the data are extremely noisy over the last 10 or so days.


Figure 3. Data for the number of deaths.

It is clear that the model is doing a good job of capturing the dynamics of the CoViD-19 outbreak.since last week.

The conclusions I would draw have changed only somewhat taking into account that last week the model was predicting far fewer cases, because I was completely taken in by the wiggle you can see in the day-to-day case data from around 3/27-3/31.  Beyond that the comparison to last weeks "suggestions" are:
  1. The stay-at-home orders and the social distancing being practiced across the country are having a clear and downward pressure on the cases and will also show a reduction in the deaths as well.  This still holds.
  2. There is some indication that there is some small positive influence on disease outcome (people not dying!) from whatever treatments are being provided. This still holds.
  3. The number of infectious cases is still very high and these practices must be maintained for the foreseeable future if we are to clear the virus from our population. This still holds.
  4. The maximum number of new cases (i.e., the number of people who get infected on a specific day, and hence are now infectious) is likely behind us (model says it occurred on or about March 28). The conclusion holds, but the date at which it occurred was April 2.
  5. The maximum number of infectious people on any given day is also likely to be behind us (model says this happened on or about April 2 or 3). The conclusion holds, but the date at which it occurred was April 7.
  6. The maximum number of newly Confirmed Cases on any given day is likely to have happened, be happening, or about to happen (model shows it somewhere in the span April 5, 6, or 7).  The conclusion holds, but the date at which it occurred was April 10.
  7. The maximum number of new deaths is likely to still be in the future (somewhere around April 8 - 11).  The conclusion holds, but the date at which it will occur is on or about April 16.
The other major change is that the length of time to fully clear the infection is MUCH longer.  I won't even say how far out the model predicts them, other than to say, some of them extend into 2021.  I should also mention that the predicted number of deaths has jumped to about 63,000.  Also the number of people actually infected (and almost entirely recovered) ends up being just under 150 million of the total population of 330 million.

I should also mention that two of the primary factors that influence the model are the number of total cases versus the number of confirmed cases.  These results are based on the same numbers I used last week.  Recently KT has pointed me to two rather interesting reports (Thanks!).  The first is a report that claims the mortality for CoViD-19 is around 0.06% (see the second bullet under the New Studies under the April 12, 2020 heading here).  That is in quite good agreement with the parameter I have been using (7.6%/137. ~ 0.056%) The second is a rather interesting report (even though somewhat anecdotal) from Chicago that 30 - 50% of the people tested shows signs of having had CoViD-19.  If the higher figure holds that suggests that the number of hidden cases might be significantly higher than the assumed parameter of 137 (perhaps as high as 190, but also as low as 110).  A few runs using the high end parameter resulted in a nearly identical looking fit, with essentially the same dates for the peak, but with slightly shorter time to fully clear the cases (but still out to December), around (but below) 60,000 deaths, and something like 190 million total cases.  .The lower value will push the numbers the other way.

Tuesday, April 7, 2020

CoViD-19 – Some “In-the-Box” Thinking


Words of Caution:

First let say the following things clearly and for the record:
  1. I am not an epidemiologist although I have had some familiarity with chemical kinetics equations, which are very similar to the epidemiology equations for disease spread,
  2. I do not warranty any of what follows,
  3. I strongly urge everyone to continue to follow the guidance of the US CDC and all guidelines and orders of Local, State, and Federal authorities, and
  4. I to specifically urge that you NOT use what appears here to make personal decisions.

Background:


During this time while I am stuck at home (i.e., In-the Box), I decided to occupy some of my time by trying my hand at modeling the current Coronavirus (CoViD-19) outbreak here in the US. After finding a free FORTRAN compiler, I started programming the equations that describe the standard epidemiology equations for disease spread. For simplicity I chose to use the discrete version rather than the differential forms. I have described the Model (both the equations and how I chose various parameters) at the end of this post, for those who care about the details.

Data:


The data used here are those available on two different websites for the number of CoViD-19 Cases and Deaths for the United States. The data labeled Worldometer Data is from the website here and the data labeled CDC Data is from the website here. The Worldometer website has interactive plots of both the cases and deaths, and the data I have here was extracted from them by hovering over the various points and recording the data. The CDC website has the case data available in a table that can be scrolled, but I have seen no historical data for the deaths, and as I have been recording those data only since 5 days ago I have not shown them on the plot, nor adjusted any of the parameters to try to match them.

Results:


Below are the current (April 6, 2020) plots for the available data and the model fits. I am satisfied that these are in sufficient agreement with the past that I am willing to say a few more things.

Confirmed Cases vs. Days since the 100th Confirmed Case for the US.

Deaths vs. Days since the 100th Confirmed Case for the US.

This model suggests that: 
  1. The stay-at-home orders and the social distancing being practiced across the country are having a clear and downward pressure on the cases and will also show a reduction in the deaths as well.
  2. There is some indication that there is some small positive influence on disease outcome (people not dying!) from whatever treatments are being provided.
  3. The number of infectious cases is still very high and these practices must be maintained for the foreseeable future if we are to clear the virus from our population.
  4. The maximum number of new cases (i.e., the number of people who get infected on a specific day, and hence are now infectious) is likely behind us (model says it occurred on or about March 28).
  5. The maximum number of infectious people on any given day is also likely to be behind us (model says this happened on or about April 2 or 3).
  6. The maximum number of newly Confirmed Cases on any given day is likely to have happened, be happening, or about to happen (model shows it somewhere in the span April 5, 6, or 7).
  7. The maximum number of new deaths is likely to still be in the future (somewhere around April 8 - 11).
  8. The last new case is likely to be infected on or about May 22nd (!).
  9. The last death may occur on or about the same day and will represent something like the 24,000th death.
  10. The last infectious person will clear quarantine some days after that (10-24 days are typical recovery times I've seen quoted, so that works out to June 1-15).
The bottom line I take from the model is that this epidemic is no where near done, although we may start seeing some positive news soon, possibly this week. Also, when things start to look really good we must all take a deep breath and continue the stay-at-home and social distancing for at least 2 weeks more than we will want - or seem to need. This will be critical in assuring that the last few cases find no new victims.

An additional result is that the model predicts about 82 million people will have had the disease and recovered. This will be interesting to compare to any retrospective antibody testing that are done on the population of the US.

Finally, I suspect that the model will have to be adjusted to reduce the drawdown factors for both cases and deaths, which will likely move all the dates which are in the future farther out (and will result in higher figures for both the number of people that recover and, unfortunately, the number that die. On the other hand, if these turn out (miraculously) to be correct, remember that you heard it here first.

The Model:

The variables:


J = day number
U(J) = number of uninfected people on day J
N(J) = number of newly infected people on day J
I(J) = number of infectious people on day J
C(J) = the number of people who are confirmed to have the disease on day J
TC(J) = the total number of confirmed cases through day J
D(J) = the number of people that die on day J
TD(J) = the total number of deaths through day J
AR(J) = the number of asymptomatic cases that recover on day J
CR(J) = the number of confirmed (=symptomatic) cases that recover on day J
R(J) = the total number of people who recover on day J
TR(J) = the total number of people who have recovered through day J

Assumptions:

  1. There are cases of CoViD-19 which can be either symptomatic or asymptomatic. For the purposes of simplicity the symptomatic people will all be assumed to be confirmed, and the asymptomatic cases will be assumed to not be confirmed.
  2. People who are asymptomatic are assumed to be infectious for 10 days(they recover on the 11th day).
  3. People who are symptomatic (and hence, confirmed) are assumed to be infectious for only 7 days as they are assumed to become confirmed on day 7.  All confirmed cases are assumed to either be in the hospital or in quarantine and, therefore, in both cases it is assumed that the conditions do not allow them to infect anyone.
  4. Confirmed cases all end up either recovering on the 24th day from their initial infection or dying on the 11th day after infection  (originally I assumed this would be around day 15, but to get a reasonable fit I had to change it). [Note: These lag times have no impact on the model  beyond which day they show up in the totals, as they were removed from the infectious pool when they were confirmed.]

The Equations: 

[Note: the differential equations are available by searching for the SIR model]

The Base Model



J = J + 1
N(i) = k1 * U(i-1) * I(i-1)
U(i) = U(i-1) – N(i)
C(i+7) = k2 * N(i)
TC(i) = TC(i-1) + C(i)
D(i+10) = k3 * C(i)
TD(i) = TD(i-1) + D(i)
AR(i) = N(i-10) – C(i-3)
I(i) = I(i-1) + N(i) – AR(i) – C(i)
CR(i) = C(i-24) – D(i)
R(i) = AR(i) + CR(i)
TR(i) = TR(i-1) + R(i)

Note 1: all these equations use integers as inputs and outputs. The math is done as real numbers and any non-integer part is included or excluded, as an extra person, based on a random number.
Note 2: In fact the calculation of N(i) is the sum of ten terms of this form, which actually use N(i-10) through N( i-1) and C(i-3) through C(i-1), vice I(i-1), as will become clear in the next section.

This base model basically results in essentially everyone in the model getting infected. So for the US total population of 330 million the death total comes out at slightly less than 200,000 deaths. This however does NOT fit the data, after about the first couple weeks. It just goes on up exponentially until U goes to essentially zero (actually 69).

Input Parameters/Information:


The initial condition is that U(0) = 330,000,000 and all others are 0. Then N(1) is set to 1, and off the model goes.

k1 is not just one number, but rather it is actually an array of ten multipliers based on which day it is from the the day a person gets infected. The array varies such that the actual infectious-ness of an individual is such that: for each of the 3 people they infect, they will infect (on average) 1/2 person total over days 1-3, 1/2 person over days 8-10, and the remaining 2 people are infected over days 4-7 (the numbers being the number days after they were infected). This is a crude approximation of the data given under the heading “'Characteristic' Infection progression in a single patient” here.

k2 = 90. / 3300. This based on the only study I have heard of that may properly define this ratio. This was data reported for the city of Vo, Italy. It was reported in the Wall Street Journal, WSJ. I saw it where that article was being discussed here). Hat tip: KT

k3 = 8% From the same WSJ article via the same blog post. Again Hat Tip: KT

Adjustments to the Base Model

These adjustment have been implemented to be able to match the actual number of cases and actual number of deaths over the current data set.

Adjustment 1: As can be seen in the plot for the number of cases, the initial exponential growth (the straight line in this log plot) begins to roll over on or about the 17th day (this is not clear in the graphs shown but if you look closely, on a greatly expanded scale, you can make it out). This date works out to March 20. This would seem to match fairly well with the onset of stay at home orders (for example NY Governor Cuomo on March 20 and CA Governor Newsom on March 19). The actual adjustment that gives an curvature rate that matches the data is to reduce the daily infection rate by a factor of 0.885^(i-16).

Adjustment 2: The actual death rate did not match using the crude figure of 8%. It required a reduction to 7.6%. This can easily be accounted for by any of several factors including: better more complete testing in the US vice what Italy had accomplished, a healthier population (Italy has a significantly higher rate of smoking), or some other minor factor (like simple rounding in the value of 8%).

Adjustment 3: Much as the number of cases was adjusted it became clear that matching the number of deaths requires an additional similar factor. The best match (by eyeball) uses it starting on day 23 (real world = March 26) and a factor of 0.96^(i-22). It is not clear what might case this, but I suspect that it is a reflection of some actual increase in the ability to treat patients.

Addendum:


This post, and the data and model results it is based on are through April 06 (actual data end April 05). Today, April 07, the data from both Worldometer and CDC show a significant spike upwards in both cases and deaths on April 06. The cause for this is unclear. I will not make any additional model changes for several more days.   




Friday, March 24, 2017

Desert Flowers

Thought these were pretty nice pictures of the current super bloom out in the Anza-Borrego area.






And with flowers come those that eat them...
I'm told that is a White-lined Sphinx Moth caterpillar.

Thursday, August 28, 2014

Obama May Not Have a Strategy, but ISIS Does...

These two Headlines speak for themselves.  The contrast could not be more stark.

Note: Screen capture image taken from the CBS News website at 1815 PDT on Aug 28, 2014.

Thursday, May 3, 2012

Life Imitates Art...

When I saw this article about the forest service having to saw up cows to get them out of a cabin, all I could think of was the scene with the horse in National Lampoon's Animal House.  I guess I have a warped sense of humor.

Sunday, December 25, 2011

The Ultimate O(W)S Statement

I could never say it so clearly...




Merry Christmas.

Sunday, January 2, 2011

Sad Commentaries on "Life in California"

Over at Beers with Demos there is a very sad story about how bad life in California is getting in the Central Valley that is definitely worth reading. But what really prompted this post is the oh-so-perfect story from yesterday's Rose Parade.

Seems that the float from the city of Sierra Madre won this year's Governor's Award, one of the Tournament of Roses Parade's most prestigious awards, which is awarded to the float which "best depicts life in California." What makes their depiction of "Life in California" so richly ironic is that the float broke down, right at the main TV area, and had to be towed the rest of the way (see full story).