We're a little crazy, about science!

Day 228: Coronavirus modeling – Part 1

Coronavirus modeling

Well the CO of the Roosevelt just got reprimanded just like I predicted. Ever predictable as usual, thanks military. In any case, that isn’t what we are talking about today. Today we are discussing the coronavirus model I’m creating, why it’s important and why no one should believe a model. I’m being slightly facetious, but read on and I’ll explain. I’ll even share some of my model results, it’s not finished, but I thought it would be interesting to share anyway.

COVID-19 models, everywhere as far as the eye could see. There is a huge uptick in coronavirus papers and I have no idea how people are generating them so quickly to be honest, but everyone wants to be the first. It’s a publish or perish system, so I guess I shouldn’t be too surprised that people are rushing to make a high impact with the quickest effort. Then of course, you have people who are not epidemiologists trying to create models and shoehorn there science into the coronavirus issue. FYI that is how you end up with a PhD and magnets up your nose.

Now, I’m a student and while my specialty is neuroengineering this actually (somewhat) falls into my purview. As I previously explained, I did a fun little homework assignment to apply some of the modeling techniques we are using to epidemic modeling. This was maybe a week prior to the coronavirus starting to ramp up. I modeled a flu epidemic and did so surprisingly accurately. This was because my model only predicted 1 week ahead at a time. It’s much easier to predict a week in advance than it is to predict a month in advance.

While predicting the long-term behavior of an outbreak is important, there is still a fundamental and often overlooked place for a model that predicts short term (IE 1,2, or 3 weeks ahead at most). If I could tell you with some certainty what the next week will look like, you have time to prepare, gather supplies, make arrangements. A week or two notice doesn’t sound like much, but it can be lifesaving. So I try to stick with short-term modeling and this brings me to my next point.

All models are wrong, some are more wrong than others, and others are flat out dangerous. Weather forecasters know this well, if you try to predict the weather a month from now, you’re probably just guessing. It’s nice to show people long-term models, don’t get me wrong, but they are based on assumptions. Every day ahead you predict you are compounding those assumptions, over and over and over. Eventually you lose your predictive power. Notice models that predict months in advance have outrageously huge error bars, they are there for a reason, becuase the further you predict the more you have to rely on several simplifying assumptions.

I am about half way done with my model. I’m using two different measured states to predict the other states. That is to say I am applying a modified SEIR model, so we have several different groups or states. A (S)usceptible state, a (E)xposed state, a (I)nfected state, and a (R)ecovered state. The difference between exposed and infected is that someone exposed has the virus and can spread it, but shows no symptoms. People in the infected state, show symptoms. I’m also adding in a (D)eath population and this will help me better create a model.

When you’re modeling you need to estimate your coefficients, there are a lot of ways to do this, but the more measurements you have the better your estimate. We have two measurements in this pandemic, so we know our infected population and our dead population. Using both of those measurements we can back calculate our variables for the model and end up with something more accurate because we don’t need to assume as much. Right now, I’ve gotten enough variables that I can confidently predict deaths in the US a day in advance. I have a few days to finish the rest, but this was a big step to finishing my model.

Here is the output from that, if anyone is interested. That blue line is my prediction, the purple is the actual number of deaths per day. Notice that my blue line extends past the purple? That is the prediction for yesterday. The number hadn’t come in yet, it shouldn’t be too far off, but it will be a good check to make sure my model is acting correctly. I haven’t honestly checked yet to see how close I was, but I wouldn’t be surprised if it was very close, predicting a day ahead with even an okay model isn’t that difficult. This is just one of the states in my model, so I still have some work to do to link everything together.

COVID-19 model,

Part of my COVID-19 model, a stochastic state space model that is currently “only” predicting 1 day ahead for one of the measured states, in this case (unfortunately) death.

Once it’s finished we are required to make a video. I plan on sharing that here for everyone to see just how I created my model and why I think short-term modeling will be the best way to help in this crisis. Could my model predict a month or two in advance? Of course it’s just a matter of changing the stop, but that isn’t how I plan on using it. Will it make a difference? Probably not, but this is a class and the point is to learn. I would love to help, I just don’t know that my model would be any better than some of the others available.

Update: Checked todays reported numbers (the deaths for yesterday) and it was basically spot on, my model predicted high by 11 deaths 1060 vs the actual 1049. Don’t be too impressed though, like I said predicting a day ahead is surprisingly straightforward even for an okay model.

But enough about us, what about you?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.