Skip to content

Instantly share code, notes, and snippets.

@notmatt
Created October 11, 2020 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notmatt/2e3340356acc8c077b9482c134ac057c to your computer and use it in GitHub Desktop.
Save notmatt/2e3340356acc8c077b9482c134ac057c to your computer and use it in GitHub Desktop.
This is actually a Calca file in case anyone uses that. Pretty great program.

Covid vaccination scenarios

For basic model/math, see: https://academic.oup.com/cid/article/52/7/911/299077

It also provides a good definition of "herd immunity", which is a cumulative incidence of 0 over the lifetime of an unvaccinated individual. I.e., even if you can't get vaccinated, you are extraordinarily unlikely to catch the disease.

That also suggests a good definition for "back to normal" -- to wit, that we go back to our previous chance of catching Covid, zero.

Critical vaccination threshold for herd immunity for a given R0 and E:

Vc(R0, E) = (1 − 1/R0)/E

Minimum E for herd immunity given a vaccination level Vc and R0:

E(Vc, R0) => -1/(Vc*R0) + 1/Vc

The maximum R0 where a given vaccination program (Vc and E) can provide herd immunity.

R0(Vc, E) => 1/(-Vc*E + 1)

Estimating some of this

Estimates for all of these:

So that gives us some best-case/worst-case numbers:

R0_best = 1.8
R0_low = 2.0
R0_high = 3.0
R0_worst = 6.0

Vc_worst = 0.41 # H1N1 pandemic flu vaccine uptake
Vc_low = 0.54 # exclude conspiracists from that poll
Vc_med = 0.72 # "mandatory" support from that poll
Vc_high = 0.78 # exclude "never" and "not sure"
Vc_best = 0.86 # exclude only "never" from that poll

E_worst = 0.5 # minimum for approval, apparently?
E_low = 0.65  # split the best/worst diff
E_high = 0.79 
E_best = 0.93 # MMR efficacy against measels 

What kind of disease can a vaccine program control?

Because R0 is such a wide range, let's reframe this, and look at what is the maximum R0 where a vaccine scenario can get us to herd immunity. In other words, a vaccination program with an uptake of Vu and efficacy of E will provide herd immunity for what R0?

Highest polled uptake, low and high efficacy: we do pretty good!

R0(Vc=0.78, E=0.5) => 1.6393
R0(Vc=0.78, E=0.65) => 2.0284
R0(Vc=0.78, E=0.7) => 2.2026
R0(Vc=0.78, E=0.79) => 2.6055
R0(Vc=0.78, E=0.93) => 3.6417

Medium-low case; people didn't poll as "wait and see," "not sure," or "never": we barely make it in the best case. One out of 4.

R0(Vc=0.54, E=0.5) => 1.3699
R0(Vc=0.54, E=0.65) => 1.5408
R0(Vc=0.54, E=0.7) => 1.6077
R0(Vc=0.54, E=0.79) => 1.744
R0(Vc=0.54, E=0.93) => 2.0088

Worst uptake, H1N1 pandemic flu vaccine levels. Well, shit.

R0(Vc=0.41, E=0.5) => 1.2579
R0(Vc=0.41, E=0.65) => 1.3633
R0(Vc=0.41, E=0.7) => 1.4025
R0(Vc=0.41, E=0.79) => 1.4791
R0(Vc=0.41, E=0.93) => 1.6163

Minor good news. 1/3 scenarios there touch the 2-3 range of the consensus R0, and so are a reasonable chance of "back to normal".

Minor bad news. Only one scenario covers the whole consensus range of R0, and it's the best case of both uptake and efficacy. The other three potential "back to normal" scenarios also need us to be lucky about the actual value of R0.

More bad news. In those scenarios, the vaccine helps lower the effective R, and helps control a lot of individual risk. What that looks like is totally up in the air, but it's not "back to normal" — unvaccinated & particularly vulnerable people will still face a substantial risk of contracting the disease, and may never have a "back to normal" if Covid establishes itself as endemic.

What's the worst case scenario? R0=6

E(Vc=0.78, R0=6) in % => 106.8376%

With our best plausible uptake estimate, we'd need a vaccine that's more than 100% effective. So we'll have to bump Vc to get there.

14% of people say they will "never" get the vaccine, can we make it without them at R0=6?

E(Vc=0.86, R0=6) in % => 96.8992%

Technically yes, but plausibly? less so.

How many more people would we have to vaccinate to get herd immunity in the worst case R0, with a best-case efficacy?

Vc(E=0.93, R0=6) in % => 89.6057%

Still have a problem with the 14% of people who said they would "never" get a Covid vaccine, which means this isn't especially plausible. It is at least close to childhood uptake of MMR and Meningicoccal C vaccines, though, so it's not outright impossible.

However, it compares poorly to adult vaccination rates across the country, even in at-risk populations where it's subsidized and has targeted education, like:

  • at-risk influenza: 71% (goal 80%)
  • senior pneumococcal: 42% (goal 80%)
  • flu vaccine this year: 57% (polling intentions)

Ok, shit. Better hope it's not R0=6 and/or that we can beat 93% efficacy in a vaccine.

What is the vaccine efficacy & uptake that does it for R0=3 (worst consensus)?

E(Vc=0.78, R0=3) => 0.8547
E(Vc=0.72, R0=3) => 0.9259
E(Vc=0.54, R0=3) => 1.2346

So what is the worst R0 that might still barely get us back to normal with these estimates - we saw this above:

R0(E=0.93, Vc=0.78) => 3.6417

What if we convince all those "not sure" folks?

R0(E=0.93, Vc=0.86) => 4.995

Now that's an impressive change.

What's this mean?

Well, happily for me, it looks like there are plausible ways to get "back to normal". I honestly wasn't sure there would be.

It's still going to take a substantial number of things to go Just Right, and whether the vaccine provides lasting protection will be up in the air until we can observe the next wave after it's made available.

To paraphrase William Gibson, it's going to look a lot like "normal is already back, it's just not evenly distributed". A young, healthy person who gets vaccinated might feel "back to normal" immediately (and be relatively justified in that feeling), while someone unable to be vaccinated is still going to be at risk, and will be in for a wait while transmission winds itself down.

Big takeaway: I'm not a vaccine scientist so I can't do anything about how effective they might be, but I can do something to affect Vc, and small changes can have a big effect in whether we can reach herd immunity and "normal" for everyone. We should get started now.

What about overdispersion (k)?

I know a little about statistics, but I'm not an expert and especially not a modeller. But from what I managed to read, it doesn't seem to affect these simple estimates very much. And these are very simple. Baby's first epidemiology.

It certainly creates a lot of variance in R, especially if we're looking at smaller populations, but it seems to moderate when we talk about larger populations (which isn't great, epidemics as we've seen aren't national, they're pretty local), or when the infection rate is high enough that the spreading events start to overlap (also not great).

I'm also not a public health expert, but my take is that overdispersion matters more for what restrictions we might require while the disease is still active and/or we don't have a good-enough vaccine. E.g., tighter restrictions on potential super-spreader events, but potentially looser on other aspects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment