Showing posts with label COVID. Show all posts
Showing posts with label COVID. Show all posts

Thursday, December 31, 2020

Fitting an SIR Model to COVID-19 Data

LabKitty Mad Scientist logo
The US has one of the highest COVID-19 per capita infection rates in the world. Many factors have contributed to this unfortunate honor, including the Trump administration's bungled response to the pandemic, the Trump administration's bungled response to the pandemic, and also the Trump administration's bungled response to the pandemic. I'm here reminded of Richard Clarke's testimony at the 9/11 commission which he opened with an apology: Your government failed you. Those entrusted with protecting you failed you. I failed you. I suspect we'll get no such apology from The Donald.

The good news -- if we can call it that -- is because of Trump's stunning malfeasance, the humble SIR model is a better description of the COVID pandemic than it otherwise would be. Intervention complicates disease dynamics, adding terms to the equations and expanding the search space of parameters we need to fit. In the absence of a public health response, we're left with only three classifications -- susceptible (S), infected (I), and removed (R) -- and two parameters -- the transmission (β) and recovery (γ) rates -- which describe both our model and our fate.

Additionally, the longer COVID drags on the more data we have to test. Of course, none of the numbers can be trusted as long as Trump lackeys have opportunity to spike the CDC spreadsheets. Videre quam esse, and all that. However, that, too, can be good thing, for it allows us to check if model parameters match what healthcare workers are reporting from the trenches. Any discrepancy indicates malarkey may be afoot, kinda like how Neptune was discovered by analyzing the discrepancies of Uranus.

So, let's fire up Matlab and fit a COVID model. We're all sequestered at home this happy holiday, so what else is there to do?

Tuesday, October 6, 2020

The Superspreader

LabKitty Mad Scientist logo
As a result of recent events, the internet is simply full-to-bursting with words like "karma" and phrases like "everything Trump touches dies." But to be honest, it's impossible to get any kind of an accurate read on the situation.

We're told the president tested positive for COVID, as did his fluffer Hope Hicks, truth scarecrow Kellyanne Conway, administration eye candy Kayleigh McEnany, Senators Mike Lee, Thom Tillis, and Ron Johnson, RNC person Ronna McDaniel, professional hanger-on Chris Christie, three WH reporters, and a WH staffer. Also the president of Notre Dame, this significant as he introduced the guest of honor at Mitch McConnell's SCOTUS coming out party for jurist and Octomom wannabe Amy Coney Barrett.

Which sounds kinda bad, but who can say. It's possible all of these people have tested positive, or some of them have, or none of them have. Because nothing claimed by this administration can be trusted. Nothing. Trump has been nothing but a perjury firehose since the day he took office. Even Charlie Brown would have stopped kicking at this particular football by now. As far as we know, every single elected Republican is dead and the country is being run by Bill Barr in a Trump mask. Or perhaps they all spent a week lounging 'round the pool at Mar-a-Lago sipping Mai Tais from an infant's skull and having a larf. Either scenario is equally likely. This is what four years of chaos has wrought.

But a tale need not be true in order for it to be a cautionary tale. There is an epidemiology lesson hiding in this story, and that lesson is titled The Superspreader.

Sunday, August 23, 2020

Exploring Herd Immunity

