CodeForPhilly / chime

COVID-19 Hospital Impact Model for Epidemics
https://codeforphilly.github.io/chime/
MIT License
205 stars 150 forks source link

["model"] Check impact of latent period delay from infectious to hospitalized on model dynamics and forecasts #340

Open PhilMiller opened 4 years ago

PhilMiller commented 4 years ago

Summary

There's no a priori reason to assume that transition of a person from the Susceptible to Infectious states corresponds with immediate development of symptoms requiring hospitalization. If there's a separation in time, then the model may be mis-predicting spread in the region by initializing I based on present-day hospitalizations.

We need to check whether accounting for this affects relevant forecast outputs.

Additional details

Suggested fix

Shift the initialization from current hospitalizations to community infection rate back in time by a configurable latent_period, and then shift forecast admissions of newly-infected individuals forward in time by that same latent_period

PhilMiller commented 4 years ago

I'm working through the algebra on this before throwing code at it.

PhilMiller commented 4 years ago

Post #273 I'm thoroughly convinced that when p.relative_contact_rate == 0 the forecast is the same regardless of a latent period L.

With non-zero social distancing taking effect at 'day 0' of the forecast, the change from beta to beta_t needs to have happened L days earlier. The timing of the slow-down in admissions and consequently census growth will be affected.

Given that forecasts can be run at any time relative to societal interventions, I think the right thing to do is to

sloboy commented 4 years ago

I think that the SEIR model is what you are looking for as a way to have exposed then infected: It also talks about implementing social distance into the algorithm https://towardsdatascience.com/social-distancing-to-slow-the-coronavirus-768292f04296

PhilMiller commented 4 years ago

SEIR doesn't really capture the effect of concern, though it may also be an important refinement. We're concerned here about a delay from a person entering the Infected state (from S in SIR or E in SEIR) to when they would present in a hospital for treatment if necessary. This is particularly of concern for the hospital forecasting model because we're estimating I and beta based on matching hospital observations. If there's a substantial gap between those, then the hospital's observations are going to be that length of time behind the infection dynamics, and so may see a sharper peak than otherwise, even before social distancing shows its effect.

ckoerber commented 4 years ago

In principle it might be possible to incorporate the delayed hospitalization effect in a similar spirit as SEIR:

My idea works as follows ("SIHR" like---inspired by a youtube video about modeling the epidemic and how early quarantine can significantly change the curve):

  1. Susceptible people S have a chance of becoming infected I (proportional to both previous susceptible and previous infected).
  2. Infected people have a chance of becoming recovered R (proportional to previous infected) and have a chance to be hospitalized H (proportional to previous infected and limited by hospital capacity H0)
  3. Hospitalized people (hopefully) are isolated enough that they do not infect others (thus no increase in I) and recover over time (proportional to previous hospitalized)

This idea introduces two new model parameters: the rate of infected people becoming hospitalized delta and the rate hospitalized people becoming recovered gamma_H. Likely the recovery rates for infected people gamma_I and for hospitalized people gamma_H are relatively similar. There probably is also data for that.

The equations would look like this

S(t+1) = S(t) - beta S(t) I(t)
I(t+1) = I(t) + beta S(t) I(t) - gamma_I I(t) - delta I(t) Theta(H0 - H(t))
H(t+1) = H(t) + delta I(t) Theta(H0 - H(t)) +  - gamma_H H(t)
R(t+1) = R(t) + gamma_I I(t) + gamma_H H(t)

where Theta(H0 - H(t)) is the Heavieside step function (=0 if H(t) > H0 and =1 otherwise).

I would advocate doing a fit for parameters--possibly a Bayesian fit to prior parameters to measured rates.

I'd be happy to implement this. I have to say though, while I am familiar with model building and predictions, my expertise is not epidemiology. So please let me know if this concept is unreasonable.

sloboy commented 4 years ago

I am not an epidemiologist either, but I also have experience with modeling and programming.

The attached link is a paper that talks about several extensions to the SIR and SEIR model, including one with hunting. I am thinking that parameter might be able to be applied to testing: Random person for testing to detect latent infected. If they test positive, then they would be isolated (removed)

https://mpra.ub.uni-muenchen.de/68939/1/MPRA_paper_68939.pdf

The model I was trying to build added ICU as a possible path was like this but I can't wrap my head around the math when there are multiple paths.

S-Incubation-infected-removed S-incubation-infected-hospital-removed S-incubation-infected-ICU-removed S-incubation-infected-hospital-ICU-removed

Does adding this complexity help or hurt the effort?

On Tue, Mar 31, 2020 at 12:53 PM Christopher Körber < notifications@github.com> wrote:

In principle it might be possible to incorporate the delayed hospitalization effect in a similar spirit as SEIR:

My idea works as follows ("SIHR" like---inspired by a youtube video about modeling the epidemic and how early quarantine can significantly change the curve https://www.youtube.com/watch?v=gxAaO2rsdIs&t=1s):

  1. Susceptible people S have a chance of becoming infected I (proportional to both previous susceptible and previous infected).
  2. Infected people have a chance of becoming recovered R (proportional to previous infected) and have a chance to be hospitalized H (proportional to previous infected and limited by hospital capacity H0)
  3. Hospitalized people (hopefully) are isolated enough that they do not infect others (thus no increase in I) and recover over time (proportional to previous hospitalized)

This idea introduces two new model parameters: the rate of infected people becoming hospitalized delta and the rate hospitalized people becoming recovered gamma_H. Likely the recovery rates for infected people gamma_I and for hospitalized people gamma_H are relatively similar. There probably is also data for that.

The equations would look like this

S(t+1) = S(t) - beta S(t) I(t) I(t+1) = I(t) + beta S(t) I(t) - gamma_I I(t) - delta I(t) Theta(H0 - H(t)) H(t+1) = H(t) + delta I(t) Theta(H0 - H(t)) + - gamma_H H(t) R(t+1) = R(t) + gamma_I I(t) + gamma_H H(t)

where Theta(H0 - H(t)) is the Heavieside step function (=0 if H(t) > H0 and =1 otherwise).

I would advocate doing a fit for parameters--possibly a Bayesian fit to prior parameters to measured rates.

I'd be happy to implement this. I have to say though, while I am familiar with model building and predictions, my expertise is not epidemiology. So please let me know if this concept is unreasonable.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CodeForPhilly/chime/issues/340#issuecomment-606747685, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJXXFA6MK7V7LHXWSVWJTDRKINXLANCNFSM4LWCGPLA .