LabKitty Mad Scientist logo
Herd immunity is in the news these days, and, no, it has nothing to do with Devin Nunes. (Because cow. And cows come in herds. And Devin Nunes (R-CA) keeps suing a talking cow on Twitter. Because Congress doesn't have more pressing problems at the moment. Just a little joke to help soften the pain of watching the Republic die. But I digress.)

The idea is straightforward. To halt an epidemic, you don't need everyone immune, just enough people to break the chain of transmission. COVID isn't immortal. Think of infection as starting a clock. The virus has a finite window of opportunity to infect another host before its current host becomes inhospitable, either because the host's immune system has come on-line or the host has died. If it doesn't jump to a new host by the time the clock runs out, it goes down with the ship.

It's like The Hidden, except without Ferraris and strippers.

Now for the bad news.

Sunday, August 2, 2020

iCOVID: Individual Based Epidemic Modeling

LabKitty Mad Scientist logo
Previously on LabKitty, we attempted COVID simulation in the large, using what a professional epidemiologist would call mass action modeling. There it was assumed the variability and vagaries of individual actors can be glossed over, condensing all behavior into a mythical average behavior that is captured by a few numbers. In the SIR mass action model, the few numbers are the number of susceptible, infected, and recovered in the population plus the transmission and recovery parameters.

However, an alternate approach exists in which we literally follow each individual individually, a bottom-up attack that constructs the evolution of an epidemic as the sum of its parts. This goes by the name individual-based modeling. We generate a history for each individual in the population, then assemble the population response by mashing together everybody's story.

Which brings us, once again, to COVID.

Thursday, July 2, 2020

Politics and Exponential Growth

LabKitty Mad Scientist logo
The greatest shortcoming of the human race is our inability to understand the exponential function. This was Al Bartlett's mantra. His catchphrase. The alpha and omega of the lectures he gave on overpopulation before his death in 2013.

Bartlett was a physics professor. He understood natural phenomena often outstrip our brain's gronkulatory machinery. The very small (quantum mechanics). The very fast (relativity). But also exponential growth. So he spent his emeritus years educating the public. Breaking it down for the layperson. You may know some of his examples. Wheat and chessboards. The bacteria bottle. Doubling rates. If you don't, you should (Bartlett's lectures are available on YouTube).

The crux of our misunderstanding is the power of the exponential. If a process grows exponentially and its constraint does not, exponential growth will win every time. What kind of process? Human population growth, yes. But also the adoption of technology. The spread of rumors. Compound interest. Nuclear reactions. The transmission of disease. Tolian Soren notwithstanding, exponential growth is the fire in which we burn.

Which brings us to COVID.

Monday, June 29, 2020

The Consequences of an Asymptomatic Infectious Period on COVID-19 Spatiotemporal Dynamics

LabKitty Mad Scientist logo
Many years ago, a Dan O'Bannon script rumored to be in consideration for Alien^3 circulated on the Interwebs. O'Bannon's tale had teh Alien arriving on Earth in a form of a virus, one that converts the host directly sans a facehugger instar. In what was sure to have become an infamous scene, a Weyland-Yutani bean counter is PowerPointing to a crowded boardroom, coughs once or twice, then a fully-formed adult Alien bursts from his shuffled mortal coil as it splats to the carpet in a bloody heap.

Until that moment, the bean counter had no idea something was amiss. It's a strategem designed to achieve the viral gold standard of success: transmission. That is what a virus lives for (or doesn't live for, as it were).

Perfect organism, Ash called it.

Which brings us to COVID-19.

Friday, March 20, 2020

The Circus has Arrived

LabKitty Mad Scientist logo
Now that the Trump administration's spectacular incompetence* is literally getting people killed, one naturally wonders what calamity tomorrow will bring. Poetic justice would be if Trump himself and his ring of enablers were culled by COVID-19, but I'm not holding my breath (I mean I am, but that's only because you're standing too close). If you think any comeuppance whatsoever will ever inconvenience these guys, you are practicing for your coma. As Jessie observed of Walter White, Donald Trump is the devil.

Which brings us to sequesterfying.

In Part I LINK of LabKitty's Plague Song Trilogy, we examined the spatiotemporal properties of infectious disease to model the global spread of COVID-19, from its humble beginnings in a Pangolin's alveoli to a pervasive plague rivaling the Black Death, rap, or Facebook. In Part II, we examined the rationale of the response, which the Internetigensia has taken to calling "flattening the curve." Now here in Part III we examine the mechanics of that response.

Call it what you will -- sheltering in place, avoiding public spaces, social distancing, that thing we nerds have been doing since Gymboree -- paramount is one question: Will it work?

You're not going to like the answer.

Sunday, March 15, 2020

Flattening the Curve

LabKitty Mad Scientist logo
Now that amateur epidemiology is all the rage, what with the White House's official COVID-19 response consisting of whatever Jerry Kushner can find on Facebook (not kidding), it falls to the Interwebs to help us make sense of the world. It seems like only yesterday all was snips and snails and puppy dog tails, and today we're chained to the front of Furiosa's minivan. Except instead of a heavy metal guitar player shooting fire, the soundtrack is just an endless loop of Yakety Sax. If you don't understand God sent this as punishment for electing Donald Trump, you're not paying attention.

On a related note, I hate it when I'm right.

Which brings us to "flattening the curve." The pandemic lingo de jure, which to the uninitiated means not much. Who curve? Where flat? What it do, and when it be?

Well LabKitty is here to help. Since we can't go to the pub anymore, or the liquor store, or the pub, there's more time for illustrative Javascript. Let's dive into a little epidemiology modeling and decipher why medicos don't want us going to the pub anymore. Or the liquor store. Or anywhere, really. As it happens, the idea is almost a century old, emerging from the seminal work of Scottish biochemist Anderson Kermack and Scottish physician William McKendrick, published in 1927.

Read on.

Tuesday, March 3, 2020

LabKitty Pandemic Simulator

LabKitty Mad Scientist logo
Recent events have rekindled my long-standing interest in epidemiology, as yet another emergent virus currently does a slow burn across the globe. COVID-19 arrives against a backdrop of influenza currently doing a slow burn across the globe, not to mention reduced herd immunity, declining antibiotic efficacy, and an incoherent public health response. Experts call this "instability in the disease dynamical manifold" but what they really mean is "asking for it."

We may never know how coronavirus came to be, although packing eleventy billion humans into an ecosystem seems to my way of thinking relevant. In any event, it didn't take long for politicians to exploit the situation. Republicans declared the virus was clearly designed in a Chinese weapons laboratory, because China has coronavirus and weapons laboratories. Yes, the logic is as airtight as the rationale. Are there votes to be had by gloating over dead Chinese? Apparently so in the red states of our waning republic.

Which got me thinking about designing a virus. Suppose you wanted to create a pandemic. How would you go about it? What would be the ideal virus? What parameters would you select? Where would you release the thing? How long would it take? What could anyone do to stop it?

There are CDC scientists studying such questions on supercomputers as we speak. One hopes. For the rest of us -- and perhaps for the CDC too, what with their recent budget cuts (thank you Donald Trump) -- there is Javascript.

I give you: jPandemic.